Feature 10911-Vertical scaling of VM instances from OSM
[osm/NG-UI.git] / src / app / AppModule.ts
index 02fa736..5244bb2 100644 (file)
@@ -19,7 +19,7 @@
  * @file Instance Module file
  */
 import { CommonModule, LOCATION_INITIALIZED } from '@angular/common';
-import { HTTP_INTERCEPTORS, HttpClient, HttpClientModule } from '@angular/common/http';
+import { HttpClient, HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
 import { APP_INITIALIZER, Injector, NgModule } from '@angular/core';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { BrowserModule } from '@angular/platform-browser';
@@ -50,6 +50,8 @@ import { NgIdleKeepaliveModule } from '@ng-idle/keepalive';
 import { AuthenticationService } from 'AuthenticationService';
 import { AuthGuardService } from 'AuthGuardService';
 import { BreadcrumbComponent } from 'BreadCrumb';
+import { ChangePasswordComponent } from 'ChangePasswordComponent';
+import { ChangePasswordModule } from 'ChangePasswordModule';
 import { ComposePackages } from 'ComposePackages';
 import { ConfirmationTopologyComponent } from 'ConfirmationTopology';
 import { DeleteComponent } from 'DeleteComponent';
@@ -63,19 +65,26 @@ import { NetsliceInstancesActionComponent } from 'NetsliceInstancesActionCompone
 import { NetslicePackagesActionComponent } from 'NetslicePackagesAction';
 import { NSInstancesActionComponent } from 'NSInstancesActionComponent';
 import { NsPackagesActionComponent } from 'NsPackagesAction';
+import { NsUpdateComponent } from 'NsUpdateComponent';
 import { PageNotFoundComponent } from 'PageNotFound';
 import { PDUInstancesActionComponent } from 'PDUInstancesActionComponent';
 import { ProjectLinkComponent } from 'ProjectLinkComponent';
 import { ProjectsActionComponent } from 'ProjectsAction';
+import { ScalingComponent } from 'ScalingComponent';
 import { SDNControllerActionComponent } from 'SDNControllerActionComponent';
+import { SharedModule } from 'SharedModule';
 import { ShowInfoComponent } from 'ShowInfoComponent';
+import { StartStopRebuildComponent } from 'StartStopRebuildComponent';
 import { SwitchProjectComponent } from 'SwitchProjectComponent';
 import { UsersActionComponent } from 'UsersActionComponent';
 import { UserSettingsComponent } from 'UserSettingsComponent';
+import { VerticalScalingComponent } from 'VerticalScalingComponent';
 import { VimAccountsActionComponent } from 'VimAccountsAction';
+import { VmMigrationComponent } from 'VmMigrationComponent';
 import { VNFInstancesActionComponent } from 'VNFInstancesActionComponent';
 import { VNFLinkComponent } from 'VNFLinkComponent';
 import { VNFPackagesActionComponent } from 'VNFPackagesAction';
+import { WarningComponent } from 'WarningComponent';
 import { WIMAccountsActionComponent } from 'WIMAccountsAction';
 
 /**
@@ -121,7 +130,14 @@ const customNotifierOptions: NotifierOptions = {
         PDUInstancesActionComponent,
         SDNControllerActionComponent,
         SwitchProjectComponent,
-        GoToTopDirective
+        GoToTopDirective,
+        ScalingComponent,
+        ChangePasswordComponent,
+        VmMigrationComponent,
+        NsUpdateComponent,
+        WarningComponent,
+        StartStopRebuildComponent,
+        VerticalScalingComponent
     ],
     imports: [
         NotifierModule.withConfig(customNotifierOptions),
@@ -143,9 +159,11 @@ const customNotifierOptions: NotifierOptions = {
         }),
         NgbModule,
         NgSelectModule,
-        RouterModule.forRoot(appRoutes, { useHash: false }),
+        RouterModule.forRoot(appRoutes, { useHash: false, relativeLinkResolution: 'legacy' }),
         NgIdleKeepaliveModule.forRoot(),
-        LoaderModule
+        LoaderModule,
+        SharedModule,
+        ChangePasswordModule
     ],
     providers: [
         {
@@ -191,7 +209,14 @@ const customNotifierOptions: NotifierOptions = {
         WIMAccountsActionComponent,
         PDUInstancesActionComponent,
         SDNControllerActionComponent,
-        SwitchProjectComponent
+        SwitchProjectComponent,
+        ScalingComponent,
+        ChangePasswordComponent,
+        VmMigrationComponent,
+        NsUpdateComponent,
+        WarningComponent,
+        StartStopRebuildComponent,
+        VerticalScalingComponent
     ]
 })
 
@@ -220,7 +245,7 @@ export function appInitializerFactory(translate: TranslateService, injector: Inj
         translate.setDefaultLang('en');
         const languageCode: string = localStorage.getItem('languageCode');
         if (languageCode !== null && languageCode !== undefined && languageCode !== '') {
-            await translate.use(languageCode).toPromise().catch(() => {
+            await translate.use(languageCode).toPromise().catch((): void => {
                 translate.setDefaultLang('en');
             });
         } else {