blob: 14d816597dd13c70b737aeb96e6e3138bd26ddfb [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 K8s Module.
20 */
21import { CommonModule } from '@angular/common';
22import { HttpClientModule } from '@angular/common/http';
23import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
24import { FormsModule } from '@angular/forms';
25import { ReactiveFormsModule } from '@angular/forms';
26import { RouterModule, Routes } from '@angular/router';
27import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
28import { NgSelectModule } from '@ng-select/ng-select';
29import { TranslateModule } from '@ngx-translate/core';
30import { DataService } from 'DataService';
31import { K8sActionComponent } from 'K8sActionComponent';
32import { K8sAddClusterComponent } from 'K8sAddClusterComponent';
33import { K8sAddRepoComponent } from 'K8sAddRepoComponent';
34import { K8sClusterComponent } from 'K8sClusterComponent';
35import { K8sComponent } from 'K8sComponent';
36import { K8sRepositoryComponent } from 'K8sRepositoryComponent';
37import { LoaderModule } from 'LoaderModule';
38import { Ng2SmartTableModule } from 'ng2-smart-table';
39import { PagePerRowModule } from 'PagePerRowModule';
40import { PageReloadModule } from 'PageReloadModule';
41
42/** To halndle project information */
43const projectInfo: {} = { title: '{project}', url: '/' };
44
45/**
46 * configures routers
47 */
48const routes: Routes = [
49 {
50 path: '',
51 component: K8sComponent,
52 children: [
53 {
54 path: 'cluster',
55 data: {
56 breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' },
57 projectInfo, { title: 'PAGE.K8S.MENUK8SCLUSTER', url: null }]
58 },
59 component: K8sClusterComponent
60 },
61 {
62 path: 'repo',
63 data: {
64 breadcrumb: [{ title: 'PAGE.DASHBOARD.DASHBOARD', url: '/' }, { title: 'PAGE.DASHBOARD.PROJECTS', url: '/projects' },
65 projectInfo, { title: 'PAGE.K8S.MENUK8SREPO', url: null }]
66 },
67 component: K8sRepositoryComponent
68 }
69 ]
70 }
71];
72/**
73 * Creating @NgModule component for Modules
74 */
75@NgModule({
76 imports: [
77 ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }),
78 FormsModule,
79 CommonModule,
80 HttpClientModule,
81 NgSelectModule,
82 Ng2SmartTableModule,
83 TranslateModule,
84 RouterModule.forChild(routes),
85 NgbModule,
86 PagePerRowModule,
87 LoaderModule,
88 PageReloadModule
89 ],
90 declarations: [
91 K8sComponent,
92 K8sClusterComponent,
93 K8sRepositoryComponent,
94 K8sActionComponent,
95 K8sAddClusterComponent,
96 K8sAddRepoComponent
97 ],
98 providers: [DataService],
SANDHYA.JS0a34dfa2023-04-25 23:59:41 +053099 schemas: [CUSTOM_ELEMENTS_SCHEMA]
kumaran.m3b4814a2020-05-01 19:48:54 +0530100})
101/** Exporting a class @exports K8sModule */
102export class K8sModule {
103 /** Variables declared to avoid state-less class */
104 private k8sModule: string;
105}