Fix mod ui build issues
[dcaegen2/platform.git] / mod2 / ui / src / app / app.module.ts
1 /* 
2  *  # ============LICENSE_START=======================================================
3  *  # Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
4  *  # ================================================================================
5  *  # Licensed under the Apache License, Version 2.0 (the "License");
6  *  # you may not use this file except in compliance with the License.
7  *  # You may obtain a copy of the License at
8  *  #
9  *  #      http://www.apache.org/licenses/LICENSE-2.0
10  *  #
11  *  # Unless required by applicable law or agreed to in writing, software
12  *  # distributed under the License is distributed on an "AS IS" BASIS,
13  *  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  # See the License for the specific language governing permissions and
15  *  # limitations under the License.
16  *  # ============LICENSE_END=========================================================
17  */
18
19 import { BrowserModule } from '@angular/platform-browser';
20 import { NgModule } from '@angular/core';
21
22 import { AppRoutingModule } from './app-routing.module';
23 import { AppComponent } from './app.component';
24 import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
25 import { PathLocationStrategy, LocationStrategy} from '@angular/common';
26
27 import { SharedModule } from './shared/shared-module';
28 import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
29 import { HomeComponent } from './home/home.component';
30 import { LayoutModule } from '@angular/cdk/layout';
31 import { MatToolbarModule } from '@angular/material/toolbar';
32 import { MatButtonModule } from '@angular/material/button';
33 import { MatSidenavModule } from '@angular/material/sidenav';
34 import { MatIconModule } from '@angular/material/icon';
35 import { MatListModule } from '@angular/material/list';
36 import { MatTableModule } from '@angular/material/table';
37 import { MatPaginatorModule } from '@angular/material/paginator';
38 import { MatSortModule } from '@angular/material/sort';
39 import { MatTreeModule } from '@angular/material/tree';
40 import { MatCardModule } from '@angular/material/card';
41 import { MaterialElevationDirective } from './material-elevation.directive';
42 import { MatProgressSpinnerModule, MatTooltipModule, MatMenuModule } from '@angular/material';
43 import { OnboardingToolsComponent, SafePipe } from './onboarding-tools/onboarding-tools.component';
44 import { CompSpecsComponent } from './comp-specs/comp-specs.component';
45 import { MatTableExporterModule } from 'mat-table-exporter';
46 import { TableModule } from 'primeng/table';
47 import { MsInstancesComponent } from './msInstances/msInstances.component';
48 import { ButtonModule } from 'primeng/button';
49 import { SidebarModule } from 'primeng/sidebar';
50 import { MenuModule } from 'primeng/menu';
51 import { ToolbarModule } from 'primeng/toolbar';
52 import { PanelMenuModule } from 'primeng/panelmenu';
53 import { CardModule } from 'primeng/card';
54 import { LoginComponent } from './login/login.component';
55 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
56 import { RegisterComponent } from './register/register.component';
57 import { ResetPasswordComponent } from './reset-password/reset-password.component';
58 import { AuthGuard } from './guards/auth.guard';
59 import { RoleGuard } from './guards/role.guard';
60 import { JwtInterceptorService } from './services/jwt-interceptor.service';
61 import { JwtModule } from '@auth0/angular-jwt';
62 import { UserManagementComponent } from './user-management/user-management.component';
63 import { DialogModule } from 'primeng/dialog';
64 import { ToastModule } from 'primeng/toast';
65 import { Ng4LoadingSpinnerModule } from 'ng4-loading-spinner';
66 import { PasswordModule } from 'primeng/password';
67 import { TooltipModule } from 'primeng/tooltip';
68 import { AccordionModule } from 'primeng/accordion';
69 import { SplitButtonModule } from 'primeng/splitbutton';
70 import { DropdownModule } from 'primeng/dropdown';
71 import { FileUploadModule } from 'primeng/fileupload';
72 import { InputTextareaModule } from 'primeng/inputtextarea';
73 import { MatExpansionModule } from '@angular/material/expansion';
74 import { RadioButtonModule } from 'primeng/radiobutton';
75 import { SelectButtonModule } from 'primeng/selectbutton';
76 import { MessageService } from 'primeng/api';
77 import { MsAddChangeComponent } from './ms-add-change/ms-add-change.component';
78 import { MicroservicesComponent } from './microservices/microservices.component';
79 import { PaginatorModule } from 'primeng/paginator';
80 import { ScrollPanelModule } from 'primeng/scrollpanel'; 
81 import { CalendarModule } from 'primeng/calendar';
82 import { BlueprintsComponent } from './blueprints/blueprints.component';
83 import { CompSpecAddComponent } from './comp-spec-add/comp-spec-add.component';
84 import { MsInstanceAddComponent } from './ms-instance-add/ms-instance-add.component';
85 import {MultiSelectModule} from 'primeng/multiselect';
86 import {CheckboxModule} from 'primeng/checkbox';
87 import { InputSwitchModule } from 'primeng/inputswitch';
88 import { CompSpecValidationComponent } from './comp-spec-validation/comp-spec-validation.component';
89
90 @NgModule({
91   declarations: [
92     AppComponent,
93     HomeComponent,
94     MaterialElevationDirective,
95     SafePipe,
96     OnboardingToolsComponent,
97     CompSpecsComponent,
98     MsInstancesComponent,
99     LoginComponent,
100     RegisterComponent,
101     ResetPasswordComponent,
102     UserManagementComponent,
103     MsAddChangeComponent,
104     MicroservicesComponent,
105     BlueprintsComponent,
106     CompSpecAddComponent,
107     MsInstanceAddComponent,
108     CompSpecValidationComponent
109   ],
110   imports: [
111     BrowserModule,
112     AppRoutingModule,
113     BrowserAnimationsModule,
114     SharedModule,
115     HttpClientModule,
116     LayoutModule,
117     MatToolbarModule,
118     MatButtonModule,
119     MatSidenavModule,
120     MatIconModule,
121     MatListModule,
122     MatTableModule,
123     MatPaginatorModule,
124     MatSortModule,
125     MatTreeModule,
126     MatCardModule,
127     MatProgressSpinnerModule,
128     MatTableExporterModule,
129     TableModule, 
130     ButtonModule,
131     SidebarModule,
132     MenuModule,
133     ToolbarModule,
134     PanelMenuModule,
135     FormsModule,
136     ReactiveFormsModule,
137     CardModule,
138     JwtModule.forRoot({
139       config: {
140         tokenGetter: ()=>localStorage.getItem('jwt')
141       }
142     }),
143     DialogModule,
144     ToastModule,
145     Ng4LoadingSpinnerModule,
146     TooltipModule,
147     AccordionModule, 
148     SplitButtonModule,
149     DropdownModule,
150     FileUploadModule,
151     InputTextareaModule,
152     MatExpansionModule,
153     PasswordModule,
154     RadioButtonModule,
155     SelectButtonModule,
156     MatTooltipModule,
157     PaginatorModule,
158     ScrollPanelModule,
159     MatMenuModule,
160     CalendarModule,
161     MultiSelectModule,
162     CheckboxModule,
163     InputSwitchModule
164   ],
165   providers: [AuthGuard, RoleGuard, {
166     provide: HTTP_INTERCEPTORS,
167     useClass: JwtInterceptorService,
168     multi: true
169   }, Location, { provide: LocationStrategy, useClass: PathLocationStrategy }, MessageService],
170   bootstrap: [AppComponent]
171 })
172 export class AppModule { }