From 6420e7aedb6260d50f55b18897aff51822121956 Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Thu, 29 Mar 2018 12:35:49 +0100 Subject: [PATCH] mgr/dashboard: Move services provision to service module Few services were being declared in the shared module. Signed-off-by: Tiago Melo --- .../mgr/dashboard/frontend/src/app/app.module.ts | 5 +---- .../src/app/shared/services/services.module.ts | 6 +++++- .../frontend/src/app/shared/shared.module.ts | 13 +++---------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts index 525e94729fad7..d9d6b5f2d84de 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/app.module.ts @@ -30,15 +30,12 @@ export class CustomOption extends ToastOptions { BrowserAnimationsModule, ToastModule.forRoot(), AppRoutingModule, - HttpClientModule, CoreModule, SharedModule, CephModule, AccordionModule.forRoot(), BsDropdownModule.forRoot(), - TabsModule.forRoot(), - HttpClientModule, - BrowserAnimationsModule + TabsModule.forRoot() ], exports: [SharedModule], providers: [ diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/services.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/services.module.ts index 60ddb4d70840f..eb1a23d68408e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/services/services.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/services/services.module.ts @@ -1,6 +1,8 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; +import { AuthGuardService } from './auth-guard.service'; +import { AuthStorageService } from './auth-storage.service'; import { FormatterService } from './formatter.service'; import { SummaryService } from './summary.service'; @@ -8,8 +10,10 @@ import { SummaryService } from './summary.service'; imports: [CommonModule], declarations: [], providers: [ + AuthGuardService, + AuthStorageService, FormatterService, SummaryService ] }) -export class ServicesModule { } +export class ServicesModule {} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/shared.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/shared.module.ts index 931a8f9569906..1956d75b593f6 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/shared.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/shared.module.ts @@ -7,9 +7,6 @@ import { DataTableModule } from './datatable/datatable.module'; import { DimlessBinaryDirective } from './directives/dimless-binary.directive'; import { PasswordButtonDirective } from './directives/password-button.directive'; import { PipesModule } from './pipes/pipes.module'; -import { AuthGuardService } from './services/auth-guard.service'; -import { AuthStorageService } from './services/auth-storage.service'; -import { FormatterService } from './services/formatter.service'; import { ServicesModule } from './services/services.module'; @NgModule({ @@ -31,12 +28,8 @@ import { ServicesModule } from './services/services.module'; ServicesModule, PasswordButtonDirective, DimlessBinaryDirective, - DataTableModule - ], - providers: [ - AuthStorageService, - AuthGuardService, - FormatterService, - ], + DataTableModule, + ApiModule + ] }) export class SharedModule {} -- 2.39.5