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