a63080a1133a73440e0c5efe9be8ed539992cc86
[portal.git] / ecomp-portal-FE-os / client / src / router.js
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the "License");
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
37  */
38 'use strict';
39
40 angular.module('ecompApp')
41     .config($stateProvider => {
42         $stateProvider
43            .state('root', {
44             abstract: true,
45             views: {
46                 'header@': {
47                     templateUrl: 'app/views/header/header.tpl.html',
48                     controller: 'HeaderCtrl',
49                     controllerAs: 'header'
50                 },
51                 'tabbar@': {
52                     templateUrl: 'app/views/tabs/tabs.tpl.html',
53                     controller: 'TabsCtrl',
54                     controllerAs: 'tabsHome'
55                 },
56                 'sidebar@':{
57                     templateUrl: 'app/views/sidebar/sidebar.tpl.html',
58                     controller: 'SidebarCtrl',
59                     controllerAs: 'sidebar'
60                 },
61                 'userbar@':{
62                     templateUrl: 'app/views/userbar/userbar.tpl.html',
63                     controller: 'UserbarCtrl',
64                     controllerAs: 'userbar'
65                 },
66                 'footer@': {
67                     templateUrl: 'app/views/footer/footer.tpl.html',
68                     controller: 'FooterCtrl',
69                     controllerAs: 'footer'
70                 }
71             }
72         }).state('root.applicationsHome', {
73             url: '/applicationsHome',
74             views: {
75                 'content@': {
76                     templateUrl: 'app/views/dashboard/dashboard.tpl.html',
77                     controller: 'DashboardCtrl',
78                     controllerAs: 'dashboard'
79                 }
80             }
81         }).state('root.appCatalog', {
82             url: '/appCatalog',
83             views: {
84                 'content@': {
85                     templateUrl: 'app/views/catalog/catalog.tpl.html',
86                     controller: 'CatalogCtrl',
87                     controllerAs: 'catalog'
88                 }
89             }
90         }).state('root.widgetCatalog', {
91             url: '/widgetCatalog',
92             views: {
93                 'content@': {
94                     templateUrl: 'app/views/widget-catalog/widget-catalog.tpl.html',
95                     controller: 'WidgetCatalogCtrl',
96                     controllerAs: 'widgetCatalog'
97                 }
98             }
99         }).state('root.admins', {
100             url: '/admins',
101             views: {
102                 'content@': {
103                     templateUrl: 'app/views/admins/admins.tpl.html',
104                     controller: 'AdminsCtrl',
105                     controllerAs: 'admins'
106                 }
107             }
108         }).state('root.roles', {
109             url: '/roles',
110             views: {
111                 'content@': { 
112                     templateUrl: 'app/views/role/role_list.html',
113                     controller: 'roleListController',
114                     controllerAs: 'roles'
115                 }
116             }
117         }).state('root.role', {
118             url: '/role/:roleId',
119             views: {
120                 'content@': { 
121                     templateUrl: 'app/views/role/role.html',
122                     controller: 'roleController',
123                     controllerAs: 'role'
124                 }
125             }
126         }).state('root.roleFunctions', {
127             url: '/roleFunctions',
128             views: {
129                 'content@': { 
130                     templateUrl: 'app/views/role/role_function_list.html',
131                     controller: 'roleFunctionListController',
132                     controllerAs: 'roleFunctions'
133                 }
134             }
135         }).state('root.users', {
136             url: '/users',
137             views: {
138                 'content@': {
139                     templateUrl: 'app/views/users/users.tpl.html',
140                     controller: 'UsersCtrl',
141                     controllerAs: 'users'
142                 }
143             }
144         }).state('root.applications', {
145             url: '/applications',
146             views: {
147                 'content@': {
148                     templateUrl: 'app/views/applications/applications.tpl.html',
149                     controller: 'ApplicationsCtrl',
150                     controllerAs: 'apps'
151                 }
152             }
153         }).state('root.microserviceOnboarding', {
154             url: '/microserviceOnboarding',
155             views: {
156                 'content@': {
157                             templateUrl: 'app/views/microservice-onboarding/microservice-onboarding.tpl.html',
158                             controller: 'MicroserviceOnboardingCtrl',
159                             controllerAs: 'microserviceOnboarding'
160                 }
161             }
162         }).state('root.widgetOnboarding', {
163             url: '/widgetOnboarding',
164             views: {
165                 'content@': {
166                         templateUrl: 'app/views/widget-onboarding/widget-onboarding.tpl.html',
167                         controller: 'WidgetOnboardingCtrl',
168                         controllerAs: 'widgetOnboarding'
169                 }
170             }
171         }).state('root.accountOnboarding', {
172             url: '/accountOnboarding',
173             views: {
174                 'content@': {
175                             templateUrl: 'app/views/account-onboarding/account-onboarding.tpl.html',
176                             controller: 'AccountOnboardingCtrl',
177                             controllerAs: 'accountOnboarding'
178                 }
179             }
180         }).state('root.functionalMenu', {
181             url: '/functionalMenu',
182             views: {
183                 'content@': {
184                     templateUrl: 'app/views/functionalMenu/functionalMenu.tpl.html',
185                     controller: 'FunctionalMenuCtrl',
186                     controllerAs: 'functionalMenu'
187                 }
188             }
189         }).state('root.getAccess', {
190             url: '/getAccess',
191             params: {
192                 appName: null,
193               },
194             views: {
195                 'content@': {
196                     templateUrl: 'app/views/support/get-access/get-access.tpl.html',
197                     controller: 'GetAccessCtrl',
198                     controllerAs: 'access'
199                 }
200             }
201         }).state('root.contactUs', {
202             url: '/contactUs',
203             views: {
204                 'content@': {
205                     templateUrl: 'app/views/support/contact-us/contact-us.tpl.html',
206                     controller: 'ContactUsCtrl',
207                     controllerAs: 'contact'
208                 }
209             }
210         }).state('root.userNotifications', {
211             url: '/userNotifications',
212             views: {
213                 'content@': {
214                     templateUrl: 'app/views/user-notifications-admin/user.notifications.tpl.html',
215                     controller: 'userNotificationsCtrl',
216                     controllerAs: 'userNotifications'
217                 }
218             }
219         }).state('root.notificationHistory', {
220             url: '/notificationHistory',
221             views: {
222                 'content@': {
223                     templateUrl: 'app/views/notification-history/notificationhistory.tpl.html',
224                     controller: 'notificationHistoryCtrl',
225                     controllerAs: 'notificationHistory'
226                 }
227             }
228         }).state('root.portalAdmins', {
229             url: '/portalAdmins',
230             views: {
231                 'content@': {
232                     templateUrl: 'app/views/portal-admin/portal-admin.tpl.html',
233                     controller: 'PortalAdminsCtrl',
234                     controllerAs: 'portalAdmin'
235                 }
236             }
237         }).state('root.error404', {
238             url: '/error404',
239             views: {
240                 'content@': {
241                     templateUrl: 'app/views/errors/error.404.tpl.html',
242                     controller: 'ErrorCtrl',
243                     controllerAs: 'error'
244                 }
245             }
246         }).state('noUserError', {
247             url: '/noUserError',
248             views: {
249                 'error@': {
250                     templateUrl: 'app/views/errors/error.tpl.html',
251                     controller: 'ErrorCtrl',
252                     controllerAs: 'error'
253                 }
254             }
255         }).state('unKnownError', {
256             url: '/unKnownError',
257             views: {
258                 'error@': {
259                     templateUrl: 'app/views/errors/error.tpl.html',
260                     controller: 'ErrorCtrl',
261                     controllerAs: 'error'
262                 }
263             }
264         });
265     });