From: Tiago Melo Date: Thu, 29 Mar 2018 11:35:49 +0000 (+0100) Subject: mgr/dashboard: Move services provision to service module X-Git-Tag: v13.1.0~346^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21126%2Fhead;p=ceph.git mgr/dashboard: Move services provision to service module Few services were being declared in the shared module. Signed-off-by: Tiago Melo --- 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 525e94729fad..d9d6b5f2d84d 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 60ddb4d70840..eb1a23d68408 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 931a8f956990..1956d75b593f 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 {}