Show More
@@ -2547,7 +2547,7 b' function decodeEncodedJSON (input){' | |||||
2547 | delete doc; |
|
2547 | delete doc; | |
2548 | return val; |
|
2548 | return val; | |
2549 | }catch(exc){ |
|
2549 | }catch(exc){ | |
2550 | console.error('decodeEncodedJSON:' + exc + ' input:' + input); |
|
2550 | ||
2551 | delete doc; |
|
2551 | delete doc; | |
2552 | } |
|
2552 | } | |
2553 | } |
|
2553 | } | |
@@ -2600,16 +2600,16 b' function timeSpanToStartDate(timeSpan){' | |||||
2600 | /* Sets server validation messages on form using angular machinery + |
|
2600 | /* Sets server validation messages on form using angular machinery + | |
2601 | * custom key holding actual error messages */ |
|
2601 | * custom key holding actual error messages */ | |
2602 | function setServerValidation(form, errors){ |
|
2602 | function setServerValidation(form, errors){ | |
2603 | console.log('form', form); |
|
2603 | ||
2604 | if (typeof form.ae_validation === 'undefined'){ |
|
2604 | if (typeof form.ae_validation === 'undefined'){ | |
2605 | form.ae_validation = {}; |
|
2605 | form.ae_validation = {}; | |
2606 | console.log('create ae_validation key'); |
|
2606 | ||
2607 | } |
|
2607 | } | |
2608 | for (var key in form.ae_validation){ |
|
2608 | for (var key in form.ae_validation){ | |
2609 | form.ae_validation[key] = []; |
|
2609 | form.ae_validation[key] = []; | |
2610 | console.log('clear key:', key); |
|
2610 | ||
2611 | } |
|
2611 | } | |
2612 | console.log('errors:',errors); |
|
2612 | ||
2613 |
|
2613 | |||
2614 | for (var key in form){ |
|
2614 | for (var key in form){ | |
2615 | if (key[0] !== '$' && key !== 'ae_validation'){ |
|
2615 | if (key[0] !== '$' && key !== 'ae_validation'){ | |
@@ -2814,7 +2814,7 b' function kickstartAE(initialUserData) {' | |||||
2814 |
|
2814 | |||
2815 | app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig', |
|
2815 | app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig', | |
2816 | function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) { |
|
2816 | function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) { | |
2817 | console.log('appenlight run()'); |
|
2817 | ||
2818 | if (initialUserData){ |
|
2818 | if (initialUserData){ | |
2819 | stateHolder.AeUser.update(initialUserData); |
|
2819 | stateHolder.AeUser.update(initialUserData); | |
2820 |
|
2820 | |||
@@ -2850,7 +2850,7 b' function kickstartAE(initialUserData) {' | |||||
2850 | AeConfig.urls.otherRoutes.lostPassword, |
|
2850 | AeConfig.urls.otherRoutes.lostPassword, | |
2851 | AeConfig.urls.otherRoutes.lostPasswordGenerate |
|
2851 | AeConfig.urls.otherRoutes.lostPasswordGenerate | |
2852 | ]; |
|
2852 | ]; | |
2853 | console.log('$transitions.onBefore', path, $transition$.to().name, $state); |
|
2853 | ||
2854 | _.each(openViews, function (url) { |
|
2854 | _.each(openViews, function (url) { | |
2855 | var url = '/' + url.split('/').slice(3).join('/'); |
|
2855 | var url = '/' + url.split('/').slice(3).join('/'); | |
2856 | if (url === path) { |
|
2856 | if (url === path) { | |
@@ -2859,7 +2859,7 b' function kickstartAE(initialUserData) {' | |||||
2859 | }); |
|
2859 | }); | |
2860 | if (stateHolder.AeUser.id === null && !isGuestState && !isOpenView) { |
|
2860 | if (stateHolder.AeUser.id === null && !isGuestState && !isOpenView) { | |
2861 | if (window.location.toString().indexOf(AeConfig.urls.otherRoutes.register) === -1) { |
|
2861 | if (window.location.toString().indexOf(AeConfig.urls.otherRoutes.register) === -1) { | |
2862 | console.log('redirect to register'); |
|
2862 | ||
2863 | var newLocation = AeConfig.urls.otherRoutes.register + '?came_from=' + encodeURIComponent(window.location); |
|
2863 | var newLocation = AeConfig.urls.otherRoutes.register + '?came_from=' + encodeURIComponent(window.location); | |
2864 | // fix infinite digest here |
|
2864 | // fix infinite digest here | |
2865 | $rootScope.$on('$locationChangeStart', |
|
2865 | $rootScope.$on('$locationChangeStart', | |
@@ -7197,7 +7197,7 b" angular.module('appenlight.components.appenlightApp', [])" | |||||
7197 | AppEnlightAppController.$inject = ['$scope','$state', 'stateHolder', 'AeConfig']; |
|
7197 | AppEnlightAppController.$inject = ['$scope','$state', 'stateHolder', 'AeConfig']; | |
7198 |
|
7198 | |||
7199 | function AppEnlightAppController($scope, $state, stateHolder, AeConfig){ |
|
7199 | function AppEnlightAppController($scope, $state, stateHolder, AeConfig){ | |
7200 | console.log('app start'); |
|
7200 | ||
7201 | // to keep bw compatibility |
|
7201 | // to keep bw compatibility | |
7202 | $scope.$state = $state; |
|
7202 | $scope.$state = $state; | |
7203 | $scope.stateHolder = stateHolder; |
|
7203 | $scope.stateHolder = stateHolder; | |
@@ -7293,7 +7293,7 b' function AppEnlightHeaderController($state, stateHolder, AeConfig){' | |||||
7293 | $state.go('uptime', {resource:event.resource_id, start_date:event.start_date}); |
|
7293 | $state.go('uptime', {resource:event.resource_id, start_date:event.start_date}); | |
7294 | } |
|
7294 | } | |
7295 | else{ |
|
7295 | else{ | |
7296 | console.log('other'); |
|
7296 | ||
7297 | } |
|
7297 | } | |
7298 | } |
|
7298 | } | |
7299 | } |
|
7299 | } | |
@@ -7334,13 +7334,13 b' function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResour' | |||||
7334 | userSelfPropertyResource.get({key: 'websocket'}, function (data) { |
|
7334 | userSelfPropertyResource.get({key: 'websocket'}, function (data) { | |
7335 | stateHolder.websocket = new ReconnectingWebSocket(this.config.ws_url + '/ws?conn_id=' + data.conn_id); |
|
7335 | stateHolder.websocket = new ReconnectingWebSocket(this.config.ws_url + '/ws?conn_id=' + data.conn_id); | |
7336 | stateHolder.websocket.onopen = function (event) { |
|
7336 | stateHolder.websocket.onopen = function (event) { | |
7337 | console.log('open'); |
|
7337 | ||
7338 | }; |
|
7338 | }; | |
7339 | stateHolder.websocket.onmessage = function (event) { |
|
7339 | stateHolder.websocket.onmessage = function (event) { | |
7340 | var data = JSON.parse(event.data); |
|
7340 | var data = JSON.parse(event.data); | |
7341 | $rootScope.$apply(function (scope) { |
|
7341 | $rootScope.$apply(function (scope) { | |
7342 | _.each(data, function (message) { |
|
7342 | _.each(data, function (message) { | |
7343 | console.log('channelstream-message', message); |
|
7343 | ||
7344 | if(typeof message.message.topic !== 'undefined'){ |
|
7344 | if(typeof message.message.topic !== 'undefined'){ | |
7345 | $rootScope.$emit( |
|
7345 | $rootScope.$emit( | |
7346 | 'channelstream-message.'+message.message.topic, message); |
|
7346 | 'channelstream-message.'+message.message.topic, message); | |
@@ -7352,11 +7352,11 b' function ChannelstreamController($rootScope, stateHolder, userSelfPropertyResour' | |||||
7352 | }); |
|
7352 | }); | |
7353 | }; |
|
7353 | }; | |
7354 | stateHolder.websocket.onclose = function (event) { |
|
7354 | stateHolder.websocket.onclose = function (event) { | |
7355 | console.log('closed'); |
|
7355 | ||
7356 | }; |
|
7356 | }; | |
7357 |
|
7357 | |||
7358 | stateHolder.websocket.onerror = function (event) { |
|
7358 | stateHolder.websocket.onerror = function (event) { | |
7359 | console.log('error'); |
|
7359 | ||
7360 | }; |
|
7360 | }; | |
7361 | }.bind(this)); |
|
7361 | }.bind(this)); | |
7362 | } |
|
7362 | } | |
@@ -7389,7 +7389,7 b" angular.module('appenlight.components.adminApplicationsListView', [])" | |||||
7389 | AdminApplicationsListController.$inject = ['applicationsResource']; |
|
7389 | AdminApplicationsListController.$inject = ['applicationsResource']; | |
7390 |
|
7390 | |||
7391 | function AdminApplicationsListController(applicationsResource) { |
|
7391 | function AdminApplicationsListController(applicationsResource) { | |
7392 | console.debug('AdminApplicationsListController'); |
|
7392 | ||
7393 | var vm = this; |
|
7393 | var vm = this; | |
7394 | vm.loading = {applications: true}; |
|
7394 | vm.loading = {applications: true}; | |
7395 |
|
7395 | |||
@@ -7491,7 +7491,7 b" angular.module('appenlight.components.adminGroupsCreateView', [])" | |||||
7491 | AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource']; |
|
7491 | AdminGroupsCreateViewController.$inject = ['$state', 'groupsResource', 'groupsPropertyResource', 'sectionViewResource']; | |
7492 |
|
7492 | |||
7493 | function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) { |
|
7493 | function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyResource, sectionViewResource) { | |
7494 | console.debug('AdminGroupsCreateController'); |
|
7494 | ||
7495 | var vm = this; |
|
7495 | var vm = this; | |
7496 | vm.$state = $state; |
|
7496 | vm.$state = $state; | |
7497 | vm.loading = { |
|
7497 | vm.loading = { | |
@@ -7522,7 +7522,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR' | |||||
7522 | } |
|
7522 | } | |
7523 | }; |
|
7523 | }; | |
7524 | _.each(data, function (item) { |
|
7524 | _.each(data, function (item) { | |
7525 |
|
|
7525 | ||
7526 | var section = tmpObj[item.type][item.resource_type]; |
|
7526 | var section = tmpObj[item.type][item.resource_type]; | |
7527 | if (typeof section[item.resource_id] == 'undefined') { |
|
7527 | if (typeof section[item.resource_id] == 'undefined') { | |
7528 | section[item.resource_id] = { |
|
7528 | section[item.resource_id] = { | |
@@ -7533,7 +7533,6 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR' | |||||
7533 | section[item.resource_id].permissions.push(item.perm_name); |
|
7533 | section[item.resource_id].permissions.push(item.perm_name); | |
7534 |
|
7534 | |||
7535 | }); |
|
7535 | }); | |
7536 | console.log(tmpObj) |
|
|||
7537 | vm.resourcePermissions = tmpObj; |
|
7536 | vm.resourcePermissions = tmpObj; | |
7538 | }); |
|
7537 | }); | |
7539 |
|
7538 | |||
@@ -7598,7 +7597,7 b' function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR' | |||||
7598 | } |
|
7597 | } | |
7599 |
|
7598 | |||
7600 | vm.searchUsers = function (searchPhrase) { |
|
7599 | vm.searchUsers = function (searchPhrase) { | |
7601 | console.log(searchPhrase); |
|
7600 | ||
7602 | return sectionViewResource.query({ |
|
7601 | return sectionViewResource.query({ | |
7603 | section: 'users_section', |
|
7602 | section: 'users_section', | |
7604 | view: 'search_users', |
|
7603 | view: 'search_users', | |
@@ -7639,7 +7638,7 b" angular.module('appenlight.components.adminGroupsListView', [])" | |||||
7639 | AdminGroupsListViewController.$inject = ['$state', 'groupsResource']; |
|
7638 | AdminGroupsListViewController.$inject = ['$state', 'groupsResource']; | |
7640 |
|
7639 | |||
7641 | function AdminGroupsListViewController($state, groupsResource) { |
|
7640 | function AdminGroupsListViewController($state, groupsResource) { | |
7642 | console.debug('AdminGroupsListViewController'); |
|
7641 | ||
7643 | var vm = this; |
|
7642 | var vm = this; | |
7644 | vm.$state = $state; |
|
7643 | vm.$state = $state; | |
7645 | vm.loading = {groups: true}; |
|
7644 | vm.loading = {groups: true}; | |
@@ -7652,13 +7651,13 b' function AdminGroupsListViewController($state, groupsResource) {' | |||||
7652 | } |
|
7651 | } | |
7653 | return memo; |
|
7652 | return memo; | |
7654 | }, 0); |
|
7653 | }, 0); | |
7655 | console.log(vm.groups); |
|
7654 | ||
7656 | }); |
|
7655 | }); | |
7657 |
|
7656 | |||
7658 |
|
7657 | |||
7659 | vm.removeGroup = function (group) { |
|
7658 | vm.removeGroup = function (group) { | |
7660 | groupsResource.remove({groupId: group.id}, function (data, responseHeaders) { |
|
7659 | groupsResource.remove({groupId: group.id}, function (data, responseHeaders) { | |
7661 | console.log('x',data, responseHeaders()); |
|
7660 | ||
7662 | if (data) { |
|
7661 | if (data) { | |
7663 | var index = vm.groups.indexOf(group); |
|
7662 | var index = vm.groups.indexOf(group); | |
7664 | if (index !== -1) { |
|
7663 | if (index !== -1) { | |
@@ -7733,7 +7732,7 b' function AdminPartitionsViewController(sectionViewResource) {' | |||||
7733 | else { |
|
7732 | else { | |
7734 | var val = false; |
|
7733 | var val = false; | |
7735 | } |
|
7734 | } | |
7736 | console.log('scope', scope); |
|
7735 | ||
7737 | _.each(vm[scope], function (item) { |
|
7736 | _.each(vm[scope], function (item) { | |
7738 | _.each(item[1].pg, function (index) { |
|
7737 | _.each(item[1].pg, function (index) { | |
7739 | index.checked = val; |
|
7738 | index.checked = val; | |
@@ -7785,7 +7784,7 b' function AdminPartitionsViewController(sectionViewResource) {' | |||||
7785 | } |
|
7784 | } | |
7786 | }); |
|
7785 | }); | |
7787 | }); |
|
7786 | }); | |
7788 | console.log(es_indices, pg_indices); |
|
7787 | ||
7789 |
|
7788 | |||
7790 | vm.loading = {partitions: true}; |
|
7789 | vm.loading = {partitions: true}; | |
7791 | sectionViewResource.save({section:'admin_section', |
|
7790 | sectionViewResource.save({section:'admin_section', | |
@@ -7876,7 +7875,7 b" angular.module('appenlight.components.adminUsersCreateView', [])" | |||||
7876 | AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig']; |
|
7875 | AdminUsersCreateViewController.$inject = ['$state', 'usersResource', 'usersPropertyResource', 'sectionViewResource', 'AeConfig']; | |
7877 |
|
7876 | |||
7878 | function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) { |
|
7877 | function AdminUsersCreateViewController($state, usersResource, usersPropertyResource, sectionViewResource, AeConfig) { | |
7879 | console.debug('AdminUsersCreateViewController'); |
|
7878 | ||
7880 | var vm = this; |
|
7879 | var vm = this; | |
7881 | vm.$state = $state; |
|
7880 | vm.$state = $state; | |
7882 | vm.loading = {user: false}; |
|
7881 | vm.loading = {user: false}; | |
@@ -7907,7 +7906,7 b' function AdminUsersCreateViewController($state, usersResource, usersPropertyReso' | |||||
7907 | } |
|
7906 | } | |
7908 | }; |
|
7907 | }; | |
7909 | _.each(data, function (item) { |
|
7908 | _.each(data, function (item) { | |
7910 |
|
|
7909 | ||
7911 | var section = tmpObj[item.type][item.resource_type]; |
|
7910 | var section = tmpObj[item.type][item.resource_type]; | |
7912 | if (typeof section[item.resource_id] == 'undefined'){ |
|
7911 | if (typeof section[item.resource_id] == 'undefined'){ | |
7913 | section[item.resource_id] = { |
|
7912 | section[item.resource_id] = { | |
@@ -7918,7 +7917,6 b' function AdminUsersCreateViewController($state, usersResource, usersPropertyReso' | |||||
7918 | section[item.resource_id].permissions.push(item.perm_name); |
|
7917 | section[item.resource_id].permissions.push(item.perm_name); | |
7919 |
|
7918 | |||
7920 | }); |
|
7919 | }); | |
7921 | console.log(tmpObj) |
|
|||
7922 | vm.resourcePermissions = tmpObj; |
|
7920 | vm.resourcePermissions = tmpObj; | |
7923 | }); |
|
7921 | }); | |
7924 |
|
7922 | |||
@@ -7939,7 +7937,7 b' function AdminUsersCreateViewController($state, usersResource, usersPropertyReso' | |||||
7939 |
|
7937 | |||
7940 | vm.createUser = function () { |
|
7938 | vm.createUser = function () { | |
7941 | vm.loading.user = true; |
|
7939 | vm.loading.user = true; | |
7942 | console.log('updateProfile'); |
|
7940 | ||
7943 | if (userId) { |
|
7941 | if (userId) { | |
7944 | usersResource.update({userId: vm.user.id}, vm.user, function (data) { |
|
7942 | usersResource.update({userId: vm.user.id}, vm.user, function (data) { | |
7945 | setServerValidation(vm.profileForm); |
|
7943 | setServerValidation(vm.profileForm); | |
@@ -7961,7 +7959,7 b' function AdminUsersCreateViewController($state, usersResource, usersPropertyReso' | |||||
7961 | vm.gen_pass += charset.charAt(Math.floor(Math.random() * n)); |
|
7959 | vm.gen_pass += charset.charAt(Math.floor(Math.random() * n)); | |
7962 | } |
|
7960 | } | |
7963 | vm.user.user_password = '' + vm.gen_pass; |
|
7961 | vm.user.user_password = '' + vm.gen_pass; | |
7964 | console.log('x', vm.gen_pass); |
|
7962 | ||
7965 | } |
|
7963 | } | |
7966 |
|
7964 | |||
7967 | vm.reloginUser = function () { |
|
7965 | vm.reloginUser = function () { | |
@@ -8003,7 +8001,7 b" angular.module('appenlight.components.adminUsersListView', [])" | |||||
8003 | AdminUserListViewController.$inject = ['usersResource']; |
|
8001 | AdminUserListViewController.$inject = ['usersResource']; | |
8004 |
|
8002 | |||
8005 | function AdminUserListViewController(usersResource) { |
|
8003 | function AdminUserListViewController(usersResource) { | |
8006 | console.debug('AdminUsersController'); |
|
8004 | ||
8007 | var vm = this; |
|
8005 | var vm = this; | |
8008 | vm.loading = {users: true}; |
|
8006 | vm.loading = {users: true}; | |
8009 |
|
8007 | |||
@@ -8015,13 +8013,13 b' function AdminUserListViewController(usersResource) {' | |||||
8015 | } |
|
8013 | } | |
8016 | return memo; |
|
8014 | return memo; | |
8017 | }, 0); |
|
8015 | }, 0); | |
8018 | console.log(vm.users); |
|
8016 | ||
8019 | }); |
|
8017 | }); | |
8020 |
|
8018 | |||
8021 |
|
8019 | |||
8022 | vm.removeUser = function (user) { |
|
8020 | vm.removeUser = function (user) { | |
8023 | usersResource.remove({userId: user.id}, function (data, responseHeaders) { |
|
8021 | usersResource.remove({userId: user.id}, function (data, responseHeaders) { | |
8024 | console.log('x',data, responseHeaders()); |
|
8022 | ||
8025 | if (data) { |
|
8023 | if (data) { | |
8026 | var index = vm.users.indexOf(user); |
|
8024 | var index = vm.users.indexOf(user); | |
8027 | if (index !== -1) { |
|
8025 | if (index !== -1) { | |
@@ -8094,7 +8092,7 b" angular.module('appenlight.components.integrationsListView', [])" | |||||
8094 | IntegrationsListViewController.$inject = ['$state', 'applicationsResource']; |
|
8092 | IntegrationsListViewController.$inject = ['$state', 'applicationsResource']; | |
8095 |
|
8093 | |||
8096 | function IntegrationsListViewController($state, applicationsResource) { |
|
8094 | function IntegrationsListViewController($state, applicationsResource) { | |
8097 | console.debug('IntegrationsListController'); |
|
8095 | ||
8098 | var vm = this; |
|
8096 | var vm = this; | |
8099 | vm.loading = {application: true}; |
|
8097 | vm.loading = {application: true}; | |
8100 | vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) { |
|
8098 | vm.resource = applicationsResource.get({resourceId: $state.params.resourceId}, function (data) { | |
@@ -8131,7 +8129,7 b" angular.module('appenlight.components.applicationsListView', [])" | |||||
8131 | ApplicationsListViewController.$inject = ['$state', 'applicationsResource']; |
|
8129 | ApplicationsListViewController.$inject = ['$state', 'applicationsResource']; | |
8132 |
|
8130 | |||
8133 | function ApplicationsListViewController($state, applicationsResource) { |
|
8131 | function ApplicationsListViewController($state, applicationsResource) { | |
8134 | console.debug('ApplicationsListController'); |
|
8132 | ||
8135 | var vm = this; |
|
8133 | var vm = this; | |
8136 | vm.$state = $state; |
|
8134 | vm.$state = $state; | |
8137 | vm.loading = {applications: true}; |
|
8135 | vm.loading = {applications: true}; | |
@@ -8168,7 +8166,7 b" angular.module('appenlight.components.applicationsPurgeLogsView', [])" | |||||
8168 | applicationsPurgeLogsViewController.$inject = ['$state' ,'applicationsResource', 'sectionViewResource', 'logsNoIdResource']; |
|
8166 | applicationsPurgeLogsViewController.$inject = ['$state' ,'applicationsResource', 'sectionViewResource', 'logsNoIdResource']; | |
8169 |
|
8167 | |||
8170 | function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) { |
|
8168 | function applicationsPurgeLogsViewController($state, applicationsResource, sectionViewResource, logsNoIdResource) { | |
8171 | console.debug('applicationsPurgeLogsViewController'); |
|
8169 | ||
8172 | var vm = this; |
|
8170 | var vm = this; | |
8173 | vm.$state = $state; |
|
8171 | vm.$state = $state; | |
8174 | vm.loading = {applications: true}; |
|
8172 | vm.loading = {applications: true}; | |
@@ -8234,7 +8232,7 b" applicationsUpdateViewController.$inject = ['$state', 'applicationsNoIdResource'" | |||||
8234 |
|
8232 | |||
8235 | function applicationsUpdateViewController($state, applicationsNoIdResource, applicationsResource, applicationsPropertyResource, stateHolder, AeConfig) { |
|
8233 | function applicationsUpdateViewController($state, applicationsNoIdResource, applicationsResource, applicationsPropertyResource, stateHolder, AeConfig) { | |
8236 | 'use strict'; |
|
8234 | 'use strict'; | |
8237 | console.debug('applicationsUpdateView'); |
|
8235 | ||
8238 | var vm = this; |
|
8236 | var vm = this; | |
8239 | vm.AeConfig = AeConfig; |
|
8237 | vm.AeConfig = AeConfig; | |
8240 | vm.$state = $state; |
|
8238 | vm.$state = $state; | |
@@ -8283,7 +8281,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl' | |||||
8283 | setServerValidation(vm.BasicForm, response.data); |
|
8281 | setServerValidation(vm.BasicForm, response.data); | |
8284 | } |
|
8282 | } | |
8285 | vm.loading.application = false; |
|
8283 | vm.loading.application = false; | |
8286 | console.log(vm.BasicForm); |
|
8284 | ||
8287 | }); |
|
8285 | }); | |
8288 | } |
|
8286 | } | |
8289 | else { |
|
8287 | else { | |
@@ -8302,7 +8300,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl' | |||||
8302 | }; |
|
8300 | }; | |
8303 |
|
8301 | |||
8304 | vm.addRule = function () { |
|
8302 | vm.addRule = function () { | |
8305 | console.log('addrule'); |
|
8303 | ||
8306 | applicationsPropertyResource.save({ |
|
8304 | applicationsPropertyResource.save({ | |
8307 | resourceId: vm.resource.resource_id, |
|
8305 | resourceId: vm.resource.resource_id, | |
8308 | key: 'postprocessing_rules' |
|
8306 | key: 'postprocessing_rules' | |
@@ -8328,7 +8326,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl' | |||||
8328 | function (response) { |
|
8326 | function (response) { | |
8329 | if (response.status == 422) { |
|
8327 | if (response.status == 422) { | |
8330 | setServerValidation(vm.regenerateAPIKeysForm, response.data); |
|
8328 | setServerValidation(vm.regenerateAPIKeysForm, response.data); | |
8331 |
|
|
8329 | ||
8332 | } |
|
8330 | } | |
8333 | vm.loading.application = false; |
|
8331 | vm.loading.application = false; | |
8334 | } |
|
8332 | } | |
@@ -8348,7 +8346,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl' | |||||
8348 | function (response) { |
|
8346 | function (response) { | |
8349 | if (response.status == 422) { |
|
8347 | if (response.status == 422) { | |
8350 | setServerValidation(vm.formDelete, response.data); |
|
8348 | setServerValidation(vm.formDelete, response.data); | |
8351 |
|
|
8349 | ||
8352 | } |
|
8350 | } | |
8353 | vm.loading.application = false; |
|
8351 | vm.loading.application = false; | |
8354 | } |
|
8352 | } | |
@@ -8367,7 +8365,7 b' function applicationsUpdateViewController($state, applicationsNoIdResource, appl' | |||||
8367 | function (response) { |
|
8365 | function (response) { | |
8368 | if (response.status == 422) { |
|
8366 | if (response.status == 422) { | |
8369 | setServerValidation(vm.formTransfer, response.data); |
|
8367 | setServerValidation(vm.formTransfer, response.data); | |
8370 |
|
|
8368 | ||
8371 | } |
|
8369 | } | |
8372 | vm.loading.application = false; |
|
8370 | vm.loading.application = false; | |
8373 | } |
|
8371 | } | |
@@ -8417,7 +8415,7 b' function EventBrowserController(eventsNoIdResource, eventsResource) {' | |||||
8417 |
|
8415 | |||
8418 |
|
8416 | |||
8419 | vm.closeEvent = function (event) { |
|
8417 | vm.closeEvent = function (event) { | |
8420 | console.log('closeEvent'); |
|
8418 | ||
8421 | eventsResource.update({eventId: event.id}, {status: 0}, function (data) { |
|
8419 | eventsResource.update({eventId: event.id}, {status: 0}, function (data) { | |
8422 | event.status = 0; |
|
8420 | event.status = 0; | |
8423 | }); |
|
8421 | }); | |
@@ -8839,7 +8837,7 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte' | |||||
8839 |
|
8837 | |||
8840 | if (!vm.resource){ |
|
8838 | if (!vm.resource){ | |
8841 | var cookieResource = $cookies.getObject('resource'); |
|
8839 | var cookieResource = $cookies.getObject('resource'); | |
8842 | console.log('cookieResource', cookieResource); |
|
8840 | ||
8843 |
|
8841 | |||
8844 | if (cookieResource) { |
|
8842 | if (cookieResource) { | |
8845 | vm.resource = cookieResource; |
|
8843 | vm.resource = cookieResource; | |
@@ -9115,7 +9113,7 b' function IndexDashboardController($rootScope, $scope, $location, $cookies, $inte' | |||||
9115 | ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationResource']; |
|
9113 | ApplicationsIntegrationsEditViewController.$inject = ['$state', 'integrationResource']; | |
9116 |
|
9114 | |||
9117 | function ApplicationsIntegrationsEditViewController($state, integrationResource) { |
|
9115 | function ApplicationsIntegrationsEditViewController($state, integrationResource) { | |
9118 | console.debug('IntegrationController'); |
|
9116 | ||
9119 | var vm = this; |
|
9117 | var vm = this; | |
9120 | vm.$state = $state; |
|
9118 | vm.$state = $state; | |
9121 | vm.loading = {integration: true}; |
|
9119 | vm.loading = {integration: true}; | |
@@ -9176,7 +9174,7 b' function ApplicationsIntegrationsEditViewController($state, integrationResource)' | |||||
9176 | }); |
|
9174 | }); | |
9177 | } |
|
9175 | } | |
9178 |
|
9176 | |||
9179 | console.log(vm); |
|
9177 | ||
9180 | } |
|
9178 | } | |
9181 |
|
9179 | |||
9182 | ;angular.module('appenlight.components.bitbucketIntegrationConfigView', []) |
|
9180 | ;angular.module('appenlight.components.bitbucketIntegrationConfigView', []) | |
@@ -9491,7 +9489,7 b' function LogsBrowserController($location, stateHolder, typeAheadTagHelper, logsN' | |||||
9491 | searchParams['view'] = 'fetch_series'; |
|
9489 | searchParams['view'] = 'fetch_series'; | |
9492 | vm.isLoading.series = true; |
|
9490 | vm.isLoading.series = true; | |
9493 | sectionViewResource.query(searchParams, function (data) { |
|
9491 | sectionViewResource.query(searchParams, function (data) { | |
9494 | console.log('show node here'); |
|
9492 | ||
9495 | vm.logEventsChartData = { |
|
9493 | vm.logEventsChartData = { | |
9496 | json: data, |
|
9494 | json: data, | |
9497 | xFormat: '%Y-%m-%dT%H:%M:%S', |
|
9495 | xFormat: '%Y-%m-%dT%H:%M:%S', | |
@@ -9654,7 +9652,7 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r' | |||||
9654 | }; |
|
9652 | }; | |
9655 |
|
9653 | |||
9656 | vm.searchTag = function (tag, value) { |
|
9654 | vm.searchTag = function (tag, value) { | |
9657 | console.log(tag, value); |
|
9655 | ||
9658 | if (vm.report.report_type === 3) { |
|
9656 | if (vm.report.report_type === 3) { | |
9659 | $location.url($state.href('report.list_slow')); |
|
9657 | $location.url($state.href('report.list_slow')); | |
9660 | } |
|
9658 | } | |
@@ -9744,7 +9742,7 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r' | |||||
9744 | vm.selectedTab($cookies.selectedReportTab); |
|
9742 | vm.selectedTab($cookies.selectedReportTab); | |
9745 |
|
9743 | |||
9746 | }, function (response) { |
|
9744 | }, function (response) { | |
9747 | console.log(response); |
|
9745 | ||
9748 | if (response.status == 403) { |
|
9746 | if (response.status == 403) { | |
9749 | var uid = response.headers('x-appenlight-uid'); |
|
9747 | var uid = response.headers('x-appenlight-uid'); | |
9750 | if (!uid) { |
|
9748 | if (!uid) { | |
@@ -9841,7 +9839,7 b' function ReportViewController($window, $location, $state, $uibModal, $cookies, r' | |||||
9841 | }; |
|
9839 | }; | |
9842 |
|
9840 | |||
9843 | vm.runIntegration = function (integration_name) { |
|
9841 | vm.runIntegration = function (integration_name) { | |
9844 | console.log(integration_name); |
|
9842 | ||
9845 | if (integration_name == 'bitbucket') { |
|
9843 | if (integration_name == 'bitbucket') { | |
9846 | var controller = 'BitbucketIntegrationCtrl as ctrl'; |
|
9844 | var controller = 'BitbucketIntegrationCtrl as ctrl'; | |
9847 | var template_url = 'templates/integrations/bitbucket.html'; |
|
9845 | var template_url = 'templates/integrations/bitbucket.html'; | |
@@ -10176,7 +10174,7 b' function reportsBrowserViewController($location, $cookies, stateHolder,' | |||||
10176 | vm.is_loading = true; |
|
10174 | vm.is_loading = true; | |
10177 | reportsResource.query(searchParams, function (data, getResponseHeaders) { |
|
10175 | reportsResource.query(searchParams, function (data, getResponseHeaders) { | |
10178 | var headers = getResponseHeaders(); |
|
10176 | var headers = getResponseHeaders(); | |
10179 | console.log(headers); |
|
10177 | ||
10180 | vm.is_loading = false; |
|
10178 | vm.is_loading = false; | |
10181 | vm.reportsPage = _.map(data, function (item) { |
|
10179 | vm.reportsPage = _.map(data, function (item) { | |
10182 | return reportPresentation(item); |
|
10180 | return reportPresentation(item); | |
@@ -10200,7 +10198,7 b' function reportsBrowserViewController($location, $cookies, stateHolder,' | |||||
10200 | vm.searchParams = parseSearchToTags($location.search()); |
|
10198 | vm.searchParams = parseSearchToTags($location.search()); | |
10201 | vm.page = Number(vm.searchParams.page) || 1; |
|
10199 | vm.page = Number(vm.searchParams.page) || 1; | |
10202 | var params = parseTagsToSearch(vm.searchParams); |
|
10200 | var params = parseTagsToSearch(vm.searchParams); | |
10203 | console.log(params); |
|
10201 | ||
10204 | vm.fetchReports(params); |
|
10202 | vm.fetchReports(params); | |
10205 | }; |
|
10203 | }; | |
10206 | // initial load |
|
10204 | // initial load | |
@@ -10475,7 +10473,7 b' function ReportsSlowBrowserViewController($location, $cookies, stateHolder, type' | |||||
10475 | vm.is_loading = true; |
|
10473 | vm.is_loading = true; | |
10476 | slowReportsResource.query(searchParams, function (data, getResponseHeaders) { |
|
10474 | slowReportsResource.query(searchParams, function (data, getResponseHeaders) { | |
10477 | var headers = getResponseHeaders(); |
|
10475 | var headers = getResponseHeaders(); | |
10478 | console.log(headers); |
|
10476 | ||
10479 | vm.is_loading = false; |
|
10477 | vm.is_loading = false; | |
10480 | vm.reportsPage = _.map(data, function (item) { |
|
10478 | vm.reportsPage = _.map(data, function (item) { | |
10481 | return reportPresentation(item); |
|
10479 | return reportPresentation(item); | |
@@ -10566,7 +10564,7 b" angular.module('appenlight.components.userAlertChannelsEmailNewView', [])" | |||||
10566 | AlertChannelsEmailController.$inject = ['$state','userSelfPropertyResource']; |
|
10564 | AlertChannelsEmailController.$inject = ['$state','userSelfPropertyResource']; | |
10567 |
|
10565 | |||
10568 | function AlertChannelsEmailController($state, userSelfPropertyResource) { |
|
10566 | function AlertChannelsEmailController($state, userSelfPropertyResource) { | |
10569 | console.debug('AlertChannelsEmailController'); |
|
10567 | ||
10570 | var vm = this; |
|
10568 | var vm = this; | |
10571 | vm.$state = $state; |
|
10569 | vm.$state = $state; | |
10572 | vm.loading = {email: false}; |
|
10570 | vm.loading = {email: false}; | |
@@ -10574,7 +10572,7 b' function AlertChannelsEmailController($state, userSelfPropertyResource) {' | |||||
10574 |
|
10572 | |||
10575 | vm.createChannel = function () { |
|
10573 | vm.createChannel = function () { | |
10576 | vm.loading.email = true; |
|
10574 | vm.loading.email = true; | |
10577 | console.log('createChannel'); |
|
10575 | ||
10578 | userSelfPropertyResource.save({key: 'alert_channels'}, vm.form, function () { |
|
10576 | userSelfPropertyResource.save({key: 'alert_channels'}, vm.form, function () { | |
10579 | //vm.loading.email = false; |
|
10577 | //vm.loading.email = false; | |
10580 | //setServerValidation(vm.channelForm); |
|
10578 | //setServerValidation(vm.channelForm); | |
@@ -10617,7 +10615,7 b" angular.module('appenlight.components.userAlertChannelsListView', [])" | |||||
10617 | userAlertChannelsListViewController.$inject = ['$state','userSelfPropertyResource', 'applicationsNoIdResource']; |
|
10615 | userAlertChannelsListViewController.$inject = ['$state','userSelfPropertyResource', 'applicationsNoIdResource']; | |
10618 |
|
10616 | |||
10619 | function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) { |
|
10617 | function userAlertChannelsListViewController($state, userSelfPropertyResource, applicationsNoIdResource) { | |
10620 | console.debug('AlertChannelsController'); |
|
10618 | ||
10621 | var vm = this; |
|
10619 | var vm = this; | |
10622 | vm.$state = $state; |
|
10620 | vm.$state = $state; | |
10623 | vm.loading = {channels: true, applications: true, actions:true}; |
|
10621 | vm.loading = {channels: true, applications: true, actions:true}; | |
@@ -10684,12 +10682,12 b' function userAlertChannelsListViewController($state, userSelfPropertyResource, a' | |||||
10684 | }; |
|
10682 | }; | |
10685 |
|
10683 | |||
10686 | vm.addAction = function (channel) { |
|
10684 | vm.addAction = function (channel) { | |
10687 | console.log('test'); |
|
10685 | ||
10688 | userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) { |
|
10686 | userSelfPropertyResource.save({key: 'alert_channels_rules'}, {}, function (data) { | |
10689 | vm.alertActions.push(data); |
|
10687 | vm.alertActions.push(data); | |
10690 | }, function (response) { |
|
10688 | }, function (response) { | |
10691 | if (response.status == 422) { |
|
10689 | if (response.status == 422) { | |
10692 | console.log('scope', response); |
|
10690 | ||
10693 | } |
|
10691 | } | |
10694 | }); |
|
10692 | }); | |
10695 | }; |
|
10693 | }; | |
@@ -10710,7 +10708,7 b' function userAlertChannelsListViewController($state, userSelfPropertyResource, a' | |||||
10710 | }; |
|
10708 | }; | |
10711 |
|
10709 | |||
10712 | vm.removeChannel = function (channel) { |
|
10710 | vm.removeChannel = function (channel) { | |
10713 | console.log(channel); |
|
10711 | ||
10714 | userSelfPropertyResource.delete({ |
|
10712 | userSelfPropertyResource.delete({ | |
10715 | key: 'alert_channels', |
|
10713 | key: 'alert_channels', | |
10716 | channel_name: channel.channel_name, |
|
10714 | channel_name: channel.channel_name, | |
@@ -10753,7 +10751,7 b" angular.module('appenlight.components.userAuthTokensView', [])" | |||||
10753 | userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig']; |
|
10751 | userAuthTokensViewController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig']; | |
10754 |
|
10752 | |||
10755 | function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) { |
|
10753 | function userAuthTokensViewController($state, userSelfPropertyResource, AeConfig) { | |
10756 | console.debug('userAuthTokensViewController'); |
|
10754 | ||
10757 | var vm = this; |
|
10755 | var vm = this; | |
10758 | vm.$state = $state; |
|
10756 | vm.$state = $state; | |
10759 | vm.loading = {tokens: true}; |
|
10757 | vm.loading = {tokens: true}; | |
@@ -10824,7 +10822,7 b" angular.module('appenlight.components.userIdentitiesView', [])" | |||||
10824 | UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig']; |
|
10822 | UserIdentitiesController.$inject = ['$state', 'userSelfPropertyResource', 'AeConfig']; | |
10825 |
|
10823 | |||
10826 | function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) { |
|
10824 | function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) { | |
10827 | console.debug('UserIdentitiesController'); |
|
10825 | ||
10828 | var vm = this; |
|
10826 | var vm = this; | |
10829 | vm.$state = $state; |
|
10827 | vm.$state = $state; | |
10830 | vm.AeConfig = AeConfig; |
|
10828 | vm.AeConfig = AeConfig; | |
@@ -10834,11 +10832,11 b' function UserIdentitiesController($state, userSelfPropertyResource, AeConfig) {' | |||||
10834 | {key: 'external_identities'}, |
|
10832 | {key: 'external_identities'}, | |
10835 | function (data) { |
|
10833 | function (data) { | |
10836 | vm.loading.identities = false; |
|
10834 | vm.loading.identities = false; | |
10837 | console.log(vm.identities); |
|
10835 | ||
10838 | }); |
|
10836 | }); | |
10839 |
|
10837 | |||
10840 | vm.removeProvider = function (provider) { |
|
10838 | vm.removeProvider = function (provider) { | |
10841 | console.log('provider', provider); |
|
10839 | ||
10842 | userSelfPropertyResource.delete( |
|
10840 | userSelfPropertyResource.delete( | |
10843 | { |
|
10841 | { | |
10844 | key: 'external_identities', |
|
10842 | key: 'external_identities', | |
@@ -10884,7 +10882,7 b" angular.module('appenlight.components.userPasswordView', [])" | |||||
10884 | UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource']; |
|
10882 | UserPasswordViewController.$inject = ['$state', 'userSelfPropertyResource']; | |
10885 |
|
10883 | |||
10886 | function UserPasswordViewController($state, userSelfPropertyResource) { |
|
10884 | function UserPasswordViewController($state, userSelfPropertyResource) { | |
10887 | console.debug('UserPasswordViewController'); |
|
10885 | ||
10888 | var vm = this; |
|
10886 | var vm = this; | |
10889 | vm.$state = $state; |
|
10887 | vm.$state = $state; | |
10890 | vm.loading = {password: false}; |
|
10888 | vm.loading = {password: false}; | |
@@ -10892,16 +10890,16 b' function UserPasswordViewController($state, userSelfPropertyResource) {' | |||||
10892 |
|
10890 | |||
10893 | vm.updatePassword = function () { |
|
10891 | vm.updatePassword = function () { | |
10894 | vm.loading.password = true; |
|
10892 | vm.loading.password = true; | |
10895 | console.log('updatePassword'); |
|
10893 | ||
10896 | userSelfPropertyResource.update({key: 'password'}, vm.form, function () { |
|
10894 | userSelfPropertyResource.update({key: 'password'}, vm.form, function () { | |
10897 | vm.loading.password = false; |
|
10895 | vm.loading.password = false; | |
10898 | vm.form = {}; |
|
10896 | vm.form = {}; | |
10899 | setServerValidation(vm.passwordForm); |
|
10897 | setServerValidation(vm.passwordForm); | |
10900 | }, function (response) { |
|
10898 | }, function (response) { | |
10901 | if (response.status == 422) { |
|
10899 | if (response.status == 422) { | |
10902 |
|
|
10900 | ||
10903 | setServerValidation(vm.passwordForm, response.data); |
|
10901 | setServerValidation(vm.passwordForm, response.data); | |
10904 | console.log(response.data); |
|
10902 | ||
10905 | } |
|
10903 | } | |
10906 | vm.loading.password = false; |
|
10904 | vm.loading.password = false; | |
10907 | }); |
|
10905 | }); | |
@@ -10936,20 +10934,20 b" angular.module('appenlight.components.userProfileView', [])" | |||||
10936 | UserProfileViewController.$inject = ['$state', 'userSelfResource']; |
|
10934 | UserProfileViewController.$inject = ['$state', 'userSelfResource']; | |
10937 |
|
10935 | |||
10938 | function UserProfileViewController($state, userSelfResource) { |
|
10936 | function UserProfileViewController($state, userSelfResource) { | |
10939 | console.debug('UserProfileViewController'); |
|
10937 | ||
10940 | var vm = this; |
|
10938 | var vm = this; | |
10941 | vm.$state = $state; |
|
10939 | vm.$state = $state; | |
10942 | vm.loading = {profile: true}; |
|
10940 | vm.loading = {profile: true}; | |
10943 |
|
10941 | |||
10944 | vm.user = userSelfResource.get(null, function (data) { |
|
10942 | vm.user = userSelfResource.get(null, function (data) { | |
10945 | vm.loading.profile = false; |
|
10943 | vm.loading.profile = false; | |
10946 | console.log('loaded profile'); |
|
10944 | ||
10947 | }); |
|
10945 | }); | |
10948 |
|
10946 | |||
10949 | vm.updateProfile = function () { |
|
10947 | vm.updateProfile = function () { | |
10950 | vm.loading.profile = true; |
|
10948 | vm.loading.profile = true; | |
10951 |
|
10949 | |||
10952 | console.log('updateProfile'); |
|
10950 | ||
10953 | vm.user.$update(null, function () { |
|
10951 | vm.user.$update(null, function () { | |
10954 | vm.loading.profile = false; |
|
10952 | vm.loading.profile = false; | |
10955 | setServerValidation(vm.profileForm); |
|
10953 | setServerValidation(vm.profileForm); | |
@@ -11262,7 +11260,7 b' function JiraIntegrationCtrl($uibModalInstance, $state, report, integrationName,' | |||||
11262 | vm.form.responsible = vm.assignees[0]; |
|
11260 | vm.form.responsible = vm.assignees[0]; | |
11263 | vm.form.priority = vm.priorities[0]; |
|
11261 | vm.form.priority = vm.priorities[0]; | |
11264 | }, function (error_data) { |
|
11262 | }, function (error_data) { | |
11265 |
|
|
11263 | ||
11266 | if (error_data.data.error_messages) { |
|
11264 | if (error_data.data.error_messages) { | |
11267 | vm.error_messages = error_data.data.error_messages; |
|
11265 | vm.error_messages = error_data.data.error_messages; | |
11268 | } |
|
11266 | } | |
@@ -11423,7 +11421,7 b" angular.module('appenlight.directives.c3chart', [])" | |||||
11423 | if (!_.isEmpty($scope.data)) { |
|
11421 | if (!_.isEmpty($scope.data)) { | |
11424 | _.extend(config.data, angular.copy($scope.data)); |
|
11422 | _.extend(config.data, angular.copy($scope.data)); | |
11425 | } |
|
11423 | } | |
11426 | console.log('ChartCtrl.showGraph', config); |
|
11424 | ||
11427 | config.onresized = function () { |
|
11425 | config.onresized = function () { | |
11428 | if (this.currentWidth < 400){ |
|
11426 | if (this.currentWidth < 400){ | |
11429 | $scope.chart.internal.config.axis_x_tick_culling_max = 3; |
|
11427 | $scope.chart.internal.config.axis_x_tick_culling_max = 3; | |
@@ -11442,19 +11440,19 b" angular.module('appenlight.directives.c3chart', [])" | |||||
11442 | originalXTickCount = $scope.chart.internal.config.axis_x_tick_culling_max; |
|
11440 | originalXTickCount = $scope.chart.internal.config.axis_x_tick_culling_max; | |
11443 | $scope.chart.internal.config.onresized.call($scope.chart.internal); |
|
11441 | $scope.chart.internal.config.onresized.call($scope.chart.internal); | |
11444 | } |
|
11442 | } | |
11445 | console.log('should update', $scope.update); |
|
11443 | ||
11446 | if ($scope.update) { |
|
11444 | if ($scope.update) { | |
11447 | console.log('reload driven'); |
|
11445 | ||
11448 | $scope.$watch('data', function () { |
|
11446 | $scope.$watch('data', function () { | |
11449 | if (!firstLoad) { |
|
11447 | if (!firstLoad) { | |
11450 | console.log('data updated', $scope.data); |
|
11448 | ||
11451 | $scope.chart.load(angular.copy($scope.data), {unload: true}); |
|
11449 | $scope.chart.load(angular.copy($scope.data), {unload: true}); | |
11452 | if (typeof $scope.data.groups != 'undefined') { |
|
11450 | if (typeof $scope.data.groups != 'undefined') { | |
11453 |
|
|
11451 | ||
11454 | $scope.chart.groups($scope.data.groups); |
|
11452 | $scope.chart.groups($scope.data.groups); | |
11455 | } |
|
11453 | } | |
11456 | if (typeof $scope.data.names != 'undefined') { |
|
11454 | if (typeof $scope.data.names != 'undefined') { | |
11457 |
|
|
11455 | ||
11458 | $scope.chart.data.names($scope.data.names); |
|
11456 | $scope.chart.data.names($scope.data.names); | |
11459 | } |
|
11457 | } | |
11460 | $scope.chart.flush(); |
|
11458 | $scope.chart.flush(); | |
@@ -11466,7 +11464,7 b" angular.module('appenlight.directives.c3chart', [])" | |||||
11466 | return |
|
11464 | return | |
11467 | } |
|
11465 | } | |
11468 | if (typeof $scope.config.regions != 'undefined') { |
|
11466 | if (typeof $scope.config.regions != 'undefined') { | |
11469 | console.log('update regions', $scope.config.regions); |
|
11467 | ||
11470 | $scope.chart.regions($scope.config.regions); |
|
11468 | $scope.chart.regions($scope.config.regions); | |
11471 | } |
|
11469 | } | |
11472 | }); |
|
11470 | }); | |
@@ -11542,7 +11540,7 b" directive('confirmValidate', [function () {" | |||||
11542 | link: function ($scope, elem, attrs, ngModel) { |
|
11540 | link: function ($scope, elem, attrs, ngModel) { | |
11543 | ngModel.$validators.confirm = function (modelValue, viewValue) { |
|
11541 | ngModel.$validators.confirm = function (modelValue, viewValue) { | |
11544 | var value = modelValue || viewValue; |
|
11542 | var value = modelValue || viewValue; | |
11545 | console.log('validate', value.toLowerCase() == 'confirm'); |
|
11543 | ||
11546 | if (value.toLowerCase() == 'confirm') { |
|
11544 | if (value.toLowerCase() == 'confirm') { | |
11547 | return true; |
|
11545 | return true; | |
11548 | } |
|
11546 | } | |
@@ -11719,7 +11717,7 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope' | |||||
11719 | vm.form.selectedGroup = vm.possibleGroups[0].id; |
|
11717 | vm.form.selectedGroup = vm.possibleGroups[0].id; | |
11720 | } |
|
11718 | } | |
11721 | }); |
|
11719 | }); | |
11722 | console.log('g', vm.possibleGroups); |
|
11720 | ||
11723 | vm.possibleUsers = []; |
|
11721 | vm.possibleUsers = []; | |
11724 | _.each(vm.resource.possible_permissions, function (perm) { |
|
11722 | _.each(vm.resource.possible_permissions, function (perm) { | |
11725 | vm.form.selectedUserPermissions[perm] = false; |
|
11723 | vm.form.selectedUserPermissions[perm] = false; | |
@@ -11735,7 +11733,7 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope' | |||||
11735 | group: {} |
|
11733 | group: {} | |
11736 | }; |
|
11734 | }; | |
11737 | _.each(vm.currentPermissions, function (perm) { |
|
11735 | _.each(vm.currentPermissions, function (perm) { | |
11738 | console.log(perm); |
|
11736 | ||
11739 | if (perm.type == 'user') { |
|
11737 | if (perm.type == 'user') { | |
11740 | if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') { |
|
11738 | if (typeof tmpObj[perm.type][perm.user_name] === 'undefined') { | |
11741 | tmpObj[perm.type][perm.user_name] = { |
|
11739 | tmpObj[perm.type][perm.user_name] = { | |
@@ -11765,10 +11763,10 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope' | |||||
11765 | group: _.values(tmpObj.group), |
|
11763 | group: _.values(tmpObj.group), | |
11766 | }; |
|
11764 | }; | |
11767 |
|
11765 | |||
11768 | console.log('test', tmpObj, vm.currentPermissions); |
|
11766 | ||
11769 |
|
11767 | |||
11770 | vm.searchUsers = function (searchPhrase) { |
|
11768 | vm.searchUsers = function (searchPhrase) { | |
11771 | console.log('SEARCHING'); |
|
11769 | ||
11772 | vm.searchingUsers = true; |
|
11770 | vm.searchingUsers = true; | |
11773 | return sectionViewResource.query({ |
|
11771 | return sectionViewResource.query({ | |
11774 | section: 'users_section', |
|
11772 | section: 'users_section', | |
@@ -11817,7 +11815,7 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope' | |||||
11817 |
|
11815 | |||
11818 |
|
11816 | |||
11819 | vm.setUserPermission = function () { |
|
11817 | vm.setUserPermission = function () { | |
11820 | console.log('set permissions'); |
|
11818 | ||
11821 | var POSTObj = { |
|
11819 | var POSTObj = { | |
11822 | 'user_name': vm.form.autocompleteUser, |
|
11820 | 'user_name': vm.form.autocompleteUser, | |
11823 | 'permissions': [] |
|
11821 | 'permissions': [] | |
@@ -11847,8 +11845,8 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope' | |||||
11847 | } |
|
11845 | } | |
11848 |
|
11846 | |||
11849 | vm.removeUserPermission = function (perm_name, curr_perm) { |
|
11847 | vm.removeUserPermission = function (perm_name, curr_perm) { | |
11850 | console.log(perm_name); |
|
11848 | ||
11851 | console.log(curr_perm); |
|
11849 | ||
11852 | var POSTObj = { |
|
11850 | var POSTObj = { | |
11853 | key: 'user_permissions', |
|
11851 | key: 'user_permissions', | |
11854 | user_name: curr_perm.self.user_name, |
|
11852 | user_name: curr_perm.self.user_name, | |
@@ -11865,7 +11863,7 b' function ApplicationPermissionsController(sectionViewResource, applicationsPrope' | |||||
11865 | } |
|
11863 | } | |
11866 |
|
11864 | |||
11867 | vm.removeGroupPermission = function (perm_name, curr_perm) { |
|
11865 | vm.removeGroupPermission = function (perm_name, curr_perm) { | |
11868 | console.log('g', curr_perm); |
|
11866 | ||
11869 | var POSTObj = { |
|
11867 | var POSTObj = { | |
11870 | key: 'group_permissions', |
|
11868 | key: 'group_permissions', | |
11871 | group_id: curr_perm.self.group_id, |
|
11869 | group_id: curr_perm.self.group_id, | |
@@ -11971,7 +11969,7 b" angular.module('appenlight.directives.postProcessAction', []).directive('postPro" | |||||
11971 | }; |
|
11969 | }; | |
11972 | function postProcessActionController(){ |
|
11970 | function postProcessActionController(){ | |
11973 | var vm = this; |
|
11971 | var vm = this; | |
11974 | console.log(vm); |
|
11972 | ||
11975 | var allOps = { |
|
11973 | var allOps = { | |
11976 | 'eq': 'Equal', |
|
11974 | 'eq': 'Equal', | |
11977 | 'ne': 'Not equal', |
|
11975 | 'ne': 'Not equal', | |
@@ -12055,7 +12053,7 b" angular.module('appenlight.directives.postProcessAction', []).directive('postPro" | |||||
12055 |
|
12053 | |||
12056 | vm.setDirty = function() { |
|
12054 | vm.setDirty = function() { | |
12057 | vm.action.dirty = true; |
|
12055 | vm.action.dirty = true; | |
12058 | console.log('set dirty'); |
|
12056 | ||
12059 | }; |
|
12057 | }; | |
12060 | } |
|
12058 | } | |
12061 |
|
12059 | |||
@@ -12151,14 +12149,14 b" angular.module('appenlight.directives.reportAlertAction', []).directive('reportA" | |||||
12151 | channel_pkey: vm.channelToBind.pkey, |
|
12149 | channel_pkey: vm.channelToBind.pkey, | |
12152 | action_pkey: vm.action.pkey |
|
12150 | action_pkey: vm.action.pkey | |
12153 | }; |
|
12151 | }; | |
12154 | console.log(post); |
|
12152 | ||
12155 | userSelfPropertyResource.save({key: 'alert_channels_actions_binds'}, post, |
|
12153 | userSelfPropertyResource.save({key: 'alert_channels_actions_binds'}, post, | |
12156 | function (data) { |
|
12154 | function (data) { | |
12157 | vm.action.channels = []; |
|
12155 | vm.action.channels = []; | |
12158 | vm.action.channels = data.channels; |
|
12156 | vm.action.channels = data.channels; | |
12159 | }, function (response) { |
|
12157 | }, function (response) { | |
12160 | if (response.status == 422) { |
|
12158 | if (response.status == 422) { | |
12161 |
|
|
12159 | ||
12162 | } |
|
12160 | } | |
12163 | }); |
|
12161 | }); | |
12164 | }; |
|
12162 | }; | |
@@ -12174,7 +12172,7 b" angular.module('appenlight.directives.reportAlertAction', []).directive('reportA" | |||||
12174 | vm.action.channels = data.channels; |
|
12172 | vm.action.channels = data.channels; | |
12175 | }, function (response) { |
|
12173 | }, function (response) { | |
12176 | if (response.status == 422) { |
|
12174 | if (response.status == 422) { | |
12177 |
|
|
12175 | ||
12178 | } |
|
12176 | } | |
12179 | }); |
|
12177 | }); | |
12180 | }; |
|
12178 | }; | |
@@ -12211,7 +12209,7 b" angular.module('appenlight.directives.reportAlertAction', []).directive('reportA" | |||||
12211 |
|
12209 | |||
12212 | vm.setDirty = function() { |
|
12210 | vm.setDirty = function() { | |
12213 | vm.action.dirty = true; |
|
12211 | vm.action.dirty = true; | |
12214 | console.log('set dirty'); |
|
12212 | ||
12215 | }; |
|
12213 | }; | |
12216 | } |
|
12214 | } | |
12217 |
|
12215 | |||
@@ -12310,10 +12308,10 b" angular.module('appenlight.directives.rule', []).directive('rule', function () {" | |||||
12310 |
|
12308 | |||
12311 | vm.setDirty = function() { |
|
12309 | vm.setDirty = function() { | |
12312 | vm.rule.dirty = true; |
|
12310 | vm.rule.dirty = true; | |
12313 | console.log('set dirty'); |
|
12311 | ||
12314 | if (vm.parentObj){ |
|
12312 | if (vm.parentObj){ | |
12315 | console.log('p', vm.parentObj); |
|
12313 | ||
12316 | console.log('set parent dirty'); |
|
12314 | ||
12317 | vm.parentObj.dirty = true; |
|
12315 | vm.parentObj.dirty = true; | |
12318 | } |
|
12316 | } | |
12319 | }; |
|
12317 | }; | |
@@ -12327,13 +12325,13 b" angular.module('appenlight.directives.rule', []).directive('rule', function () {" | |||||
12327 | vm.rule.op = vm.ruleDefinitions.fieldOps[vm.rule.field][0]; |
|
12325 | vm.rule.op = vm.ruleDefinitions.fieldOps[vm.rule.field][0]; | |
12328 | } |
|
12326 | } | |
12329 | if ((new_is_compound && !old_was_compound)) { |
|
12327 | if ((new_is_compound && !old_was_compound)) { | |
12330 | console.log('resetting config'); |
|
12328 | ||
12331 | delete vm.rule.value; |
|
12329 | delete vm.rule.value; | |
12332 | vm.rule.rules = []; |
|
12330 | vm.rule.rules = []; | |
12333 | vm.add(); |
|
12331 | vm.add(); | |
12334 | } |
|
12332 | } | |
12335 | else if (!new_is_compound && old_was_compound) { |
|
12333 | else if (!new_is_compound && old_was_compound) { | |
12336 | console.log('resetting config'); |
|
12334 | ||
12337 | delete vm.rule.rules; |
|
12335 | delete vm.rule.rules; | |
12338 | vm.rule.value = ''; |
|
12336 | vm.rule.value = ''; | |
12339 | } |
|
12337 | } | |
@@ -13113,7 +13111,7 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder'," | |||||
13113 | } |
|
13111 | } | |
13114 | } |
|
13112 | } | |
13115 | }.bind(this)); |
|
13113 | }.bind(this)); | |
13116 | console.log('AeUser.hasContextPermission', permName, hasPerm); |
|
13114 | ||
13117 | return hasPerm; |
|
13115 | return hasPerm; | |
13118 | }; |
|
13116 | }; | |
13119 |
|
13117 | |||
@@ -13127,7 +13125,7 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder'," | |||||
13127 | list: [], |
|
13125 | list: [], | |
13128 | timeout: null, |
|
13126 | timeout: null, | |
13129 | extend: function (values) { |
|
13127 | extend: function (values) { | |
13130 | console.log('pushing flash', this); |
|
13128 | ||
13131 | if (this.list.length > 2) { |
|
13129 | if (this.list.length > 2) { | |
13132 | this.list.splice(0, this.list.length - 2); |
|
13130 | this.list.splice(0, this.list.length - 2); | |
13133 | } |
|
13131 | } | |
@@ -13136,7 +13134,7 b" angular.module('appenlight.services.stateHolder', []).factory('stateHolder'," | |||||
13136 | this.removeMessages(); |
|
13134 | this.removeMessages(); | |
13137 | }, |
|
13135 | }, | |
13138 | pop: function () { |
|
13136 | pop: function () { | |
13139 | console.log('popping flash'); |
|
13137 | ||
13140 | this.list.pop(); |
|
13138 | this.list.pop(); | |
13141 | }, |
|
13139 | }, | |
13142 | cancelTimeout: function () { |
|
13140 | cancelTimeout: function () { | |
@@ -13232,7 +13230,7 b" angular.module('appenlight.services.typeAheadTagHelper', []).factory('typeAheadT" | |||||
13232 | return true; |
|
13230 | return true; | |
13233 | }; |
|
13231 | }; | |
13234 | typeAheadTagHelper.removeSearchTag = function (tag) { |
|
13232 | typeAheadTagHelper.removeSearchTag = function (tag) { | |
13235 | console.log(typeAheadTagHelper.tags); |
|
13233 | ||
13236 | var indexValue = _.indexOf(typeAheadTagHelper.tags, tag); |
|
13234 | var indexValue = _.indexOf(typeAheadTagHelper.tags, tag); | |
13237 | typeAheadTagHelper.tags.splice(indexValue, 1); |
|
13235 | typeAheadTagHelper.tags.splice(indexValue, 1); | |
13238 |
|
13236 |
General Comments 0
You need to be logged in to leave comments.
Login now