Show More
@@ -1,18 +1,11 b'' | |||||
1 | {% extends "/layout_base.jinja2" %} |
|
1 | {% extends "/layout_base.jinja2" %} | |
2 |
|
2 | |||
3 | {% block outer_content %} |
|
3 | {% block outer_content %} | |
4 | <!-- Begin page content --> |
|
4 | <!-- Begin page content --> | |
5 | <div class="container"> |
|
5 | <div class="container"> | |
6 | <div class="row ng-cloak" data-ng-if="flash.length" style="margin-bottom: 10px"> |
|
|||
7 | <div class="col-xs-12"> |
|
|||
8 | {% raw %} |
|
|||
9 | <uib-alert data-ng-repeat="message in flash" type="{{ message.type}}" close="closeAlert($index)" class="animate-repeat">{{message.msg}}</uib-alert> |
|
|||
10 | {% endraw %} |
|
|||
11 | </div> |
|
|||
12 | </div> |
|
|||
13 | <div class="row"> |
|
6 | <div class="row"> | |
14 | {% block content %}{% endblock %} |
|
7 | {% block content %}{% endblock %} | |
15 | </div> |
|
8 | </div> | |
16 | </div> |
|
9 | </div> | |
17 |
|
10 | |||
18 | {% endblock %} |
|
11 | {% endblock %} |
@@ -1,203 +1,206 b'' | |||||
1 | // # Copyright (C) 2010-2016 RhodeCode GmbH |
|
1 | // # Copyright (C) 2010-2016 RhodeCode GmbH | |
2 | // # |
|
2 | // # | |
3 | // # This program is free software: you can redistribute it and/or modify |
|
3 | // # This program is free software: you can redistribute it and/or modify | |
4 | // # it under the terms of the GNU Affero General Public License, version 3 |
|
4 | // # it under the terms of the GNU Affero General Public License, version 3 | |
5 | // # (only), as published by the Free Software Foundation. |
|
5 | // # (only), as published by the Free Software Foundation. | |
6 | // # |
|
6 | // # | |
7 | // # This program is distributed in the hope that it will be useful, |
|
7 | // # This program is distributed in the hope that it will be useful, | |
8 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
9 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | // # GNU General Public License for more details. |
|
10 | // # GNU General Public License for more details. | |
11 | // # |
|
11 | // # | |
12 | // # You should have received a copy of the GNU Affero General Public License |
|
12 | // # You should have received a copy of the GNU Affero General Public License | |
13 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
13 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
14 | // # |
|
14 | // # | |
15 | // # This program is dual-licensed. If you wish to learn more about the |
|
15 | // # This program is dual-licensed. If you wish to learn more about the | |
16 | // # AppEnlight Enterprise Edition, including its added features, Support |
|
16 | // # AppEnlight Enterprise Edition, including its added features, Support | |
17 | // # services, and proprietary license terms, please see |
|
17 | // # services, and proprietary license terms, please see | |
18 | // # https://rhodecode.com/licenses/ |
|
18 | // # https://rhodecode.com/licenses/ | |
19 |
|
19 | |||
20 | 'use strict'; |
|
20 | 'use strict'; | |
21 |
|
21 | |||
22 | // Declare app level module which depends on filters, and services |
|
22 | // Declare app level module which depends on filters, and services | |
23 | angular.module('appenlight.base', [ |
|
23 | angular.module('appenlight.base', [ | |
24 | 'ngRoute', |
|
24 | 'ngRoute', | |
25 | 'ui.router', |
|
25 | 'ui.router', | |
26 | 'ui.router.router', |
|
26 | 'ui.router.router', | |
27 | 'underscore', |
|
27 | 'underscore', | |
28 | 'ui.bootstrap', |
|
28 | 'ui.bootstrap', | |
29 | 'ngResource', |
|
29 | 'ngResource', | |
30 | 'ngAnimate', |
|
30 | 'ngAnimate', | |
31 | 'ngCookies', |
|
31 | 'ngCookies', | |
32 | 'smart-table', |
|
32 | 'smart-table', | |
33 | 'angular-toArrayFilter', |
|
33 | 'angular-toArrayFilter', | |
34 | 'mentio' |
|
34 | 'mentio' | |
35 | ]); |
|
35 | ]); | |
36 |
|
36 | |||
37 | angular.module('appenlight.filters', []); |
|
37 | angular.module('appenlight.filters', []); | |
38 | angular.module('appenlight.templates', []); |
|
38 | angular.module('appenlight.templates', []); | |
39 | angular.module('appenlight.controllers', [ |
|
39 | angular.module('appenlight.controllers', [ | |
40 | 'appenlight.base' |
|
40 | 'appenlight.base' | |
41 | ]); |
|
41 | ]); | |
42 | angular.module('appenlight.components', [ |
|
42 | angular.module('appenlight.components', [ | |
43 | 'appenlight.components.channelstream', |
|
43 | 'appenlight.components.channelstream', | |
44 | 'appenlight.components.appenlightApp', |
|
44 | 'appenlight.components.appenlightApp', | |
45 | 'appenlight.components.appenlightHeader', |
|
45 | 'appenlight.components.appenlightHeader', | |
46 | 'appenlight.components.indexDashboardView', |
|
46 | 'appenlight.components.indexDashboardView', | |
47 | 'appenlight.components.logsBrowserView', |
|
47 | 'appenlight.components.logsBrowserView', | |
48 | 'appenlight.components.eventBrowserView' |
|
48 | 'appenlight.components.eventBrowserView', | |
|
49 | 'appenlight.components.userProfileView', | |||
|
50 | 'appenlight.components.userIdentitiesView', | |||
|
51 | 'appenlight.components.settingsView' | |||
49 | ]); |
|
52 | ]); | |
50 | angular.module('appenlight.directives', [ |
|
53 | angular.module('appenlight.directives', [ | |
51 | 'appenlight.directives.c3chart', |
|
54 | 'appenlight.directives.c3chart', | |
52 | 'appenlight.directives.confirmValidate', |
|
55 | 'appenlight.directives.confirmValidate', | |
53 | 'appenlight.directives.focus', |
|
56 | 'appenlight.directives.focus', | |
54 | 'appenlight.directives.formErrors', |
|
57 | 'appenlight.directives.formErrors', | |
55 | 'appenlight.directives.humanFormat', |
|
58 | 'appenlight.directives.humanFormat', | |
56 | 'appenlight.directives.isoToRelativeTime', |
|
59 | 'appenlight.directives.isoToRelativeTime', | |
57 | 'appenlight.directives.permissionsForm', |
|
60 | 'appenlight.directives.permissionsForm', | |
58 | 'appenlight.directives.smallReportGroupList', |
|
61 | 'appenlight.directives.smallReportGroupList', | |
59 | 'appenlight.directives.smallReportList', |
|
62 | 'appenlight.directives.smallReportList', | |
60 | 'appenlight.directives.pluginConfig', |
|
63 | 'appenlight.directives.pluginConfig', | |
61 | 'appenlight.directives.recursive', |
|
64 | 'appenlight.directives.recursive', | |
62 | 'appenlight.directives.reportAlertAction', |
|
65 | 'appenlight.directives.reportAlertAction', | |
63 | 'appenlight.directives.postProcessAction', |
|
66 | 'appenlight.directives.postProcessAction', | |
64 | 'appenlight.directives.rule', |
|
67 | 'appenlight.directives.rule', | |
65 | 'appenlight.directives.ruleReadOnly' |
|
68 | 'appenlight.directives.ruleReadOnly' | |
66 | ]); |
|
69 | ]); | |
67 | angular.module('appenlight.services', [ |
|
70 | angular.module('appenlight.services', [ | |
68 | 'appenlight.services.chartResultParser', |
|
71 | 'appenlight.services.chartResultParser', | |
69 | 'appenlight.services.resources', |
|
72 | 'appenlight.services.resources', | |
70 | 'appenlight.services.stateHolder', |
|
73 | 'appenlight.services.stateHolder', | |
71 | 'appenlight.services.typeAheadTagHelper', |
|
74 | 'appenlight.services.typeAheadTagHelper', | |
72 | 'appenlight.services.UUIDProvider' |
|
75 | 'appenlight.services.UUIDProvider' | |
73 | ]).value('version', '0.1'); |
|
76 | ]).value('version', '0.1'); | |
74 |
|
77 | |||
75 |
|
78 | |||
76 | var pluginsToLoad = _.map(decodeEncodedJSON(window.AE.plugins), |
|
79 | var pluginsToLoad = _.map(decodeEncodedJSON(window.AE.plugins), | |
77 | function(item){ |
|
80 | function(item){ | |
78 | return item.config.angular_module |
|
81 | return item.config.angular_module | |
79 | }); |
|
82 | }); | |
80 | console.log(pluginsToLoad); |
|
83 | console.log(pluginsToLoad); | |
81 | angular.module('appenlight.plugins', pluginsToLoad); |
|
84 | angular.module('appenlight.plugins', pluginsToLoad); | |
82 |
|
85 | |||
83 | var app = angular.module('appenlight', [ |
|
86 | var app = angular.module('appenlight', [ | |
84 | 'appenlight.base', |
|
87 | 'appenlight.base', | |
85 | 'appenlight.config', |
|
88 | 'appenlight.config', | |
86 | 'appenlight.templates', |
|
89 | 'appenlight.templates', | |
87 | 'appenlight.filters', |
|
90 | 'appenlight.filters', | |
88 | 'appenlight.services', |
|
91 | 'appenlight.services', | |
89 | 'appenlight.directives', |
|
92 | 'appenlight.directives', | |
90 | 'appenlight.controllers', |
|
93 | 'appenlight.controllers', | |
91 | 'appenlight.components', |
|
94 | 'appenlight.components', | |
92 | 'appenlight.plugins' |
|
95 | 'appenlight.plugins' | |
93 | ]); |
|
96 | ]); | |
94 |
|
97 | |||
95 | // needs manual execution because of plugin files |
|
98 | // needs manual execution because of plugin files | |
96 | function kickstartAE(initialUserData) { |
|
99 | function kickstartAE(initialUserData) { | |
97 | app.config(['$httpProvider', '$uibTooltipProvider', '$locationProvider', function ($httpProvider, $uibTooltipProvider, $locationProvider) { |
|
100 | app.config(['$httpProvider', '$uibTooltipProvider', '$locationProvider', function ($httpProvider, $uibTooltipProvider, $locationProvider) { | |
98 | $locationProvider.html5Mode(true); |
|
101 | $locationProvider.html5Mode(true); | |
99 | $httpProvider.interceptors.push(['$q', '$rootScope', '$timeout', 'stateHolder', function ($q, $rootScope, $timeout, stateHolder) { |
|
102 | $httpProvider.interceptors.push(['$q', '$rootScope', '$timeout', 'stateHolder', function ($q, $rootScope, $timeout, stateHolder) { | |
100 | return { |
|
103 | return { | |
101 | 'response': function (response) { |
|
104 | 'response': function (response) { | |
102 | var flashMessages = angular.fromJson(response.headers('x-flash-messages')); |
|
105 | var flashMessages = angular.fromJson(response.headers('x-flash-messages')); | |
103 | if (flashMessages && flashMessages.length > 0) { |
|
106 | if (flashMessages && flashMessages.length > 0) { | |
104 | stateHolder.flashMessages.extend(flashMessages); |
|
107 | stateHolder.flashMessages.extend(flashMessages); | |
105 | } |
|
108 | } | |
106 | return response; |
|
109 | return response; | |
107 | }, |
|
110 | }, | |
108 | 'responseError': function (rejection) { |
|
111 | 'responseError': function (rejection) { | |
109 | if (rejection.status > 299 && rejection.status !== 422) { |
|
112 | if (rejection.status > 299 && rejection.status !== 422) { | |
110 | stateHolder.flashMessages.extend([{ |
|
113 | stateHolder.flashMessages.extend([{ | |
111 | msg: 'Response status code: ' + rejection.status + ', "' + rejection.statusText + '", url: ' + rejection.config.url, |
|
114 | msg: 'Response status code: ' + rejection.status + ', "' + rejection.statusText + '", url: ' + rejection.config.url, | |
112 | type: 'error' |
|
115 | type: 'error' | |
113 | }]); |
|
116 | }]); | |
114 | } |
|
117 | } | |
115 | if (rejection.status == 0) { |
|
118 | if (rejection.status == 0) { | |
116 | stateHolder.flashMessages.extend([{ |
|
119 | stateHolder.flashMessages.extend([{ | |
117 | msg: 'Response timeout', |
|
120 | msg: 'Response timeout', | |
118 | type: 'error' |
|
121 | type: 'error' | |
119 | }]); |
|
122 | }]); | |
120 | } |
|
123 | } | |
121 | var flashMessages = angular.fromJson(rejection.headers('x-flash-messages')); |
|
124 | var flashMessages = angular.fromJson(rejection.headers('x-flash-messages')); | |
122 | if (flashMessages && flashMessages.length > 0) { |
|
125 | if (flashMessages && flashMessages.length > 0) { | |
123 | stateHolder.flashMessages.extend(flashMessages); |
|
126 | stateHolder.flashMessages.extend(flashMessages); | |
124 | } |
|
127 | } | |
125 |
|
128 | |||
126 | return $q.reject(rejection); |
|
129 | return $q.reject(rejection); | |
127 | } |
|
130 | } | |
128 | } |
|
131 | } | |
129 | }]); |
|
132 | }]); | |
130 |
|
133 | |||
131 | $uibTooltipProvider.options({appendToBody: true}); |
|
134 | $uibTooltipProvider.options({appendToBody: true}); | |
132 |
|
135 | |||
133 | }]); |
|
136 | }]); | |
134 |
|
137 | |||
135 |
|
138 | |||
136 | app.config(function ($provide) { |
|
139 | app.config(function ($provide) { | |
137 | $provide.decorator("$exceptionHandler", function ($delegate) { |
|
140 | $provide.decorator("$exceptionHandler", function ($delegate) { | |
138 | return function (exception, cause) { |
|
141 | return function (exception, cause) { | |
139 | $delegate(exception, cause); |
|
142 | $delegate(exception, cause); | |
140 | if (typeof AppEnlight !== 'undefined') { |
|
143 | if (typeof AppEnlight !== 'undefined') { | |
141 | AppEnlight.grabError(exception); |
|
144 | AppEnlight.grabError(exception); | |
142 | } |
|
145 | } | |
143 | }; |
|
146 | }; | |
144 | }); |
|
147 | }); | |
145 | }); |
|
148 | }); | |
146 |
|
149 | |||
147 | app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig', |
|
150 | app.run(['$rootScope', '$timeout', 'stateHolder', '$state', '$location', '$transitions', '$window', 'AeConfig', | |
148 | function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) { |
|
151 | function ($rootScope, $timeout, stateHolder, $state, $location, $transitions, $window, AeConfig) { | |
149 | if (initialUserData){ |
|
152 | if (initialUserData){ | |
150 | stateHolder.AeUser.update(initialUserData); |
|
153 | stateHolder.AeUser.update(initialUserData); | |
151 | } |
|
154 | } | |
152 | $rootScope.$state = $state; |
|
155 | $rootScope.$state = $state; | |
153 | $rootScope.stateHolder = stateHolder; |
|
156 | $rootScope.stateHolder = stateHolder; | |
154 | $rootScope.flash = stateHolder.flashMessages.list; |
|
157 | $rootScope.flash = stateHolder.flashMessages.list; | |
155 | $rootScope.closeAlert = stateHolder.flashMessages.closeAlert; |
|
158 | $rootScope.closeAlert = stateHolder.flashMessages.closeAlert; | |
156 | $rootScope.AeConfig = AeConfig; |
|
159 | $rootScope.AeConfig = AeConfig; | |
157 |
|
160 | |||
158 | var transitionApp = function($transition$, $state) { |
|
161 | var transitionApp = function($transition$, $state) { | |
159 | // redirect user to /register unless its one of open views |
|
162 | // redirect user to /register unless its one of open views | |
160 | var isGuestState = [ |
|
163 | var isGuestState = [ | |
161 | 'report.view_detail', |
|
164 | 'report.view_detail', | |
162 | 'report.view_group', |
|
165 | 'report.view_group', | |
163 | 'dashboard.view' |
|
166 | 'dashboard.view' | |
164 | ].indexOf($transition$.to().name) !== -1; |
|
167 | ].indexOf($transition$.to().name) !== -1; | |
165 |
|
168 | |||
166 | var path = $window.location.pathname; |
|
169 | var path = $window.location.pathname; | |
167 | // strip trailing slash |
|
170 | // strip trailing slash | |
168 | if (path.substr(path.length - 1) === '/') { |
|
171 | if (path.substr(path.length - 1) === '/') { | |
169 | path = path.substr(0, path.length - 1); |
|
172 | path = path.substr(0, path.length - 1); | |
170 | } |
|
173 | } | |
171 | var isOpenView = false; |
|
174 | var isOpenView = false; | |
172 | var openViews = [ |
|
175 | var openViews = [ | |
173 | AeConfig.urls.otherRoutes.lostPassword, |
|
176 | AeConfig.urls.otherRoutes.lostPassword, | |
174 | AeConfig.urls.otherRoutes.lostPasswordGenerate |
|
177 | AeConfig.urls.otherRoutes.lostPasswordGenerate | |
175 | ]; |
|
178 | ]; | |
176 | console.log('$transitions.onBefore', path, $transition$.to().name, $state); |
|
179 | console.log('$transitions.onBefore', path, $transition$.to().name, $state); | |
177 | _.each(openViews, function (url) { |
|
180 | _.each(openViews, function (url) { | |
178 | var url = '/' + url.split('/').slice(3).join('/'); |
|
181 | var url = '/' + url.split('/').slice(3).join('/'); | |
179 | if (url === path) { |
|
182 | if (url === path) { | |
180 | isOpenView = true; |
|
183 | isOpenView = true; | |
181 | } |
|
184 | } | |
182 | }); |
|
185 | }); | |
183 | if (stateHolder.AeUser.id === null && !isGuestState && !isOpenView) { |
|
186 | if (stateHolder.AeUser.id === null && !isGuestState && !isOpenView) { | |
184 | if (window.location.toString().indexOf(AeConfig.urls.otherRoutes.register) === -1) { |
|
187 | if (window.location.toString().indexOf(AeConfig.urls.otherRoutes.register) === -1) { | |
185 | console.log('redirect to register'); |
|
188 | console.log('redirect to register'); | |
186 | var newLocation = AeConfig.urls.otherRoutes.register + '?came_from=' + encodeURIComponent(window.location); |
|
189 | var newLocation = AeConfig.urls.otherRoutes.register + '?came_from=' + encodeURIComponent(window.location); | |
187 | // fix infinite digest here |
|
190 | // fix infinite digest here | |
188 | $rootScope.$on('$locationChangeStart', |
|
191 | $rootScope.$on('$locationChangeStart', | |
189 | function(event, toState, toParams, fromState, fromParams, options){ |
|
192 | function(event, toState, toParams, fromState, fromParams, options){ | |
190 | event.preventDefault(); |
|
193 | event.preventDefault(); | |
191 | $window.location = newLocation; |
|
194 | $window.location = newLocation; | |
192 | }); |
|
195 | }); | |
193 | $window.location = newLocation; |
|
196 | $window.location = newLocation; | |
194 | return false; |
|
197 | return false; | |
195 | } |
|
198 | } | |
196 | return false; |
|
199 | return false; | |
197 | } |
|
200 | } | |
198 | return true; |
|
201 | return true; | |
199 | }; |
|
202 | }; | |
200 | $transitions.onBefore({}, transitionApp); |
|
203 | $transitions.onBefore({}, transitionApp); | |
201 |
|
204 | |||
202 | }]); |
|
205 | }]); | |
203 | } |
|
206 | } |
@@ -1,5 +1,16 b'' | |||||
1 | <channelstream config="AeConfig"></channelstream> |
|
1 | <channelstream config="AeConfig"></channelstream> | |
2 | <appenlight-header></appenlight-header> |
|
2 | <appenlight-header></appenlight-header> | |
|
3 | <div class="container" data-ng-if="flash.length"> | |||
|
4 | <div class="row" style="margin-bottom: 10px"> | |||
|
5 | <div class="col-xs-12"> | |||
|
6 | <uib-alert data-ng-repeat="message in flash" | |||
|
7 | type="{{ message.type }}" | |||
|
8 | close="closeAlert($index)" class="animate-repeat"> | |||
|
9 | {{ message.msg }}</uib-alert> | |||
|
10 | </div> | |||
|
11 | </div> | |||
|
12 | </div> | |||
|
13 | ||||
3 | <div id="outer-content"> |
|
14 | <div id="outer-content"> | |
4 | <div ui-view class="container"></div> |
|
15 | <div ui-view class="container"></div> | |
5 | </div> |
|
16 | </div> |
@@ -1,247 +1,244 b'' | |||||
1 | // # Copyright (C) 2010-2016 RhodeCode GmbH |
|
1 | // # Copyright (C) 2010-2016 RhodeCode GmbH | |
2 | // # |
|
2 | // # | |
3 | // # This program is free software: you can redistribute it and/or modify |
|
3 | // # This program is free software: you can redistribute it and/or modify | |
4 | // # it under the terms of the GNU Affero General Public License, version 3 |
|
4 | // # it under the terms of the GNU Affero General Public License, version 3 | |
5 | // # (only), as published by the Free Software Foundation. |
|
5 | // # (only), as published by the Free Software Foundation. | |
6 | // # |
|
6 | // # | |
7 | // # This program is distributed in the hope that it will be useful, |
|
7 | // # This program is distributed in the hope that it will be useful, | |
8 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
8 | // # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
9 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
9 | // # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
10 | // # GNU General Public License for more details. |
|
10 | // # GNU General Public License for more details. | |
11 | // # |
|
11 | // # | |
12 | // # You should have received a copy of the GNU Affero General Public License |
|
12 | // # You should have received a copy of the GNU Affero General Public License | |
13 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
13 | // # along with this program. If not, see <http://www.gnu.org/licenses/>. | |
14 | // # |
|
14 | // # | |
15 | // # This program is dual-licensed. If you wish to learn more about the |
|
15 | // # This program is dual-licensed. If you wish to learn more about the | |
16 | // # AppEnlight Enterprise Edition, including its added features, Support |
|
16 | // # AppEnlight Enterprise Edition, including its added features, Support | |
17 | // # services, and proprietary license terms, please see |
|
17 | // # services, and proprietary license terms, please see | |
18 | // # https://rhodecode.com/licenses/ |
|
18 | // # https://rhodecode.com/licenses/ | |
19 |
|
19 | |||
20 | angular.module('appenlight').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { |
|
20 | angular.module('appenlight').config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) { | |
21 |
|
21 | |||
22 | $urlRouterProvider.otherwise('/ui'); |
|
22 | $urlRouterProvider.otherwise('/ui'); | |
23 |
|
23 | |||
24 | $stateProvider.state('logs', { |
|
24 | $stateProvider.state('logs', { | |
25 | url: '/ui/logs?resource', |
|
25 | url: '/ui/logs?resource', | |
26 | component: 'logsBrowserView' |
|
26 | component: 'logsBrowserView' | |
27 | }); |
|
27 | }); | |
28 |
|
28 | |||
29 | $stateProvider.state('front_dashboard', { |
|
29 | $stateProvider.state('front_dashboard', { | |
30 | url: '/ui', |
|
30 | url: '/ui', | |
31 | component: 'indexDashboardView' |
|
31 | component: 'indexDashboardView' | |
32 | }); |
|
32 | }); | |
33 |
|
33 | |||
34 | $stateProvider.state('report', { |
|
34 | $stateProvider.state('report', { | |
35 | abstract: true, |
|
35 | abstract: true, | |
36 | url: '/ui/report', |
|
36 | url: '/ui/report', | |
37 | templateUrl: 'templates/reports/parent_view.html' |
|
37 | templateUrl: 'templates/reports/parent_view.html' | |
38 | }); |
|
38 | }); | |
39 |
|
39 | |||
40 | $stateProvider.state('report.list', { |
|
40 | $stateProvider.state('report.list', { | |
41 | url: '?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource', |
|
41 | url: '?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource', | |
42 | templateUrl: 'templates/reports/list.html', |
|
42 | templateUrl: 'templates/reports/list.html', | |
43 | controller: 'ReportsListController as reports_list' |
|
43 | controller: 'ReportsListController as reports_list' | |
44 | }); |
|
44 | }); | |
45 |
|
45 | |||
46 | $stateProvider.state('report.list_slow', { |
|
46 | $stateProvider.state('report.list_slow', { | |
47 | url: '/list_slow?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource', |
|
47 | url: '/list_slow?start_date&min_duration&max_duration&{view_name:any}&{server_name:any}&resource', | |
48 | templateUrl: 'templates/reports/list_slow.html', |
|
48 | templateUrl: 'templates/reports/list_slow.html', | |
49 | controller: 'ReportsListSlowController as reports_list' |
|
49 | controller: 'ReportsListSlowController as reports_list' | |
50 | }); |
|
50 | }); | |
51 |
|
51 | |||
52 | $stateProvider.state('report.view_detail', { |
|
52 | $stateProvider.state('report.view_detail', { | |
53 | url: '/:groupId/:reportId', |
|
53 | url: '/:groupId/:reportId', | |
54 | templateUrl: 'templates/reports/view.html', |
|
54 | templateUrl: 'templates/reports/view.html', | |
55 | controller: 'ReportsViewController as report' |
|
55 | controller: 'ReportsViewController as report' | |
56 | }); |
|
56 | }); | |
57 | $stateProvider.state('report.view_group', { |
|
57 | $stateProvider.state('report.view_group', { | |
58 | url: '/:groupId', |
|
58 | url: '/:groupId', | |
59 | templateUrl: 'templates/reports/view.html', |
|
59 | templateUrl: 'templates/reports/view.html', | |
60 | controller: 'ReportsViewController as report' |
|
60 | controller: 'ReportsViewController as report' | |
61 | }); |
|
61 | }); | |
62 | $stateProvider.state('events', { |
|
62 | $stateProvider.state('events', { | |
63 | url: '/ui/events', |
|
63 | url: '/ui/events', | |
64 | component: 'eventBrowserView' |
|
64 | component: 'eventBrowserView' | |
65 | }); |
|
65 | }); | |
66 | $stateProvider.state('admin', { |
|
66 | $stateProvider.state('admin', { | |
67 | url: '/ui/admin', |
|
67 | url: '/ui/admin', | |
68 | templateUrl: 'templates/admin/parent_view.html' |
|
68 | templateUrl: 'templates/admin/parent_view.html' | |
69 | }); |
|
69 | }); | |
70 | $stateProvider.state('admin.user', { |
|
70 | $stateProvider.state('admin.user', { | |
71 | abstract: true, |
|
71 | abstract: true, | |
72 | url: '/user', |
|
72 | url: '/user', | |
73 | templateUrl: 'templates/admin/users/parent_view.html' |
|
73 | templateUrl: 'templates/admin/users/parent_view.html' | |
74 | }); |
|
74 | }); | |
75 | $stateProvider.state('admin.user.list', { |
|
75 | $stateProvider.state('admin.user.list', { | |
76 | url: '/list', |
|
76 | url: '/list', | |
77 | templateUrl: 'templates/admin/users/users_list.html', |
|
77 | templateUrl: 'templates/admin/users/users_list.html', | |
78 | controller: 'AdminUsersController as users' |
|
78 | controller: 'AdminUsersController as users' | |
79 | }); |
|
79 | }); | |
80 | $stateProvider.state('admin.user.create', { |
|
80 | $stateProvider.state('admin.user.create', { | |
81 | url: '/create', |
|
81 | url: '/create', | |
82 | templateUrl: 'templates/admin/users/users_create.html', |
|
82 | templateUrl: 'templates/admin/users/users_create.html', | |
83 | controller: 'AdminUsersCreateController as user' |
|
83 | controller: 'AdminUsersCreateController as user' | |
84 | }); |
|
84 | }); | |
85 | $stateProvider.state('admin.user.update', { |
|
85 | $stateProvider.state('admin.user.update', { | |
86 | url: '/{userId}/update', |
|
86 | url: '/{userId}/update', | |
87 | templateUrl: 'templates/admin/users/users_create.html', |
|
87 | templateUrl: 'templates/admin/users/users_create.html', | |
88 | controller: 'AdminUsersCreateController as user' |
|
88 | controller: 'AdminUsersCreateController as user' | |
89 | }); |
|
89 | }); | |
90 |
|
90 | |||
91 |
|
91 | |||
92 | $stateProvider.state('admin.group', { |
|
92 | $stateProvider.state('admin.group', { | |
93 | abstract: true, |
|
93 | abstract: true, | |
94 | url: '/group', |
|
94 | url: '/group', | |
95 | templateUrl: 'templates/admin/groups/parent_view.html' |
|
95 | templateUrl: 'templates/admin/groups/parent_view.html' | |
96 | }); |
|
96 | }); | |
97 | $stateProvider.state('admin.group.list', { |
|
97 | $stateProvider.state('admin.group.list', { | |
98 | url: '/list', |
|
98 | url: '/list', | |
99 | templateUrl: 'templates/admin/groups/groups_list.html', |
|
99 | templateUrl: 'templates/admin/groups/groups_list.html', | |
100 | controller: 'AdminGroupsController as groups' |
|
100 | controller: 'AdminGroupsController as groups' | |
101 | }); |
|
101 | }); | |
102 | $stateProvider.state('admin.group.create', { |
|
102 | $stateProvider.state('admin.group.create', { | |
103 | url: '/create', |
|
103 | url: '/create', | |
104 | templateUrl: 'templates/admin/groups/groups_create.html', |
|
104 | templateUrl: 'templates/admin/groups/groups_create.html', | |
105 | controller: 'AdminGroupsCreateController as group' |
|
105 | controller: 'AdminGroupsCreateController as group' | |
106 | }); |
|
106 | }); | |
107 | $stateProvider.state('admin.group.update', { |
|
107 | $stateProvider.state('admin.group.update', { | |
108 | url: '/{groupId}/update', |
|
108 | url: '/{groupId}/update', | |
109 | templateUrl: 'templates/admin/groups/groups_create.html', |
|
109 | templateUrl: 'templates/admin/groups/groups_create.html', | |
110 | controller: 'AdminGroupsCreateController as group' |
|
110 | controller: 'AdminGroupsCreateController as group' | |
111 | }); |
|
111 | }); | |
112 |
|
112 | |||
113 | $stateProvider.state('admin.application', { |
|
113 | $stateProvider.state('admin.application', { | |
114 | abstract: true, |
|
114 | abstract: true, | |
115 | url: '/application', |
|
115 | url: '/application', | |
116 | templateUrl: 'templates/admin/users/parent_view.html' |
|
116 | templateUrl: 'templates/admin/users/parent_view.html' | |
117 | }); |
|
117 | }); | |
118 |
|
118 | |||
119 | $stateProvider.state('admin.application.list', { |
|
119 | $stateProvider.state('admin.application.list', { | |
120 | url: '/list', |
|
120 | url: '/list', | |
121 | templateUrl: 'templates/admin/applications/applications_list.html', |
|
121 | templateUrl: 'templates/admin/applications/applications_list.html', | |
122 | controller: 'AdminApplicationsListController as applications' |
|
122 | controller: 'AdminApplicationsListController as applications' | |
123 | }); |
|
123 | }); | |
124 |
|
124 | |||
125 | $stateProvider.state('admin.partitions', { |
|
125 | $stateProvider.state('admin.partitions', { | |
126 | url: '/partitions', |
|
126 | url: '/partitions', | |
127 | templateUrl: 'templates/admin/partitions.html', |
|
127 | templateUrl: 'templates/admin/partitions.html', | |
128 | controller: 'AdminPartitionsController as partitions' |
|
128 | controller: 'AdminPartitionsController as partitions' | |
129 | }); |
|
129 | }); | |
130 | $stateProvider.state('admin.system', { |
|
130 | $stateProvider.state('admin.system', { | |
131 | url: '/system', |
|
131 | url: '/system', | |
132 | templateUrl: 'templates/admin/system.html', |
|
132 | templateUrl: 'templates/admin/system.html', | |
133 | controller: 'AdminSystemController as system' |
|
133 | controller: 'AdminSystemController as system' | |
134 | }); |
|
134 | }); | |
135 |
|
135 | |||
136 | $stateProvider.state('admin.configs', { |
|
136 | $stateProvider.state('admin.configs', { | |
137 | abstract: true, |
|
137 | abstract: true, | |
138 | url: '/configs', |
|
138 | url: '/configs', | |
139 | templateUrl: 'templates/admin/configs/parent_view.html' |
|
139 | templateUrl: 'templates/admin/configs/parent_view.html' | |
140 | }); |
|
140 | }); | |
141 |
|
141 | |||
142 | $stateProvider.state('admin.configs.list', { |
|
142 | $stateProvider.state('admin.configs.list', { | |
143 | url: '', |
|
143 | url: '/list', | |
144 | templateUrl: 'templates/admin/configs/edit.html', |
|
144 | templateUrl: 'templates/admin/configs/edit.html', | |
145 | controller: 'ConfigsListController as configs' |
|
145 | controller: 'ConfigsListController as configs' | |
146 | }); |
|
146 | }); | |
147 |
|
147 | |||
148 | $stateProvider.state('user', { |
|
148 | $stateProvider.state('user', { | |
149 | url: '/ui/user', |
|
149 | url: '/ui/user', | |
150 | templateUrl: 'templates/user/parent_view.html' |
|
150 | component: 'settingsView' | |
151 | }); |
|
151 | }); | |
152 |
|
152 | |||
153 | $stateProvider.state('user.profile', { |
|
153 | $stateProvider.state('user.profile', { | |
154 | abstract: true, |
|
154 | abstract: true, | |
155 | url: '/profile', |
|
155 | template: '<ui-view></ui-view>' | |
156 | templateUrl: 'templates/user/profile.html' |
|
|||
157 | }); |
|
156 | }); | |
158 | $stateProvider.state('user.profile.edit', { |
|
157 | $stateProvider.state('user.profile.edit', { | |
159 | url: '', |
|
158 | url: '/profile', | |
160 | templateUrl: 'templates/user/profile_edit.html', |
|
159 | component: 'userProfileView' | |
161 | controller: 'UserProfileController as profile' |
|
|||
162 | }); |
|
160 | }); | |
163 |
|
161 | |||
164 |
|
162 | |||
165 | $stateProvider.state('user.profile.password', { |
|
163 | $stateProvider.state('user.profile.password', { | |
166 | url: '/password', |
|
164 | url: '/password', | |
167 | templateUrl: 'templates/user/profile_password.html', |
|
165 | templateUrl: 'templates/user/profile_password.html', | |
168 | controller: 'UserPasswordController as password' |
|
166 | controller: 'UserPasswordController as password' | |
169 | }); |
|
167 | }); | |
170 |
|
168 | |||
171 | $stateProvider.state('user.profile.identities', { |
|
169 | $stateProvider.state('user.profile.identities', { | |
172 | url: '/identities', |
|
170 | url: '/identities', | |
173 | templateUrl: 'templates/user/profile_identities.html', |
|
171 | component: 'userIdentitiesView' | |
174 | controller: 'UserIdentitiesController as identities' |
|
|||
175 | }); |
|
172 | }); | |
176 |
|
173 | |||
177 | $stateProvider.state('user.profile.auth_tokens', { |
|
174 | $stateProvider.state('user.profile.auth_tokens', { | |
178 | url: '/auth_tokens', |
|
175 | url: '/auth_tokens', | |
179 | templateUrl: 'templates/user/auth_tokens.html', |
|
176 | templateUrl: 'templates/user/auth_tokens.html', | |
180 | controller: 'UserAuthTokensController as auth_tokens' |
|
177 | controller: 'UserAuthTokensController as auth_tokens' | |
181 | }); |
|
178 | }); | |
182 |
|
179 | |||
183 | $stateProvider.state('user.alert_channels', { |
|
180 | $stateProvider.state('user.alert_channels', { | |
184 | abstract: true, |
|
181 | abstract: true, | |
185 | url: '/alert_channels', |
|
182 | url: '/alert_channels', | |
186 | templateUrl: 'templates/user/alert_channels.html' |
|
183 | templateUrl: 'templates/user/alert_channels.html' | |
187 | }); |
|
184 | }); | |
188 |
|
185 | |||
189 | $stateProvider.state('user.alert_channels.list', { |
|
186 | $stateProvider.state('user.alert_channels.list', { | |
190 | url: '', |
|
187 | url: '/list', | |
191 | templateUrl: 'templates/user/alert_channels_list.html', |
|
188 | templateUrl: 'templates/user/alert_channels_list.html', | |
192 | controller: 'AlertChannelsController as channels' |
|
189 | controller: 'AlertChannelsController as channels' | |
193 | }); |
|
190 | }); | |
194 |
|
191 | |||
195 | $stateProvider.state('user.alert_channels.email', { |
|
192 | $stateProvider.state('user.alert_channels.email', { | |
196 | url: '/email', |
|
193 | url: '/email', | |
197 | templateUrl: 'templates/user/alert_channels_email.html', |
|
194 | templateUrl: 'templates/user/alert_channels_email.html', | |
198 | controller: 'AlertChannelsEmailController as email' |
|
195 | controller: 'AlertChannelsEmailController as email' | |
199 | }); |
|
196 | }); | |
200 |
|
197 | |||
201 | $stateProvider.state('applications', { |
|
198 | $stateProvider.state('applications', { | |
202 | abstract: true, |
|
199 | abstract: true, | |
203 | url: '/ui/applications', |
|
200 | url: '/ui/applications', | |
204 | templateUrl: 'templates/applications/parent_view.html' |
|
201 | templateUrl: 'templates/applications/parent_view.html' | |
205 | }); |
|
202 | }); | |
206 |
|
203 | |||
207 | $stateProvider.state('applications.list', { |
|
204 | $stateProvider.state('applications.list', { | |
208 | url: '', |
|
205 | url: '/list', | |
209 | templateUrl: 'templates/applications/list.html', |
|
206 | templateUrl: 'templates/applications/list.html', | |
210 | controller: 'ApplicationsListController as applications' |
|
207 | controller: 'ApplicationsListController as applications' | |
211 | }); |
|
208 | }); | |
212 | $stateProvider.state('applications.update', { |
|
209 | $stateProvider.state('applications.update', { | |
213 | url: '/{resourceId}/update', |
|
210 | url: '/{resourceId}/update', | |
214 | templateUrl: 'templates/applications/applications_update.html', |
|
211 | templateUrl: 'templates/applications/applications_update.html', | |
215 | controller: 'ApplicationsUpdateController as application' |
|
212 | controller: 'ApplicationsUpdateController as application' | |
216 | }); |
|
213 | }); | |
217 |
|
214 | |||
218 | $stateProvider.state('applications.integrations', { |
|
215 | $stateProvider.state('applications.integrations', { | |
219 | url: '/{resourceId}/integrations', |
|
216 | url: '/{resourceId}/integrations', | |
220 | templateUrl: 'templates/applications/integrations.html', |
|
217 | templateUrl: 'templates/applications/integrations.html', | |
221 | controller: 'IntegrationsListController as integrations', |
|
218 | controller: 'IntegrationsListController as integrations', | |
222 | data: { |
|
219 | data: { | |
223 | resource: null |
|
220 | resource: null | |
224 | } |
|
221 | } | |
225 | }); |
|
222 | }); | |
226 |
|
223 | |||
227 | $stateProvider.state('applications.purge_logs', { |
|
224 | $stateProvider.state('applications.purge_logs', { | |
228 | url: '/purge_logs', |
|
225 | url: '/purge_logs', | |
229 | templateUrl: 'templates/applications/applications_purge_logs.html', |
|
226 | templateUrl: 'templates/applications/applications_purge_logs.html', | |
230 | controller: 'ApplicationsPurgeLogsController as applications_purge' |
|
227 | controller: 'ApplicationsPurgeLogsController as applications_purge' | |
231 | }); |
|
228 | }); | |
232 |
|
229 | |||
233 | $stateProvider.state('applications.integrations.edit', { |
|
230 | $stateProvider.state('applications.integrations.edit', { | |
234 | url: '/{integration}', |
|
231 | url: '/{integration}', | |
235 | templateUrl: function ($stateParams) { |
|
232 | templateUrl: function ($stateParams) { | |
236 | return 'templates/applications/integrations/' + $stateParams.integration + '.html' |
|
233 | return 'templates/applications/integrations/' + $stateParams.integration + '.html' | |
237 | }, |
|
234 | }, | |
238 | controller: 'IntegrationController as integration' |
|
235 | controller: 'IntegrationController as integration' | |
239 | }); |
|
236 | }); | |
240 |
|
237 | |||
241 | $stateProvider.state('tests', { |
|
238 | $stateProvider.state('tests', { | |
242 | url: '/ui/tests', |
|
239 | url: '/ui/tests', | |
243 | templateUrl: 'templates/user/alert_channels_test.html', |
|
240 | templateUrl: 'templates/user/alert_channels_test.html', | |
244 | controller: 'AlertChannelsTestController as test_action' |
|
241 | controller: 'AlertChannelsTestController as test_action' | |
245 | }); |
|
242 | }); | |
246 |
|
243 | |||
247 | }]); |
|
244 | }]); |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now