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