blob: c646857b403fc699cbcad2aacdd686d1686530fa [file] [log] [blame]
kumaran.m3b4814a2020-05-01 19:48:54 +05301/*
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 Vim Account module.
20 */
21import { CommonModule } from '@angular/common';
22import { HttpClientModule } from '@angular/common/http';
23import { NgModule } from '@angular/core';
24import { FormsModule } from '@angular/forms';
25import { ReactiveFormsModule } from '@angular/forms';
26import { RouterModule, Routes } from '@angular/router';
Barath Kumar Rd477b852020-07-07 15:24:05 +053027import { CodemirrorModule } from '@ctrl/ngx-codemirror';
kumaran.m3b4814a2020-05-01 19:48:54 +053028import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
29import { NgSelectModule } from '@ng-select/ng-select';
30import { TranslateModule } from '@ngx-translate/core';
31import { DataService } from 'DataService';
32import { InfoVimComponent } from 'InfoVim';
33import { LoaderModule } from 'LoaderModule';
34import { NewVimaccountComponent } from 'NewVimaccount';
35import { Ng2SmartTableModule } from 'ng2-smart-table';
36import { PagePerRowModule } from 'PagePerRowModule';
37import { PageReloadModule } from 'PageReloadModule';
38import { VimAccountDetailsComponent } from 'VimAccountDetails';
39import { VimAccountsComponent } from 'VimAccountsComponent';
40
41/** To halndle project information */
42const projectInfo: {} = { title: '{project}', url: '/' };
43
44/** const values for dashboard Routes */
45const routes: Routes = [
46 {
47 path: '',
48 component: VimAccountsComponent,
49 children: [
50 {
51 path: 'details',
52 data: {
53 breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' },
54 projectInfo, { title: 'VIMACCOUNTS', url: null }]
55 },
56 component: VimAccountDetailsComponent
57 },
58 {
59 path: 'info/:id',
60 data: {
61 breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' },
62 projectInfo, { title: 'VIMACCOUNTS', url: '/vim/details' }, { title: '{id}', url: null }]
63 },
64 component: InfoVimComponent
65 },
66 {
67 path: 'new',
68 data: {
69 breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' },
70 projectInfo, { title: 'VIMACCOUNTS', url: '/vim/details' }, { title: 'PAGE.VIMDETAILS.NEWVIM', url: null }]
71 },
72 component: NewVimaccountComponent
73 }
74 ]
75 }
76];
77
78/**
79 * Creating @NgModule component for Modules
80 */
81@NgModule({
82 imports: [ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }), FormsModule, CommonModule,
83 HttpClientModule, NgSelectModule, Ng2SmartTableModule, TranslateModule, RouterModule.forChild(routes), NgbModule,
Barath Kumar Rd477b852020-07-07 15:24:05 +053084 PagePerRowModule, LoaderModule, PageReloadModule, CodemirrorModule],
kumaran.m3b4814a2020-05-01 19:48:54 +053085 declarations: [VimAccountsComponent, InfoVimComponent, VimAccountDetailsComponent, NewVimaccountComponent],
86 providers: [DataService],
87 entryComponents: [InfoVimComponent]
88})
89/** Exporting a class @exports VimAccountsModule */
90export class VimAccountsModule {
91 /** Variables declared to avoid state-less class */
92 private vimModule: string;
93}