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