##// END OF EJS Templates
frontend: angular 1.7.7
ergo -
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -20,16 +20,16 b''
20 "tests"
20 "tests"
21 ],
21 ],
22 "dependencies": {
22 "dependencies": {
23 "angular": "1.5.5",
23 "angular": "1.7.7",
24 "angular-resource": "1.5.5",
24 "angular-resource": "1.7.7",
25 "angular-cookies": "1.5.5",
25 "angular-cookies": "1.7.7",
26 "angular-sanitize": "1.5.5",
26 "angular-sanitize": "1.7.7",
27 "angular-animate": "1.5.5",
27 "angular-animate": "1.7.7",
28 "angular-touch": "1.5.5",
28 "angular-touch": "1.7.7",
29 "angular-route": "1.5.5",
29 "angular-route": "1.7.7",
30 "angular-messages": "1.5.5",
30 "angular-messages": "1.7.7",
31 "angular-mocks": "1.5.5",
31 "angular-mocks": "1.7.7",
32 "angular-scenario": "1.5.5",
32 "angular-scenario": "1.7.7",
33 "angular-bootstrap": "1.3.2",
33 "angular-bootstrap": "1.3.2",
34 "angular-ui-router": "1.0.0-beta.3",
34 "angular-ui-router": "1.0.0-beta.3",
35 "angular-toArrayFilter" : "1.0.1",
35 "angular-toArrayFilter" : "1.0.1",
@@ -1,8 +1,8 b''
1 {
1 {
2 "name": "errormator",
2 "name": "errormator",
3 "description": "JS layer for Errormator",
3 "description": "JS layer for AppEnlight",
4 "devDependencies": {
4 "devDependencies": {
5 "bower": "1.7.9",
5 "bower": "^1.8.8",
6 "bower-requirejs": "1.2.0",
6 "bower-requirejs": "1.2.0",
7 "grunt": "1.0.1",
7 "grunt": "1.0.1",
8 "grunt-angular-templates": "1.0.4",
8 "grunt-angular-templates": "1.0.4",
@@ -17,9 +17,12 b''
17 "grunt-contrib-uglify": "1.0.1",
17 "grunt-contrib-uglify": "1.0.1",
18 "grunt-contrib-watch": "1.0.0",
18 "grunt-contrib-watch": "1.0.0",
19 "grunt-remove-logging": "0.2.0",
19 "grunt-remove-logging": "0.2.0",
20 "ini": "1.3.4",
20 "karma": "0.13.22",
21 "karma": "0.13.22",
21 "underscore": "1.8.3",
22 "underscore": "1.8.3",
22 "yo": "1.8.4",
23 "yo": "1.8.4"
23 "ini": "1.3.4"
24 },
25 "dependencies": {
26 "grunt-cli": "^1.3.2"
24 }
27 }
25 }
28 }
@@ -22,6 +22,9 b" ChannelstreamController.$inject = ['stateHolder', 'AeConfig'];"
22
22
23 function AppEnlightFooterController(stateHolder, AeConfig){
23 function AppEnlightFooterController(stateHolder, AeConfig) {
24 var vm = this;
24 var vm = this;
25
26 vm.$onInit = function () {
25 vm.AeConfig = AeConfig;
27 vm.AeConfig = AeConfig;
26 vm.stateHolder = stateHolder;
28 vm.stateHolder = stateHolder;
27 }
29 }
30 }
@@ -22,6 +22,9 b" ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig'];"
22
22
23 function AppEnlightHeaderController($state, stateHolder, AeConfig){
23 function AppEnlightHeaderController($state, stateHolder, AeConfig) {
24 var vm = this;
24 var vm = this;
25
26 vm.$onInit = function () {
27
25 vm.AeConfig = AeConfig;
28 vm.AeConfig = AeConfig;
26 vm.stateHolder = stateHolder;
29 vm.stateHolder = stateHolder;
27 vm.assignedReports = stateHolder.AeUser.assigned_reports;
30 vm.assignedReports = stateHolder.AeUser.assigned_reports;
@@ -32,6 +35,7 b' function AppEnlightHeaderController($state, stateHolder, AeConfig){'
32 vm.activeEvents += 1;
35 vm.activeEvents += 1;
33 }
36 }
34 });
37 });
38 }
35
39
36 vm.clickedEvent = function(event){
40 vm.clickedEvent = function (event) {
37 // exception reports
41 // exception reports
@@ -45,8 +49,7 b' function AppEnlightHeaderController($state, stateHolder, AeConfig){'
45 // uptime reports
49 // uptime reports
46 else if (_.contains([7,8], event.event_type)){
50 else if (_.contains([7, 8], event.event_type)) {
47 $state.go('uptime', {resource:event.resource_id, start_date:event.start_date});
51 $state.go('uptime', {resource: event.resource_id, start_date: event.start_date});
48 }
52 } else {
49 else{
50 console.log('other');
53 console.log('other');
51 }
54 }
52 }
55 }
@@ -23,6 +23,7 b" AdminApplicationsListController.$inject = ['applicationsResource'];"
23 function AdminApplicationsListController(applicationsResource) {
23 function AdminApplicationsListController(applicationsResource) {
24 console.debug('AdminApplicationsListController');
24 console.debug('AdminApplicationsListController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.loading = {applications: true};
27 vm.loading = {applications: true};
27
28
28 vm.applications = applicationsResource.query({
29 vm.applications = applicationsResource.query({
@@ -31,4 +32,5 b' function AdminApplicationsListController(applicationsResource) {'
31 }, function (data) {
32 }, function (data) {
32 vm.loading = {applications: false};
33 vm.loading = {applications: false};
33 });
34 });
35 }
34 };
36 };
@@ -22,6 +22,7 b" AdminConfigurationViewController.$inject = ['configsResource', 'configsNoIdResou"
22
22
23 function AdminConfigurationViewController(configsResource, configsNoIdResource) {
23 function AdminConfigurationViewController(configsResource, configsNoIdResource) {
24 var vm = this;
24 var vm = this;
25 vm.$onInit = function () {
25 vm.loading = {config: true};
26 vm.loading = {config: true};
26
27
27 var filters = [
28 var filters = [
@@ -44,7 +45,7 b' function AdminConfigurationViewController(configsResource, configsNoIdResource) '
44 vm.configs[item.section][item.key] = item;
45 vm.configs[item.section][item.key] = item;
45 });
46 });
46 });
47 });
47
48 }
48 vm.save = function () {
49 vm.save = function () {
49 vm.loading.config = true;
50 vm.loading.config = true;
50 _.each(vm.configList, function (item) {
51 _.each(vm.configList, function (item) {
@@ -23,6 +23,7 b" AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPr"
23 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
23 function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) {
24 console.debug('AdminGroupsCreateController');
24 console.debug('AdminGroupsCreateController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {
28 vm.loading = {
28 group: false,
29 group: false,
@@ -74,11 +75,12 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
74 vm.loading.users = false;
75 vm.loading.users = false;
75 });
76 });
76
77
77 }
78 } else {
78 else {
79 var groupId = null;
79 var groupId = null;
80 }
80 }
81
81
82 }
83
82 var formResponse = function (response) {
84 var formResponse = function (response) {
83 if (response.status === 422) {
85 if (response.status === 422) {
84 setServerValidation(vm.groupForm, response.data);
86 setServerValidation(vm.groupForm, response.data);
@@ -93,8 +95,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR'
93 setServerValidation(vm.groupForm);
95 setServerValidation(vm.groupForm);
94 vm.loading.group = false;
96 vm.loading.group = false;
95 }, formResponse);
97 }, formResponse);
96 }
98 } else {
97 else {
98 groupsResource.save(vm.group, function (data) {
99 groupsResource.save(vm.group, function (data) {
99 $state.go('admin.group.update', {groupId: data.id});
100 $state.go('admin.group.update', {groupId: data.id});
100 }, formResponse);
101 }, formResponse);
@@ -23,6 +23,7 b" AdminGroupsListViewController.$inject = ['$state', 'groupsResource'];"
23 function AdminGroupsListViewController($state, groupsResource) {
23 function AdminGroupsListViewController($state, groupsResource) {
24 console.debug('AdminGroupsListViewController');
24 console.debug('AdminGroupsListViewController');
25 var vm = this;
25 var vm = this;
26 this.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {groups: true};
28 vm.loading = {groups: true};
28
29
@@ -36,7 +37,7 b' function AdminGroupsListViewController($state, groupsResource) {'
36 }, 0);
37 }, 0);
37 console.log(vm.groups);
38 console.log(vm.groups);
38 });
39 });
39
40 }
40
41
41 vm.removeGroup = function (group) {
42 vm.removeGroup = function (group) {
42 groupsResource.remove({groupId: group.id}, function (data, responseHeaders) {
43 groupsResource.remove({groupId: group.id}, function (data, responseHeaders) {
@@ -22,6 +22,7 b" AdminPartitionsViewController.$inject = ['sectionViewResource'];"
22
22
23 function AdminPartitionsViewController(sectionViewResource) {
23 function AdminPartitionsViewController(sectionViewResource) {
24 var vm = this;
24 var vm = this;
25 this.$onInit = function () {
25 vm.permanentPartitions = [];
26 vm.permanentPartitions = [];
26 vm.dailyPartitions = [];
27 vm.dailyPartitions = [];
27 vm.loading = {partitions: true};
28 vm.loading = {partitions: true};
@@ -30,6 +31,9 b' function AdminPartitionsViewController(sectionViewResource) {'
30 vm.dailyConfirm = '';
31 vm.dailyConfirm = '';
31 vm.permConfirm = '';
32 vm.permConfirm = '';
32
33
34 sectionViewResource.get({section: 'admin_section', view: 'partitions'},
35 vm.loadPartitions);
36 }
33
37
34 vm.loadPartitions = function (data) {
38 vm.loadPartitions = function (data) {
35 var permanentPartitions = vm.transformPartitionList(
39 var permanentPartitions = vm.transformPartitionList(
@@ -45,15 +49,13 b' function AdminPartitionsViewController(sectionViewResource) {'
45 var toTest = null;
49 var toTest = null;
46 if (scope === 'dailyPartitions'){
50 if (scope === 'dailyPartitions') {
47 toTest = 'dailyChecked';
51 toTest = 'dailyChecked';
48 }
52 } else {
49 else{
50 toTest = 'permChecked';
53 toTest = 'permChecked';
51 }
54 }
52
55
53 if (vm[toTest]) {
56 if (vm[toTest]) {
54 var val = true;
57 var val = true;
55 }
58 } else {
56 else {
57 var val = false;
59 var val = false;
58 }
60 }
59 console.log('scope', scope);
61 console.log('scope', scope);
@@ -90,9 +92,6 b' function AdminPartitionsViewController(sectionViewResource) {'
90 return outputList;
92 return outputList;
91 };
93 };
92
94
93 sectionViewResource.get({section:'admin_section', view: 'partitions'},
94 vm.loadPartitions);
95
96 vm.partitionsDelete = function (partitionType) {
95 vm.partitionsDelete = function (partitionType) {
97 var es_indices = [];
96 var es_indices = [];
98 var pg_indices = [];
97 var pg_indices = [];
@@ -111,8 +110,10 b' function AdminPartitionsViewController(sectionViewResource) {'
111 console.log(es_indices, pg_indices);
110 console.log(es_indices, pg_indices);
112
111
113 vm.loading = {partitions: true};
112 vm.loading = {partitions: true};
114 sectionViewResource.save({section:'admin_section',
113 sectionViewResource.save({
115 view: 'partitions_remove'}, {
114 section: 'admin_section',
115 view: 'partitions_remove'
116 }, {
116 es_indices: es_indices,
117 es_indices: es_indices,
117 pg_indices: pg_indices,
118 pg_indices: pg_indices,
118 confirm: 'CONFIRM'
119 confirm: 'CONFIRM'
@@ -22,8 +22,10 b" AdminSystemViewController.$inject = ['sectionViewResource'];"
22
22
23 function AdminSystemViewController(sectionViewResource) {
23 function AdminSystemViewController(sectionViewResource) {
24 var vm = this;
24 var vm = this;
25 this.$onInit = function () {
25 vm.tables = [];
26 vm.tables = [];
26 vm.loading = {system: true};
27 vm.loading = {system: true};
28
27 sectionViewResource.get({
29 sectionViewResource.get({
28 section: 'admin_section',
30 section: 'admin_section',
29 view: 'system'
31 view: 'system'
@@ -37,7 +39,7 b' function AdminSystemViewController(sectionViewResource) {'
37 vm.disks = data.disks;
39 vm.disks = data.disks;
38 vm.memory = data.memory;
40 vm.memory = data.memory;
39 vm.selfInfo = data.self_info;
41 vm.selfInfo = data.self_info;
40
41 vm.loading.system = false;
42 vm.loading.system = false;
42 });
43 });
44 }
43 };
45 };
@@ -23,6 +23,7 b" AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPrope"
23 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
23 function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) {
24 console.debug('AdminUsersCreateViewController');
24 console.debug('AdminUsersCreateViewController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {user: false};
28 vm.loading = {user: false};
28
29
@@ -67,13 +68,13 b' function AdminUsersCreateViewController($state, usersResource, usersPropertyReso'
67 vm.resourcePermissions = tmpObj;
68 vm.resourcePermissions = tmpObj;
68 });
69 });
69
70
70 }
71 } else {
71 else {
72 var userId = null;
72 var userId = null;
73 vm.user = {
73 vm.user = {
74 status: true
74 status: true
75 }
75 }
76 }
76 }
77 }
77
78
78 var formResponse = function (response) {
79 var formResponse = function (response) {
79 if (response.status == 422) {
80 if (response.status == 422) {
@@ -23,6 +23,7 b" AdminUserListViewController.$inject = ['usersResource'];"
23 function AdminUserListViewController(usersResource) {
23 function AdminUserListViewController(usersResource) {
24 console.debug('AdminUsersController');
24 console.debug('AdminUsersController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.loading = {users: true};
27 vm.loading = {users: true};
27
28
28 vm.users = usersResource.query({}, function (data) {
29 vm.users = usersResource.query({}, function (data) {
@@ -35,7 +36,7 b' function AdminUserListViewController(usersResource) {'
35 }, 0);
36 }, 0);
36 console.log(vm.users);
37 console.log(vm.users);
37 });
38 });
38
39 }
39
40
40 vm.removeUser = function (user) {
41 vm.removeUser = function (user) {
41 usersResource.remove({userId: user.id}, function (data, responseHeaders) {
42 usersResource.remove({userId: user.id}, function (data, responseHeaders) {
@@ -21,7 +21,10 b" angular.module('appenlight.components.adminView', [])"
21 AdminViewController.$inject = ['$state', 'AeConfig'];
21 AdminViewController.$inject = ['$state', 'AeConfig'];
22
22
23 function AdminViewController($state, AeConfig) {
23 function AdminViewController($state, AeConfig) {
24 this.$onInit = function () {
24 this.$state = $state;
25 this.$state = $state;
25 this.AeConfig = AeConfig;
26 this.AeConfig = AeConfig;
26 console.info('AdminViewController');
27 console.info('AdminViewController');
27 }
28 }
29
30 }
@@ -23,9 +23,11 b" IntegrationsListViewController.$inject = ['$state', 'applicationsResource'];"
23 function IntegrationsListViewController($state, applicationsResource) {
23 function IntegrationsListViewController($state, applicationsResource) {
24 console.debug('IntegrationsListController');
24 console.debug('IntegrationsListController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.loading = {application: true};
27 vm.loading = {application: true};
27 vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) {
28 vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) {
28 vm.loading.application = false;
29 vm.loading.application = false;
29 $state.current.data.resource = vm.resource;
30 $state.current.data.resource = vm.resource;
30 });
31 });
31 }
32 }
33 }
@@ -23,9 +23,11 b" ApplicationsListViewController.$inject = ['$state', 'applicationsResource'];"
23 function ApplicationsListViewController($state, applicationsResource) {
23 function ApplicationsListViewController($state, applicationsResource) {
24 console.debug('ApplicationsListController');
24 console.debug('ApplicationsListController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {applications: true};
28 vm.loading = {applications: true};
28 vm.applications = applicationsResource.query(null, function(){
29 vm.applications = applicationsResource.query(null, function () {
29 vm.loading.applications = false;
30 vm.loading.applications = false;
30 });
31 });
31 }
32 }
33 }
@@ -23,6 +23,7 b" applicationsPurgeLogsViewController.$inject = ['$state' ,'applicationsResource',"
23 function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) {
23 function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) {
24 console.debug('applicationsPurgeLogsViewController');
24 console.debug('applicationsPurgeLogsViewController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {applications: true};
28 vm.loading = {applications: true};
28
29
@@ -35,6 +36,7 b' function applicationsPurgeLogsViewController($state, applicationsResource, secti'
35 vm.selectedResource = vm.applications[0].resource_id;
36 vm.selectedResource = vm.applications[0].resource_id;
36 vm.getCommonKeys();
37 vm.getCommonKeys();
37 });
38 });
39 }
38
40
39 /**
41 /**
40 * Fetches most commonly used tags in logs
42 * Fetches most commonly used tags in logs
@@ -51,8 +53,10 b' function applicationsPurgeLogsViewController($state, applicationsResource, secti'
51
53
52 vm.purgeLogs = function () {
54 vm.purgeLogs = function () {
53 vm.loading.applications = true;
55 vm.loading.applications = true;
54 logsNoIdResource.delete({resource:vm.selectedResource,
56 logsNoIdResource.delete({
55 namespace: vm.namespace}, function(){
57 resource: vm.selectedResource,
58 namespace: vm.namespace
59 }, function () {
56 vm.loading.applications = false;
60 vm.loading.applications = false;
57 });
61 });
58 }
62 }
@@ -24,6 +24,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl'
24 'use strict';
24 'use strict';
25 console.debug('applicationsUpdateView');
25 console.debug('applicationsUpdateView');
26 var vm = this;
26 var vm = this;
27 vm.$onInit = function () {
27 vm.AeConfig = AeConfig;
28 vm.AeConfig = AeConfig;
28 vm.$state = $state;
29 vm.$state = $state;
29 vm.loading = {application: false};
30 vm.loading = {application: false};
@@ -48,8 +49,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl'
48 allow_permanent_storage: true,
49 allow_permanent_storage: true,
49 default_grouping: vm.groupingOptions[1][0]
50 default_grouping: vm.groupingOptions[1][0]
50 };
51 };
51 }
52 } else {
52 else {
53 vm.loading.application = true;
53 vm.loading.application = true;
54 vm.resource = applicationsResource.get({
54 vm.resource = applicationsResource.get({
55 'resourceId': resourceId
55 'resourceId': resourceId
@@ -57,7 +57,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl'
57 vm.loading.application = false;
57 vm.loading.application = false;
58 });
58 });
59 }
59 }
60
60 }
61
61
62 vm.updateBasicForm = function () {
62 vm.updateBasicForm = function () {
63 vm.loading.application = true;
63 vm.loading.application = true;
@@ -23,6 +23,7 b" EventBrowserController.$inject = ['eventsNoIdResource', 'eventsResource'];"
23 function EventBrowserController(eventsNoIdResource, eventsResource) {
23 function EventBrowserController(eventsNoIdResource, eventsResource) {
24 console.info('EventBrowserController');
24 console.info('EventBrowserController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26
27
27 vm.loading = {events: true};
28 vm.loading = {events: true};
28
29
@@ -31,7 +32,7 b' function EventBrowserController(eventsNoIdResource, eventsResource) {'
31 function (data) {
32 function (data) {
32 vm.loading.events = false;
33 vm.loading.events = false;
33 });
34 });
34
35 }
35
36
36 vm.closeEvent = function (event) {
37 vm.closeEvent = function (event) {
37 console.log('closeEvent');
38 console.log('closeEvent');
@@ -22,6 +22,7 b" IndexDashboardController.$inject = ['$rootScope', '$scope', '$location','$cookie"
22
22
23 function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) {
23 function IndexDashboardController($rootScope, $scope, $location, $cookies, $interval, stateHolder, applicationsPropertyResource, AeConfig) {
24 var vm = this;
24 var vm = this;
25 vm.$onInit = function () {
25 stateHolder.section = 'dashboard';
26 stateHolder.section = 'dashboard';
26 vm.timeOptions = {};
27 vm.timeOptions = {};
27 var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M'];
28 var allowed = ['1h', '4h', '12h', '24h', '1w', '2w', '1M'];
@@ -375,6 +376,22 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
375 };
376 };
376 vm.stream = {paused: false, filtered: false, messages: [], reports: []};
377 vm.stream = {paused: false, filtered: false, messages: [], reports: []};
377
378
379 vm.intervalId = $interval(function () {
380 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
381 // don't do anything if window is unfocused
382 if(document.hidden === true){
383 return ;
384 }
385 vm.refreshData();
386 }
387 }, 60000);
388
389 if (stateHolder.AeUser.applications.length){
390 vm.show_dashboard = true;
391 vm.determineStartState();
392 }
393
394 }
378 $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){
395 $rootScope.$on('channelstream-message.front_dashboard.new_topic', function(event, message){
379 var ws_report = message.message.report;
396 var ws_report = message.message.report;
380 if (ws_report.http_status != 500) {
397 if (ws_report.http_status != 500) {
@@ -463,16 +480,6 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
463 vm.refreshData();
480 vm.refreshData();
464 };
481 };
465
482
466 vm.intervalId = $interval(function () {
467 if (_.contains(['30m', "1h"], vm.timeSpan.key)) {
468 // don't do anything if window is unfocused
469 if(document.hidden === true){
470 return ;
471 }
472 vm.refreshData();
473 }
474 }, 60000);
475
476 vm.fetchApdexStats = function () {
483 vm.fetchApdexStats = function () {
477 vm.loading.apdex = true;
484 vm.loading.apdex = true;
478 vm.apdexStats = applicationsPropertyResource.query({
485 vm.apdexStats = applicationsPropertyResource.query({
@@ -653,9 +660,4 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte'
653 $scope.$on('$destroy',function(){
660 $scope.$on('$destroy',function(){
654 $interval.cancel(vm.intervalId);
661 $interval.cancel(vm.intervalId);
655 });
662 });
656
657 if (stateHolder.AeUser.applications.length){
658 vm.show_dashboard = true;
659 vm.determineStartState();
660 }
661 }
663 }
@@ -18,6 +18,7 b" ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationReso"
18 function ApplicationsIntegrationsEditViewController($state, integrationResource) {
18 function ApplicationsIntegrationsEditViewController($state, integrationResource) {
19 console.debug('IntegrationController');
19 console.debug('IntegrationController');
20 var vm = this;
20 var vm = this;
21 vm.$onInit = function () {
21 vm.$state = $state;
22 vm.$state = $state;
22 vm.loading = {integration: true};
23 vm.loading = {integration: true};
23 vm.config = integrationResource.get(
24 vm.config = integrationResource.get(
@@ -28,7 +29,7 b' function ApplicationsIntegrationsEditViewController($state, integrationResource)'
28 }, function (data) {
29 }, function (data) {
29 vm.loading.integration = false;
30 vm.loading.integration = false;
30 });
31 });
31
32 }
32 vm.configureIntegration = function () {
33 vm.configureIntegration = function () {
33 console.info('configureIntegration');
34 console.info('configureIntegration');
34 vm.loading.integration = true;
35 vm.loading.integration = true;
@@ -22,6 +22,7 b" LogsBrowserController.$inject = ['$location', 'stateHolder', 'typeAheadTagHelper"
22
22
23 function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
23 function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsNoIdResource, sectionViewResource) {
24 var vm = this;
24 var vm = this;
25 vm.$onInit = function () {
25 vm.logEventsChartConfig = {
26 vm.logEventsChartConfig = {
26 data: {
27 data: {
27 json: [],
28 json: [],
@@ -158,6 +159,19 b' function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsN'
158 vm.showDatePicker = false;
159 vm.showDatePicker = false;
159 vm.manualOpen = false;
160 vm.manualOpen = false;
160 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
161 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
162
163 _.each(vm.applications, function (item) {
164 vm.filterTypeAheadOptions.push({
165 type: 'resource',
166 text: 'resource:' + item.resource_id + ':' + item.resource_name,
167 example: 'resource:' + item.resource_id,
168 'tag': item.resource_name,
169 'description': 'Restrict resultset to this application'
170 });
171 });
172 console.info('page load');
173 vm.refresh();
174 }
161 vm.removeSearchTag = function (tag) {
175 vm.removeSearchTag = function (tag) {
162 $location.search(tag.type, null);
176 $location.search(tag.type, null);
163 vm.refresh();
177 vm.refresh();
@@ -172,17 +186,6 b' function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsN'
172 vm.refresh();
186 vm.refresh();
173 };
187 };
174
188
175
176 _.each(vm.applications, function (item) {
177 vm.filterTypeAheadOptions.push({
178 type: 'resource',
179 text: 'resource:' + item.resource_id + ':' + item.resource_name,
180 example: 'resource:' + item.resource_id,
181 'tag': item.resource_name,
182 'description': 'Restrict resultset to this application'
183 });
184 });
185
186 vm.typeAheadTag = function (event) {
189 vm.typeAheadTag = function (event) {
187 var text = vm.filterTypeAhead;
190 var text = vm.filterTypeAhead;
188 if (_.isObject(vm.filterTypeAhead)) {
191 if (_.isObject(vm.filterTypeAhead)) {
@@ -288,6 +291,5 b' function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsN'
288 vm.fetchLogs(params);
291 vm.fetchLogs(params);
289 vm.fetchSeriesData(params);
292 vm.fetchSeriesData(params);
290 };
293 };
291 console.info('page load');
294
292 vm.refresh();
293 }
295 }
@@ -24,6 +24,7 b" ReportViewController.$inject = ['$window', '$location', '$state', '$uibModal',"
24
24
25 function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) {
25 function ReportViewController($window, $location, $state, $uibModal, $cookies, reportGroupPropertyResource, reportGroupResource, logsNoIdResource, stateHolder) {
26 var vm = this;
26 var vm = this;
27 vm.$onInit = function () {
27 vm.window = $window;
28 vm.window = $window;
28 vm.stateHolder = stateHolder;
29 vm.stateHolder = stateHolder;
29 vm.$state = $state;
30 vm.$state = $state;
@@ -97,6 +98,25 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r'
97 history: true
98 history: true
98 };
99 };
99
100
101 vm.tabs = {
102 slow_calls:false,
103 request_details:false,
104 logs:false,
105 comments:false,
106 affected_users:false
107 };
108 if ($cookies.selectedReportTab) {
109 vm.tabs[$cookies.selectedReportTab] = true;
110 }
111 else{
112 $cookies.selectedReportTab = 'request_details';
113 vm.tabs.request_details = true;
114 }
115
116 // load report
117 vm.fetchReport();
118 }
119
100 vm.searchMentionedPeople = function(term){
120 vm.searchMentionedPeople = function(term){
101 //vm.mentionedPeople = [];
121 //vm.mentionedPeople = [];
102 var term = term.toLowerCase();
122 var term = term.toLowerCase();
@@ -131,21 +151,6 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r'
131 $location.search(tag, value);
151 $location.search(tag, value);
132 };
152 };
133
153
134 vm.tabs = {
135 slow_calls:false,
136 request_details:false,
137 logs:false,
138 comments:false,
139 affected_users:false
140 };
141 if ($cookies.selectedReportTab) {
142 vm.tabs[$cookies.selectedReportTab] = true;
143 }
144 else{
145 $cookies.selectedReportTab = 'request_details';
146 vm.tabs.request_details = true;
147 }
148
149 vm.fetchLogs = function () {
154 vm.fetchLogs = function () {
150 if (!vm.report.request_id){
155 if (!vm.report.request_id){
151 return
156 return
@@ -171,6 +176,7 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r'
171 };
176 };
172
177
173 vm.fetchReport = function () {
178 vm.fetchReport = function () {
179 console.log(vm);
174 vm.is_loading.report = true;
180 vm.is_loading.report = true;
175 reportGroupResource.get($state.params, function (data) {
181 reportGroupResource.get($state.params, function (data) {
176 vm.is_loading.report = false;
182 vm.is_loading.report = false;
@@ -346,9 +352,4 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r'
346 });
352 });
347
353
348 };
354 };
349
350 // load report
351 vm.fetchReport();
352
353
354 }
355 }
@@ -24,6 +24,7 b" reportsBrowserViewController.$inject = ['$location', '$cookies',"
24 function reportsBrowserViewController($location, $cookies, stateHolder,
24 function reportsBrowserViewController($location, $cookies, stateHolder,
25 typeAheadTagHelper, reportsResource) {
25 typeAheadTagHelper, reportsResource) {
26 var vm = this;
26 var vm = this;
27 vm.$onInit = function () {
27 vm.applications = stateHolder.AeUser.applications_map;
28 vm.applications = stateHolder.AeUser.applications_map;
28 stateHolder.section = 'reports';
29 stateHolder.section = 'reports';
29 vm.today = function () {
30 vm.today = function () {
@@ -149,23 +150,12 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
149 vm.showDatePicker = false;
150 vm.showDatePicker = false;
150 vm.manualOpen = false;
151 vm.manualOpen = false;
151 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
152 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
152 vm.removeSearchTag = function (tag) {
153
153 $location.search(tag.type, null);
154 vm.refresh();
155 };
156 vm.addSearchTag = function (tag) {
157 $location.search(tag.type, tag.value);
158 vm.refresh();
159 };
160 vm.notRelativeTime = false;
154 vm.notRelativeTime = false;
161 if ($cookies.notRelativeTime) {
155 if ($cookies.notRelativeTime) {
162 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
156 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
163 }
157 }
164
158
165 vm.changeRelativeTime = function () {
166 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
167 };
168
169 _.each(_.range(1, 11), function (priority) {
159 _.each(_.range(1, 11), function (priority) {
170 vm.filterTypeAheadOptions.push({
160 vm.filterTypeAheadOptions.push({
171 type: 'priority',
161 type: 'priority',
@@ -194,6 +184,24 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
194 });
184 });
195 });
185 });
196
186
187 // initial load
188 vm.refresh();
189
190 }
191
192 vm.removeSearchTag = function (tag) {
193 $location.search(tag.type, null);
194 vm.refresh();
195 };
196 vm.addSearchTag = function (tag) {
197 $location.search(tag.type, tag.value);
198 vm.refresh();
199 };
200
201 vm.changeRelativeTime = function () {
202 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
203 };
204
197 vm.paginationChange = function(){
205 vm.paginationChange = function () {
198 $location.search('page', vm.page);
206 $location.search('page', vm.page);
199 vm.refresh();
207 vm.refresh();
@@ -222,8 +230,7 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
222 if (tagValue) {
230 if (tagValue) {
223 tag.value = tagValue.join(':');
231 tag.value = tagValue.join(':');
224 }
232 }
225 }
233 } else {
226 else {
227 tag.type = 'error';
234 tag.type = 'error';
228 tag.value = parsed.join(':');
235 tag.value = parsed.join(':');
229 }
236 }
@@ -232,8 +239,7 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
232 if ('start_date:' == text) {
239 if ('start_date:' == text) {
233 vm.showDatePicker = true;
240 vm.showDatePicker = true;
234 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
241 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
235 }
242 } else if ('end_date:' == text) {
236 else if ('end_date:' == text) {
237 vm.showDatePicker = true;
243 vm.showDatePicker = true;
238 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
244 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
239 }
245 }
@@ -251,8 +257,7 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
251 vm.pickerDateChanged = function(){
257 vm.pickerDateChanged = function () {
252 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
258 if (vm.filterTypeAhead.indexOf('start_date:') == '0') {
253 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
259 vm.filterTypeAhead = 'start_date:' + moment(vm.pickerDate).utc().format();
254 }
260 } else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
255 else if (vm.filterTypeAhead.indexOf('end_date:') == '0') {
256 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
261 vm.filterTypeAhead = 'end_date:' + moment(vm.pickerDate).utc().hour(23).minute(59).format();
257 }
262 }
258 vm.showDatePicker = false;
263 vm.showDatePicker = false;
@@ -263,16 +268,13 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
263 if (report.group.public) {
268 if (report.group.public) {
264 report.presentation.className = 'public';
269 report.presentation.className = 'public';
265 report.presentation.tooltip = 'Public';
270 report.presentation.tooltip = 'Public';
266 }
271 } else if (report.group.fixed) {
267 else if (report.group.fixed) {
268 report.presentation.className = 'fixed';
272 report.presentation.className = 'fixed';
269 report.presentation.tooltip = 'Fixed';
273 report.presentation.tooltip = 'Fixed';
270 }
274 } else if (report.group.read) {
271 else if (report.group.read) {
272 report.presentation.className = 'reviewed';
275 report.presentation.className = 'reviewed';
273 report.presentation.tooltip = 'Reviewed';
276 report.presentation.tooltip = 'Reviewed';
274 }
277 } else {
275 else {
276 report.presentation.className = 'new';
278 report.presentation.className = 'new';
277 report.presentation.tooltip = 'New';
279 report.presentation.tooltip = 'New';
278 }
280 }
@@ -310,6 +312,5 b' function reportsBrowserViewController($location, $cookies, stateHolder,'
310 console.log(params);
312 console.log(params);
311 vm.fetchReports(params);
313 vm.fetchReports(params);
312 };
314 };
313 // initial load
315
314 vm.refresh();
315 }
316 }
@@ -27,6 +27,7 b" ReportsSlowBrowserViewController.$inject = ['$location', '$cookies',"
27
27
28 function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
28 function ReportsSlowBrowserViewController($location, $cookies, stateHolder, typeAheadTagHelper, slowReportsResource) {
29 var vm = this;
29 var vm = this;
30 vm.$onInit = function () {
30 vm.applications = stateHolder.AeUser.applications_map;
31 vm.applications = stateHolder.AeUser.applications_map;
31 stateHolder.section = 'slow_reports';
32 stateHolder.section = 'slow_reports';
32 vm.today = function () {
33 vm.today = function () {
@@ -130,25 +131,13 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
130 vm.filterTypeAhead = undefined;
131 vm.filterTypeAhead = undefined;
131 vm.showDatePicker = false;
132 vm.showDatePicker = false;
132 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
133 vm.aheadFilter = typeAheadTagHelper.aheadFilter;
133 vm.removeSearchTag = function (tag) {
134
134 $location.search(tag.type, null);
135 vm.refresh();
136 };
137 vm.addSearchTag = function (tag) {
138 $location.search(tag.type, tag.value);
139 vm.refresh();
140 };
141 vm.manualOpen = false;
135 vm.manualOpen = false;
142 vm.notRelativeTime = false;
136 vm.notRelativeTime = false;
143 if ($cookies.notRelativeTime) {
137 if ($cookies.notRelativeTime) {
144 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
138 vm.notRelativeTime = JSON.parse($cookies.notRelativeTime);
145 }
139 }
146
140
147
148 vm.changeRelativeTime = function () {
149 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
150 };
151
152 _.each(_.range(1, 11), function (priority) {
141 _.each(_.range(1, 11), function (priority) {
153 vm.filterTypeAheadOptions.push({
142 vm.filterTypeAheadOptions.push({
154 type: 'priority',
143 type: 'priority',
@@ -177,6 +166,24 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
177 });
166 });
178 });
167 });
179
168
169 //initial load
170 vm.refresh();
171 }
172
173 vm.removeSearchTag = function (tag) {
174 $location.search(tag.type, null);
175 vm.refresh();
176 };
177 vm.addSearchTag = function (tag) {
178 $location.search(tag.type, tag.value);
179 vm.refresh();
180 };
181
182
183 vm.changeRelativeTime = function () {
184 $cookies.notRelativeTime = JSON.stringify(vm.notRelativeTime);
185 };
186
180 vm.typeAheadTag = function (event) {
187 vm.typeAheadTag = function (event) {
181 var text = vm.filterTypeAhead;
188 var text = vm.filterTypeAhead;
182 if (_.isObject(vm.filterTypeAhead)) {
189 if (_.isObject(vm.filterTypeAhead)) {
@@ -287,6 +294,4 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type'
287 vm.fetchReports(params);
294 vm.fetchReports(params);
288 };
295 };
289
296
290 //initial load
291 vm.refresh();
292 }
297 }
@@ -21,7 +21,9 b" angular.module('appenlight.components.settingsView', [])"
21 SettingsViewController.$inject = ['$state', 'AeConfig'];
21 SettingsViewController.$inject = ['$state', 'AeConfig'];
22
22
23 function SettingsViewController($state, AeConfig) {
23 function SettingsViewController($state, AeConfig) {
24 this.$onInit = function () {
24 this.$state = $state;
25 this.$state = $state;
25 this.AeConfig = AeConfig;
26 this.AeConfig = AeConfig;
26 console.info('SettingsViewController');
27 console.info('SettingsViewController');
27 }
28 }
29 }
@@ -23,10 +23,12 b" AlertChannelsEmailController.$inject = ['$state','userSelfPropertyResource'];"
23 function AlertChannelsEmailController($state, userSelfPropertyResource) {
23 function AlertChannelsEmailController($state, userSelfPropertyResource) {
24 console.debug('AlertChannelsEmailController');
24 console.debug('AlertChannelsEmailController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
27 var vm = this;
26 vm.$state = $state;
28 vm.$state = $state;
27 vm.loading = {email: false};
29 vm.loading = {email: false};
28 vm.form = {};
30 vm.form = {};
29
31 }
30 vm.createChannel = function () {
32 vm.createChannel = function () {
31 vm.loading.email = true;
33 vm.loading.email = true;
32 console.log('createChannel');
34 console.log('createChannel');
@@ -23,6 +23,7 b" userAlertChannelsListViewController.$inject = ['$state','userSelfPropertyResourc"
23 function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) {
23 function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) {
24 console.debug('AlertChannelsController');
24 console.debug('AlertChannelsController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {channels: true, applications: true, actions:true};
28 vm.loading = {channels: true, applications: true, actions: true};
28
29
@@ -86,7 +87,7 b' function userAlertChannelsListViewController($state, userSelfPropertyResource, a'
86 allOps: allOps,
87 allOps: allOps,
87 possibleFields: possibleFields
88 possibleFields: possibleFields
88 };
89 };
89
90 }
90 vm.addAction = function (channel) {
91 vm.addAction = function (channel) {
91 console.log('test');
92 console.log('test');
92 userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) {
93 userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) {
@@ -23,6 +23,7 b" userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'A"
23 function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) {
23 function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) {
24 console.debug('userAuthTokensViewController');
24 console.debug('userAuthTokensViewController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {tokens: true};
28 vm.loading = {tokens: true};
28
29
@@ -32,7 +33,7 b' function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig'
32 function (data) {
33 function (data) {
33 vm.loading.tokens = false;
34 vm.loading.tokens = false;
34 });
35 });
35
36 }
36 vm.addToken = function () {
37 vm.addToken = function () {
37 vm.loading.tokens = true;
38 vm.loading.tokens = true;
38 userSelfPropertyResource.save({key: 'auth_tokens'},
39 userSelfPropertyResource.save({key: 'auth_tokens'},
@@ -23,6 +23,7 b" UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeCon"
23 function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {
23 function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {
24 console.debug('UserIdentitiesController');
24 console.debug('UserIdentitiesController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.AeConfig = AeConfig;
28 vm.AeConfig = AeConfig;
28 vm.loading = {identities: true};
29 vm.loading = {identities: true};
@@ -33,7 +34,7 b' function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {'
33 vm.loading.identities = false;
34 vm.loading.identities = false;
34 console.log(vm.identities);
35 console.log(vm.identities);
35 });
36 });
36
37 }
37 vm.removeProvider = function (provider) {
38 vm.removeProvider = function (provider) {
38 console.log('provider', provider);
39 console.log('provider', provider);
39 userSelfPropertyResource.delete(
40 userSelfPropertyResource.delete(
@@ -23,10 +23,11 b" UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource'];"
23 function UserPasswordViewController($state, userSelfPropertyResource) {
23 function UserPasswordViewController($state, userSelfPropertyResource) {
24 console.debug('UserPasswordViewController');
24 console.debug('UserPasswordViewController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {password: false};
28 vm.loading = {password: false};
28 vm.form = {};
29 vm.form = {};
29
30 }
30 vm.updatePassword = function () {
31 vm.updatePassword = function () {
31 vm.loading.password = true;
32 vm.loading.password = true;
32 console.log('updatePassword');
33 console.log('updatePassword');
@@ -23,6 +23,7 b" UserProfileViewController.$inject = ['$state', 'userSelfResource'];"
23 function UserProfileViewController($state, userSelfResource) {
23 function UserProfileViewController($state, userSelfResource) {
24 console.debug('UserProfileViewController');
24 console.debug('UserProfileViewController');
25 var vm = this;
25 var vm = this;
26 vm.$onInit = function () {
26 vm.$state = $state;
27 vm.$state = $state;
27 vm.loading = {profile: true};
28 vm.loading = {profile: true};
28
29
@@ -30,7 +31,7 b' function UserProfileViewController($state, userSelfResource) {'
30 vm.loading.profile = false;
31 vm.loading.profile = false;
31 console.log('loaded profile');
32 console.log('loaded profile');
32 });
33 });
33
34 }
34 vm.updateProfile = function () {
35 vm.updateProfile = function () {
35 vm.loading.profile = true;
36 vm.loading.profile = true;
36
37
@@ -19,6 +19,7 b" BitbucketIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'in"
19
19
20 function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
20 function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
21 var vm = this;
21 var vm = this;
22 vm.$onInit = function () {
22 vm.loading = true;
23 vm.loading = true;
23 vm.assignees = [];
24 vm.assignees = [];
24 vm.report = report;
25 vm.report = report;
@@ -31,7 +32,8 b' function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration'
31 'Issue created for report: ' +
32 'Issue created for report: ' +
32 $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true})
33 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
33 };
34 };
34
35 vm.fetchInfo();
36 }
35 vm.fetchInfo = function () {
37 vm.fetchInfo = function () {
36 integrationResource.get({
38 integrationResource.get({
37 resourceId: vm.report.resource_id,
39 resourceId: vm.report.resource_id,
@@ -50,8 +52,7 b' function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration'
50 }, function (error_data) {
52 }, function (error_data) {
51 if (error_data.data.error_messages) {
53 if (error_data.data.error_messages) {
52 vm.error_messages = error_data.data.error_messages;
54 vm.error_messages = error_data.data.error_messages;
53 }
55 } else {
54 else {
55 vm.error_messages = ['There was a problem processing your request'];
56 vm.error_messages = ['There was a problem processing your request'];
56 }
57 }
57 });
58 });
@@ -75,8 +76,7 b' function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration'
75 }, function (error_data) {
76 }, function (error_data) {
76 if (error_data.data.error_messages) {
77 if (error_data.data.error_messages) {
77 vm.error_messages = error_data.data.error_messages;
78 vm.error_messages = error_data.data.error_messages;
78 }
79 } else {
79 else {
80 vm.error_messages = ['There was a problem processing your request'];
80 vm.error_messages = ['There was a problem processing your request'];
81 }
81 }
82 });
82 });
@@ -84,5 +84,4 b' function BitbucketIntegrationCtrl($uibModalInstance, $state, report, integration'
84 vm.cancel = function () {
84 vm.cancel = function () {
85 $uibModalInstance.dismiss('cancel');
85 $uibModalInstance.dismiss('cancel');
86 };
86 };
87 vm.fetchInfo();
88 }
87 }
@@ -19,6 +19,7 b" GithubIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integ"
19
19
20 function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
20 function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
21 var vm = this;
21 var vm = this;
22 vm.$onInit = function () {
22 vm.loading = true;
23 vm.loading = true;
23 vm.assignees = [];
24 vm.assignees = [];
24 vm.report = report;
25 vm.report = report;
@@ -31,7 +32,8 b' function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam'
31 'Issue created for report: ' +
32 'Issue created for report: ' +
32 $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true})
33 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
33 };
34 };
34
35 vm.fetchInfo();
36 }
35 vm.fetchInfo = function () {
37 vm.fetchInfo = function () {
36 integrationResource.get({
38 integrationResource.get({
37 resourceId: vm.report.resource_id,
39 resourceId: vm.report.resource_id,
@@ -42,8 +44,7 b' function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam'
42 vm.loading = false;
44 vm.loading = false;
43 if (data.error_messages) {
45 if (data.error_messages) {
44 vm.error_messages = data.error_messages;
46 vm.error_messages = data.error_messages;
45 }
47 } else {
46 else {
47 vm.assignees = data.assignees;
48 vm.assignees = data.assignees;
48 vm.statuses = data.statuses;
49 vm.statuses = data.statuses;
49 vm.form.responsible = vm.assignees[0];
50 vm.form.responsible = vm.assignees[0];
@@ -52,8 +53,7 b' function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam'
52 }, function (error_data) {
53 }, function (error_data) {
53 if (error_data.data.error_messages) {
54 if (error_data.data.error_messages) {
54 vm.error_messages = error_data.data.error_messages;
55 vm.error_messages = error_data.data.error_messages;
55 }
56 } else {
56 else {
57 vm.error_messages = ['There was a problem processing your request'];
57 vm.error_messages = ['There was a problem processing your request'];
58 }
58 }
59 });
59 });
@@ -70,15 +70,13 b' function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam'
70 vm.loading = false;
70 vm.loading = false;
71 if (data.error_messages) {
71 if (data.error_messages) {
72 vm.error_messages = data.error_messages;
72 vm.error_messages = data.error_messages;
73 }
73 } else {
74 else {
75 $uibModalInstance.dismiss('success');
74 $uibModalInstance.dismiss('success');
76 }
75 }
77 }, function (error_data) {
76 }, function (error_data) {
78 if (error_data.data.error_messages) {
77 if (error_data.data.error_messages) {
79 vm.error_messages = error_data.data.error_messages;
78 vm.error_messages = error_data.data.error_messages;
80 }
79 } else {
81 else {
82 vm.error_messages = ['There was a problem processing your request'];
80 vm.error_messages = ['There was a problem processing your request'];
83 }
81 }
84 });
82 });
@@ -86,5 +84,4 b' function GithubIntegrationCtrl($uibModalInstance, $state, report, integrationNam'
86 vm.cancel = function () {
84 vm.cancel = function () {
87 $uibModalInstance.dismiss('cancel');
85 $uibModalInstance.dismiss('cancel');
88 };
86 };
89 vm.fetchInfo();
90 }
87 }
@@ -19,6 +19,7 b" JiraIntegrationCtrl.$inject = ['$uibModalInstance', '$state', 'report', 'integra"
19
19
20 function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
20 function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName, integrationResource) {
21 var vm = this;
21 var vm = this;
22 vm.$onInit = function () {
22 vm.loading = true;
23 vm.loading = true;
23 vm.assignees = [];
24 vm.assignees = [];
24 vm.report = report;
25 vm.report = report;
@@ -32,7 +33,8 b' function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName,'
32 'Issue created for report: ' +
33 'Issue created for report: ' +
33 $state.href('report.view_detail', {groupId:report.group_id, reportId:report.id}, {absolute:true})
34 $state.href('report.view_detail', {groupId: report.group_id, reportId: report.id}, {absolute: true})
34 };
35 };
35
36 vm.fetchInfo();
37 }
36 vm.fetchInfo = function () {
38 vm.fetchInfo = function () {
37 integrationResource.get({
39 integrationResource.get({
38 resourceId: vm.report.resource_id,
40 resourceId: vm.report.resource_id,
@@ -54,8 +56,7 b' function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName,'
54 console.log('ERROR');
56 console.log('ERROR');
55 if (error_data.data.error_messages) {
57 if (error_data.data.error_messages) {
56 vm.error_messages = error_data.data.error_messages;
58 vm.error_messages = error_data.data.error_messages;
57 }
59 } else {
58 else {
59 vm.error_messages = ['There was a problem processing your request'];
60 vm.error_messages = ['There was a problem processing your request'];
60 }
61 }
61 });
62 });
@@ -79,8 +80,7 b' function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName,'
79 }, function (error_data) {
80 }, function (error_data) {
80 if (error_data.data.error_messages) {
81 if (error_data.data.error_messages) {
81 vm.error_messages = error_data.data.error_messages;
82 vm.error_messages = error_data.data.error_messages;
82 }
83 } else {
83 else {
84 vm.error_messages = ['There was a problem processing your request'];
84 vm.error_messages = ['There was a problem processing your request'];
85 }
85 }
86 });
86 });
@@ -88,5 +88,4 b' function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName,'
88 vm.cancel = function () {
88 vm.cancel = function () {
89 $uibModalInstance.dismiss('cancel');
89 $uibModalInstance.dismiss('cancel');
90 };
90 };
91 vm.fetchInfo();
92 }
91 }
@@ -17,6 +17,7 b" AssignReportCtrl.$inject = ['$uibModalInstance', 'reportGroupPropertyResource', "
17
17
18 function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report) {
18 function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report) {
19 var vm = this;
19 var vm = this;
20 vm.$onInit = function () {
20 vm.loading = true;
21 vm.loading = true;
21 vm.assignedUsers = [];
22 vm.assignedUsers = [];
22 vm.unAssignedUsers = [];
23 vm.unAssignedUsers = [];
@@ -32,7 +33,8 b' function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report'
32 vm.loading = false;
33 vm.loading = false;
33 });
34 });
34 }
35 }
35
36 vm.fetchAssignments();
37 }
36 vm.reassignUser = function (user) {
38 vm.reassignUser = function (user) {
37 var is_assigned = vm.assignedUsers.indexOf(user);
39 var is_assigned = vm.assignedUsers.indexOf(user);
38 if (is_assigned != -1) {
40 if (is_assigned != -1) {
@@ -74,7 +76,4 b' function AssignReportCtrl($uibModalInstance, reportGroupPropertyResource, report'
74 vm.cancel = function () {
76 vm.cancel = function () {
75 $uibModalInstance.dismiss('cancel');
77 $uibModalInstance.dismiss('cancel');
76 };
78 };
77
78 vm.fetchAssignments();
79
80 }
79 }
@@ -21,6 +21,7 b" ApplicationPermissionsController.$inject = ['sectionViewResource',"
21
21
22 function ApplicationPermissionsController(sectionViewResource, applicationsPropertyResource , groupsResource) {
22 function ApplicationPermissionsController(sectionViewResource, applicationsPropertyResource , groupsResource) {
23 var vm = this;
23 var vm = this;
24 vm.$onInit = function () {
24 vm.form = {
25 vm.form = {
25 autocompleteUser: '',
26 autocompleteUser: '',
26 selectedGroup: null,
27 selectedGroup: null,
@@ -59,8 +60,7 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope'
59 if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) {
60 if (tmpObj[perm.type][perm.user_name].permissions.indexOf(perm.perm_name) === -1) {
60 tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name);
61 tmpObj[perm.type][perm.user_name].permissions.push(perm.perm_name);
61 }
62 }
62 }
63 } else {
63 else {
64 if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') {
64 if (typeof tmpObj[perm.type][perm.group_name] === 'undefined') {
65 tmpObj[perm.type][perm.group_name] = {
65 tmpObj[perm.type][perm.group_name] = {
66 self: perm,
66 self: perm,
@@ -77,8 +77,9 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope'
77 user: _.values(tmpObj.user),
77 user: _.values(tmpObj.user),
78 group: _.values(tmpObj.group),
78 group: _.values(tmpObj.group),
79 };
79 };
80
81 console.log('test', tmpObj, vm.currentPermissions);
80 console.log('test', tmpObj, vm.currentPermissions);
81 }
82
82
83
83 vm.searchUsers = function (searchPhrase) {
84 vm.searchUsers = function (searchPhrase) {
84 console.log('SEARCHING');
85 console.log('SEARCHING');
@@ -28,7 +28,9 b" angular.module('appenlight.directives.pluginConfig', []).directive('pluginConfig"
28 PluginConfig.$inject = ['stateHolder'];
28 PluginConfig.$inject = ['stateHolder'];
29
29
30 function PluginConfig(stateHolder) {
30 function PluginConfig(stateHolder) {
31 this.$onInit = function () {
31 this.plugins = {};
32 this.plugins = {};
32 this.inclusions = stateHolder.plugins.inclusions[this.section];
33 this.inclusions = stateHolder.plugins.inclusions[this.section];
33 }
34 }
35 }
34 });
36 });
@@ -24,8 +24,10 b" angular.module('appenlight.directives.postProcessAction', []).directive('postPro"
24 restrict: 'E',
24 restrict: 'E',
25 templateUrl: 'directives/postprocess_action/postprocess_action.html'
25 templateUrl: 'directives/postprocess_action/postprocess_action.html'
26 };
26 };
27
27 function postProcessActionController(){
28 function postProcessActionController() {
28 var vm = this;
29 var vm = this;
30 vm.$onInit = function () {
29 console.log(vm);
31 console.log(vm);
30 var allOps = {
32 var allOps = {
31 'eq': 'Equal',
33 'eq': 'Equal',
@@ -77,7 +79,7 b" angular.module('appenlight.directives.postProcessAction', []).directive('postPro"
77 ['1', 'Priority +1'],
79 ['1', 'Priority +1'],
78 ['-1', 'Priority -1']
80 ['-1', 'Priority -1']
79 ];
81 ];
80
82 }
81 vm.deleteAction = function (action) {
83 vm.deleteAction = function (action) {
82 applicationsPropertyResource.remove({
84 applicationsPropertyResource.remove({
83 pkey: vm.action.pkey,
85 pkey: vm.action.pkey,
@@ -27,8 +27,24 b" angular.module('appenlight.directives.reportAlertAction', []).directive('reportA"
27 restrict: 'E',
27 restrict: 'E',
28 templateUrl: 'directives/report_alert_action/report_alert_action.html'
28 templateUrl: 'directives/report_alert_action/report_alert_action.html'
29 };
29 };
30
30 function reportAlertActionController(){
31 function reportAlertActionController() {
31 var vm = this;
32 var vm = this;
33 vm.$onInit = function () {
34 vm.possibleNotifications = [
35 ['always', 'Always'],
36 ['only_first', 'Only New'],
37 ];
38
39 vm.possibleChannels = _.filter(vm.possibleChannels, function (c) {
40 return c.supports_report_alerting
41 }
42 );
43
44 if (vm.possibleChannels.length > 0) {
45 vm.channelToBind = vm.possibleChannels[0];
46 }
47 }
32 vm.deleteAction = function (actions, action) {
48 vm.deleteAction = function (actions, action) {
33 var get = {
49 var get = {
34 key: 'alert_channels_rules',
50 key: 'alert_channels_rules',
@@ -90,19 +106,6 b" angular.module('appenlight.directives.reportAlertAction', []).directive('reportA"
90 });
106 });
91 };
107 };
92
108
93 vm.possibleNotifications = [
94 ['always', 'Always'],
95 ['only_first', 'Only New'],
96 ];
97
98 vm.possibleChannels = _.filter(vm.possibleChannels, function(c){
99 return c.supports_report_alerting }
100 );
101
102 if (vm.possibleChannels.length > 0){
103 vm.channelToBind = vm.possibleChannels[0];
104 }
105
106 vm.setDirty = function() {
109 vm.setDirty = function () {
107 vm.action.dirty = true;
110 vm.action.dirty = true;
108 console.log('set dirty');
111 console.log('set dirty');
@@ -29,10 +29,10 b" angular.module('appenlight.directives.rule', []).directive('rule', function () {"
29 };
29 };
30 function RuleController(){
30 function RuleController(){
31 var vm = this;
31 var vm = this;
32
32 vm.$onInit = function () {
33 vm.rule.dirty = false;
33 vm.rule.dirty = false;
34 vm.oldField = vm.rule.field;
34 vm.oldField = vm.rule.field;
35
35 }
36 vm.add = function () {
36 vm.add = function () {
37 vm.rule.rules.push(
37 vm.rule.rules.push(
38 {op: "eq", field: 'http_status', value: ""}
38 {op: "eq", field: 'http_status', value: ""}
@@ -27,12 +27,15 b" angular.module('appenlight.directives.ruleReadOnly', []).directive('ruleReadOnly"
27 controller:RuleController,
27 controller: RuleController,
28 controllerAs:'rule_ctrlr'
28 controllerAs: 'rule_ctrlr'
29 }
29 }
30
30 function RuleController(){
31 function RuleController() {
31 var vm = this;
32 var vm = this;
33 vm.$onInit = function () {
32 vm.readOnlyPossibleFields = {};
34 vm.readOnlyPossibleFields = {};
33 var labelPairs = _.pairs(vm.parentObj.config);
35 var labelPairs = _.pairs(vm.parentObj.config);
34 _.each(labelPairs, function (entry) {
36 _.each(labelPairs, function (entry) {
35 vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label;
37 vm.readOnlyPossibleFields[entry[0]] = entry[1].human_label;
36 });
38 });
37 }
39 }
40 }
38 }]);
41 }]);
General Comments 0
You need to be logged in to leave comments. Login now