| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| 18 | /** |
| 19 | * @file Instance module |
| 20 | */ |
| 21 | import { CommonModule } from '@angular/common'; |
| 22 | import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; |
| 23 | import { FlexLayoutModule } from '@angular/flex-layout'; |
| 24 | import { FormsModule } from '@angular/forms'; |
| 25 | import { ReactiveFormsModule } from '@angular/forms'; |
| 26 | import { RouterModule, Routes } from '@angular/router'; |
| 27 | import { CodemirrorModule } from '@ctrl/ngx-codemirror'; |
| 28 | import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; |
| 29 | import { NgSelectModule } from '@ng-select/ng-select'; |
| 30 | import { TranslateModule } from '@ngx-translate/core'; |
| 31 | import { AddPDUInstancesComponent } from 'AddPDUInstancesComponent'; |
| 32 | import { DataService } from 'DataService'; |
| 33 | import { HistoryOperationsComponent } from 'HistoryOperationsComponent'; |
| 34 | import { InstancesComponent } from 'InstancesComponent'; |
| 35 | import { LoaderModule } from 'LoaderModule'; |
| 36 | import { NetsliceInstancesComponent } from 'NetsliceInstancesComponent'; |
| 37 | import { SidebarModule } from 'ng-sidebar'; |
| 38 | import { Ng2SmartTableModule } from 'ng2-smart-table'; |
| 39 | import { NSInstancesComponent } from 'NSInstancesComponent'; |
| 40 | import { NSPrimitiveComponent } from 'NSPrimitiveComponent'; |
| 41 | import { NSTopologyComponent } from 'NSTopologyComponent'; |
| Barath Kumar R | f2ae546 | 2021-03-01 12:52:33 +0530 | [diff] [blame] | 42 | import { OperationalViewAppActionsComponent } from 'OperationalAppActionsComponent'; |
| 43 | import { OperationalViewAppConfigsComponent } from 'OperationalAppConfigsComponent'; |
| 44 | import { OperationalViewAppExecutedActionsComponent } from 'OperationalAppExecutedActionsComponent'; |
| 45 | import { OperationalViewComponent } from 'OperationalViewComponent'; |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 46 | import { PagePerRowModule } from 'PagePerRowModule'; |
| 47 | import { PageReloadModule } from 'PageReloadModule'; |
| 48 | import { PDUInstancesComponent } from 'PDUInstancesComponent'; |
| 49 | import { VNFInstancesComponent } from 'VNFInstancesComponent'; |
| 50 | |
| 51 | /** To halndle project information */ |
| 52 | const projectInfo: {} = { title: '{project}', url: '/' }; |
| 53 | |
| 54 | /** Exporting a function using Routes @exports routes */ |
| 55 | const routes: Routes = [ |
| 56 | { |
| 57 | path: '', |
| 58 | component: InstancesComponent, |
| 59 | children: [ |
| 60 | { |
| 61 | path: 'ns', |
| 62 | data: { |
| 63 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 64 | projectInfo, { title: 'NSINSTANCES', url: null }] |
| 65 | }, |
| 66 | component: NSInstancesComponent |
| 67 | }, |
| 68 | { |
| 69 | path: 'vnf', |
| 70 | data: { |
| 71 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 72 | projectInfo, { title: 'VNFINSTANCES', url: null }] |
| 73 | }, |
| 74 | component: VNFInstancesComponent |
| 75 | }, |
| 76 | { |
| 77 | path: 'pdu', |
| 78 | data: { |
| 79 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 80 | projectInfo, { title: 'PDUINSTANCES', url: null }] |
| 81 | }, |
| 82 | component: PDUInstancesComponent |
| 83 | }, |
| 84 | { |
| 85 | path: 'netslice', |
| 86 | data: { |
| 87 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 88 | projectInfo, { title: 'PAGE.DASHBOARD.NETSLICEINSTANCE', url: null }] |
| 89 | }, |
| 90 | component: NetsliceInstancesComponent |
| 91 | }, |
| 92 | { |
| 93 | path: ':type/history-operations/:id', |
| 94 | data: { |
| 95 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 96 | projectInfo, { title: '{type}', url: '/instances/{type}' }, { title: '{id}', url: null }] |
| 97 | }, |
| 98 | component: HistoryOperationsComponent |
| 99 | }, |
| 100 | { |
| 101 | path: 'ns/:id', |
| 102 | data: { |
| 103 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 104 | projectInfo, { title: 'NSINSTANCES', url: '/instances/ns' }, { title: '{id}', url: null }] |
| 105 | }, |
| 106 | component: NSTopologyComponent |
| Barath Kumar R | f2ae546 | 2021-03-01 12:52:33 +0530 | [diff] [blame] | 107 | }, |
| 108 | { |
| 109 | path: 'operational-view', |
| 110 | data: { |
| 111 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 112 | projectInfo, { title: 'PAGE.OPERATIONALDASHBOARD.TITLE', url: null }] |
| 113 | }, |
| 114 | component: OperationalViewComponent |
| 115 | }, |
| 116 | { |
| 117 | path: 'operational-view/:id', |
| 118 | data: { |
| 119 | breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' }, |
| 120 | projectInfo, { title: 'PAGE.OPERATIONALDASHBOARD.TITLE', url: '/instances/operational-view' }, |
| 121 | { title: '{id}', url: null }] |
| 122 | }, |
| 123 | component: OperationalViewComponent |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 124 | } |
| 125 | ] |
| 126 | } |
| 127 | ]; |
| 128 | |
| 129 | /** |
| 130 | * An NgModule is a class adorned with the @NgModule decorator function. |
| 131 | * @NgModule takes a metadata object that tells Angular how to compile and run module code. |
| 132 | */ |
| 133 | @NgModule({ |
| 134 | imports: [ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }), FormsModule, TranslateModule, |
| 135 | CodemirrorModule, CommonModule, Ng2SmartTableModule, FlexLayoutModule, RouterModule.forChild(routes), NgbModule, |
| 136 | NgSelectModule, PagePerRowModule, LoaderModule, SidebarModule.forRoot(), PageReloadModule], |
| 137 | declarations: [InstancesComponent, NSInstancesComponent, VNFInstancesComponent, PDUInstancesComponent, AddPDUInstancesComponent, |
| Barath Kumar R | f2ae546 | 2021-03-01 12:52:33 +0530 | [diff] [blame] | 138 | NetsliceInstancesComponent, HistoryOperationsComponent, NSTopologyComponent, NSPrimitiveComponent, OperationalViewComponent, |
| 139 | OperationalViewAppConfigsComponent, OperationalViewAppActionsComponent, OperationalViewAppExecutedActionsComponent], |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 140 | schemas: [CUSTOM_ELEMENTS_SCHEMA], |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame^] | 141 | providers: [DataService] |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 142 | }) |
| 143 | /** Exporting a class @exports InstancesModule */ |
| 144 | export class InstancesModule { |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 145 | /** |
| 146 | * Lifecyle Hooks the trigger before component is instantiate |
| 147 | */ |
| SANDHYA.JS | 0a34dfa | 2023-04-25 23:59:41 +0530 | [diff] [blame^] | 148 | constructor() { |
| 149 | //Empty |
| 150 | } |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 151 | } |