]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Remove unnecessary imports/providers 24591/head
authorTiago Melo <tspmelo@gmail.com>
Sat, 13 Oct 2018 02:13:11 +0000 (03:13 +0100)
committerTiago Melo <tspmelo@gmail.com>
Tue, 16 Oct 2018 13:44:59 +0000 (14:44 +0100)
Signed-off-by: Tiago Melo <tmelo@suse.com>
20 files changed:
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-list/rbd-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-list/rbd-trash-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-trash-move-modal/rbd-trash-move-modal.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-clients/cephfs-clients.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-detail/cephfs-detail.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/hosts/hosts.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-details/osd-details.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard/health/health.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-list/rgw-bucket-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-daemon-details/rgw-daemon-details.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-list/rgw-user-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/role-form/role-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.spec.ts

index 5907b882ad54f76f6b4d22eee4ecda738a2be8d1..0a132d7661445a2e72e25993e24b8cb5be9c23ef 100644 (file)
@@ -13,7 +13,6 @@ import { BehaviorSubject, of } from 'rxjs';
 
 import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
 import { RbdService } from '../../../shared/api/rbd.service';
-import { ComponentsModule } from '../../../shared/components/components.module';
 import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
 import { ViewCacheStatus } from '../../../shared/enum/view-cache-status.enum';
 import { ExecutingTask } from '../../../shared/models/executing-task';
@@ -44,12 +43,11 @@ describe('RbdListComponent', () => {
       TooltipModule.forRoot(),
       ToastModule.forRoot(),
       AlertModule.forRoot(),
-      ComponentsModule,
       RouterTestingModule,
       HttpClientTestingModule
     ],
     declarations: [RbdListComponent, RbdDetailsComponent, RbdSnapshotListComponent],
-    providers: [SummaryService, TaskListService, RbdService]
+    providers: [TaskListService]
   });
 
   beforeEach(() => {
index 632a7ad3557508b8514c1e6fdc3b6297557fdd98..39a8d10d09f625d91b3cf5f3a866deb3720068c6 100644 (file)
@@ -50,11 +50,7 @@ describe('RbdSnapshotListComponent', () => {
       RouterTestingModule,
       PipesModule
     ],
-    providers: [
-      { provide: AuthStorageService, useValue: fakeAuthStorageService },
-      SummaryService,
-      TaskListService
-    ]
+    providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }, TaskListService]
   });
 
   beforeEach(() => {
index 766d2eed278f804a767f6d4cd51db9d4d79feeca..c256c8739f93de3d07098e9776700467f7a89fab 100644 (file)
@@ -24,7 +24,7 @@ describe('RbdTrashListComponent', () => {
   configureTestBed({
     declarations: [RbdTrashListComponent],
     imports: [SharedModule, HttpClientTestingModule, RouterTestingModule, ToastModule.forRoot()],
-    providers: [TaskListService, RbdService]
+    providers: [TaskListService]
   });
 
   beforeEach(() => {
index b6dbc247230a6576ff9884cb321d4fe081b42a38..beea09718e811eae7a2a685bab04600bc41dffc9 100644 (file)
@@ -9,9 +9,7 @@ import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
 import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { ApiModule } from '../../../shared/api/api.module';
 import { NotificationService } from '../../../shared/services/notification.service';
-import { ServicesModule } from '../../../shared/services/services.module';
 import { SharedModule } from '../../../shared/shared.module';
 import { RbdTrashMoveModalComponent } from './rbd-trash-move-modal.component';
 
@@ -26,8 +24,6 @@ describe('RbdTrashMoveModalComponent', () => {
       HttpClientTestingModule,
       RouterTestingModule,
       SharedModule,
-      ServicesModule,
-      ApiModule,
       ToastModule.forRoot(),
       BsDatepickerModule.forRoot()
     ],
index fb28571c53d80086109ee58014f141baf3234a11..9cc2b82a2c290b2c92bb377f8080b4af830d1151 100644 (file)
@@ -5,7 +5,6 @@ import { RouterTestingModule } from '@angular/router/testing';
 import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { CephfsService } from '../../../shared/api/cephfs.service';
 import { SharedModule } from '../../../shared/shared.module';
 import { CephfsClientsComponent } from './cephfs-clients.component';
 
@@ -20,8 +19,7 @@ describe('CephfsClientsComponent', () => {
       SharedModule,
       HttpClientTestingModule
     ],
-    declarations: [CephfsClientsComponent],
-    providers: [CephfsService]
+    declarations: [CephfsClientsComponent]
   });
 
   beforeEach(() => {
index 77f0648149328c8d08abdf19165227506f4305c4..07862a062b8c38c3974d7a269b490df9600ef7de 100644 (file)
@@ -3,13 +3,11 @@ import { Component, Input } from '@angular/core';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { RouterTestingModule } from '@angular/router/testing';
 
-import { ChartsModule } from 'ng2-charts/ng2-charts';
 import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { CephfsService } from '../../../shared/api/cephfs.service';
 import { SharedModule } from '../../../shared/shared.module';
 import { CephfsDetailComponent } from './cephfs-detail.component';
 
@@ -32,15 +30,13 @@ describe('CephfsDetailComponent', () => {
   configureTestBed({
     imports: [
       SharedModule,
-      ChartsModule,
       RouterTestingModule,
       BsDropdownModule.forRoot(),
       ProgressbarModule.forRoot(),
       TabsModule.forRoot(),
       HttpClientTestingModule
     ],
-    declarations: [CephfsDetailComponent, CephfsChartStubComponent, CephfsClientsStubComponent],
-    providers: [CephfsService]
+    declarations: [CephfsDetailComponent, CephfsChartStubComponent, CephfsClientsStubComponent]
   });
 
   beforeEach(() => {
index a706737944510b93c490e6483fbdedeecadc49b8..2f85abc49af5f093c20830273517c245b8f355c3 100644 (file)
@@ -3,7 +3,6 @@ import { Component, Input } from '@angular/core';
 import { ComponentFixture, TestBed } from '@angular/core/testing';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { CephfsService } from '../../../shared/api/cephfs.service';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
 import { SharedModule } from '../../../shared/shared.module';
 import { CephfsListComponent } from './cephfs-list.component';
@@ -20,8 +19,7 @@ describe('CephfsListComponent', () => {
 
   configureTestBed({
     imports: [SharedModule, HttpClientTestingModule],
-    declarations: [CephfsListComponent, CephfsDetailStubComponent],
-    providers: [CephfsService]
+    declarations: [CephfsListComponent, CephfsDetailStubComponent]
   });
 
   beforeEach(() => {
index 6a8b358da234b06f9db732d60d9c6e1d541eaafc..956d8ab6d9a7590dddca7a3877c5ab5f35e8d73b 100644 (file)
@@ -6,7 +6,6 @@ import { RouterTestingModule } from '@angular/router/testing';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { ConfigurationService } from '../../../shared/api/configuration.service';
 import { SharedModule } from '../../../shared/shared.module';
 import { ConfigurationDetailsComponent } from './configuration-details/configuration-details.component';
 import { ConfigurationComponent } from './configuration.component';
@@ -17,7 +16,6 @@ describe('ConfigurationComponent', () => {
 
   configureTestBed({
     declarations: [ConfigurationComponent, ConfigurationDetailsComponent],
-    providers: [ConfigurationService],
     imports: [
       SharedModule,
       FormsModule,
index 79719ea76557d891bb916746f62d2d710a1bb565..4cdfc9a073dd4b87dd1749ac9ea515c2c96421ea 100644 (file)
@@ -6,7 +6,6 @@ import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { ComponentsModule } from '../../../shared/components/components.module';
 import { Permissions } from '../../../shared/models/permissions';
 import { AuthStorageService } from '../../../shared/services/auth-storage.service';
 import { SharedModule } from '../../../shared/shared.module';
@@ -28,7 +27,6 @@ describe('HostsComponent', () => {
       SharedModule,
       HttpClientTestingModule,
       TabsModule.forRoot(),
-      ComponentsModule,
       BsDropdownModule.forRoot(),
       RouterTestingModule
     ],
index aefccaa79100a87412face28500c268f678c0871..bbab68c092505f90b5aa04d2aa868109ccb216b1 100644 (file)
@@ -8,7 +8,6 @@ import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed } from '../../../../../testing/unit-test-helper';
 import { OsdService } from '../../../../shared/api/osd.service';
-import { DataTableModule } from '../../../../shared/datatable/datatable.module';
 import { CdTableSelection } from '../../../../shared/models/cd-table-selection';
 import { SharedModule } from '../../../../shared/shared.module';
 import { PerformanceCounterModule } from '../../../performance-counter/performance-counter.module';
@@ -23,15 +22,8 @@ describe('OsdDetailsComponent', () => {
   let getDetailsSpy;
 
   configureTestBed({
-    imports: [
-      HttpClientModule,
-      TabsModule.forRoot(),
-      PerformanceCounterModule,
-      DataTableModule,
-      SharedModule
-    ],
-    declarations: [OsdDetailsComponent, OsdPerformanceHistogramComponent],
-    providers: [OsdService]
+    imports: [HttpClientModule, TabsModule.forRoot(), PerformanceCounterModule, SharedModule],
+    declarations: [OsdDetailsComponent, OsdPerformanceHistogramComponent]
   });
 
   beforeEach(() => {
index b073f2ee9f5793cb0066dcd93fc013c12e8cc84b..f38575b0e9ef01fd1d90643367bab97551fff4df 100644 (file)
@@ -6,13 +6,9 @@ import { RouterTestingModule } from '@angular/router/testing';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed, PermissionHelper } from '../../../../../testing/unit-test-helper';
-import { ComponentsModule } from '../../../../shared/components/components.module';
-import { DataTableModule } from '../../../../shared/datatable/datatable.module';
 import { TableActionsComponent } from '../../../../shared/datatable/table-actions/table-actions.component';
 import { Permissions } from '../../../../shared/models/permissions';
-import { DimlessPipe } from '../../../../shared/pipes/dimless.pipe';
 import { AuthStorageService } from '../../../../shared/services/auth-storage.service';
-import { FormatterService } from '../../../../shared/services/formatter.service';
 import { SharedModule } from '../../../../shared/shared.module';
 import { PerformanceCounterModule } from '../../../performance-counter/performance-counter.module';
 import { OsdDetailsComponent } from '../osd-details/osd-details.component';
@@ -34,17 +30,11 @@ describe('OsdListComponent', () => {
       HttpClientModule,
       PerformanceCounterModule,
       TabsModule.forRoot(),
-      DataTableModule,
-      ComponentsModule,
       SharedModule,
       RouterTestingModule
     ],
     declarations: [OsdListComponent, OsdDetailsComponent, OsdPerformanceHistogramComponent],
-    providers: [
-      DimlessPipe,
-      FormatterService,
-      { provide: AuthStorageService, useValue: fakeAuthStorageService }
-    ]
+    providers: [{ provide: AuthStorageService, useValue: fakeAuthStorageService }]
   });
 
   beforeEach(() => {
index 29ee634c59ed43c791fc43e08580c4d7958814e6..cfd808aaeb9e0ee41f7ebb98698cf95bb6264734 100644 (file)
@@ -39,7 +39,6 @@ describe('HealthComponent', () => {
   };
 
   configureTestBed({
-    providers: [DashboardService],
     imports: [SharedModule, HttpClientTestingModule, PopoverModule.forRoot()],
     declarations: [
       HealthComponent,
index 5a3a0b5cda30a9a4aa0c50a8e83cdc0928a7db75..b4dcd25b50b9ed50c14459da6373ee9274a0e22c 100644 (file)
@@ -7,7 +7,6 @@ import { of as observableOf } from 'rxjs';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
 import { RgwBucketService } from '../../../shared/api/rgw-bucket.service';
-import { RgwUserService } from '../../../shared/api/rgw-user.service';
 import { SharedModule } from '../../../shared/shared.module';
 import { RgwBucketFormComponent } from './rgw-bucket-form.component';
 
@@ -25,7 +24,7 @@ describe('RgwBucketFormComponent', () => {
   configureTestBed({
     declarations: [RgwBucketFormComponent],
     imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule],
-    providers: [RgwUserService, { provide: RgwBucketService, useClass: MockRgwBucketService }]
+    providers: [{ provide: RgwBucketService, useClass: MockRgwBucketService }]
   });
 
   beforeEach(() => {
index 4597ba1e04583bfecf71a5282311367b688ed71d..60f9e0c132781f00ffabd7ebc56ea55369a21cb7 100644 (file)
@@ -7,7 +7,6 @@ import { ModalModule } from 'ngx-bootstrap/modal';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
-import { RgwBucketService } from '../../../shared/api/rgw-bucket.service';
 import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
 import { SharedModule } from '../../../shared/shared.module';
 import { RgwBucketDetailsComponent } from '../rgw-bucket-details/rgw-bucket-details.component';
@@ -25,8 +24,7 @@ describe('RgwBucketListComponent', () => {
       SharedModule,
       TabsModule.forRoot(),
       HttpClientTestingModule
-    ],
-    providers: [RgwBucketService]
+    ]
   });
 
   beforeEach(() => {
index 388bcb7a96b4e14c9850e05b41103cf354e88ea1..96b6d81a8f6f7a3ea68515ea3b0aed5c5eea1f82 100644 (file)
@@ -4,7 +4,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 import { TabsModule } from 'ngx-bootstrap/tabs';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { RgwDaemonService } from '../../../shared/api/rgw-daemon.service';
 import { CdTableSelection } from '../../../shared/models/cd-table-selection';
 import { SharedModule } from '../../../shared/shared.module';
 import { PerformanceCounterModule } from '../../performance-counter/performance-counter.module';
@@ -16,13 +15,7 @@ describe('RgwDaemonDetailsComponent', () => {
 
   configureTestBed({
     declarations: [RgwDaemonDetailsComponent],
-    imports: [
-      SharedModule,
-      PerformanceCounterModule,
-      TabsModule.forRoot(),
-      HttpClientTestingModule
-    ],
-    providers: [RgwDaemonService]
+    imports: [SharedModule, PerformanceCounterModule, TabsModule.forRoot(), HttpClientTestingModule]
   });
 
   beforeEach(() => {
index c353455fbdfbcc2509d0bf06483e2e992021258e..b6d95627cabc986ca61e3891a57ccf89e4c9b98f 100644 (file)
@@ -19,7 +19,7 @@ describe('RgwUserFormComponent', () => {
   configureTestBed({
     declarations: [RgwUserFormComponent],
     imports: [HttpClientTestingModule, ReactiveFormsModule, RouterTestingModule, SharedModule],
-    providers: [BsModalService, RgwUserService]
+    providers: [BsModalService]
   });
 
   beforeEach(() => {
index c1ef3d92fa16afdef026eeb7084149d3c6cf8710..c42c10ec54fc7a8285bd583bb37efaabc2e1bfdb 100644 (file)
@@ -7,7 +7,6 @@ import { RouterTestingModule } from '@angular/router/testing';
 import { ModalModule } from 'ngx-bootstrap/modal';
 
 import { configureTestBed, PermissionHelper } from '../../../../testing/unit-test-helper';
-import { RgwUserService } from '../../../shared/api/rgw-user.service';
 import { TableActionsComponent } from '../../../shared/datatable/table-actions/table-actions.component';
 import { SharedModule } from '../../../shared/shared.module';
 import { RgwUserListComponent } from './rgw-user-list.component';
@@ -19,7 +18,6 @@ describe('RgwUserListComponent', () => {
   configureTestBed({
     declarations: [RgwUserListComponent],
     imports: [RouterTestingModule, HttpClientTestingModule, ModalModule.forRoot(), SharedModule],
-    providers: [RgwUserService],
     schemas: [NO_ERRORS_SCHEMA]
   });
 
index e5d1c0399980ef1b4c459854977a1b58b85952c8..1d743b35be032e0c88b2162176ecf71e91f33024 100644 (file)
@@ -11,7 +11,6 @@ import { of } from 'rxjs';
 import { configureTestBed } from '../../../../testing/unit-test-helper';
 import { RoleService } from '../../../shared/api/role.service';
 import { ScopeService } from '../../../shared/api/scope.service';
-import { ComponentsModule } from '../../../shared/components/components.module';
 import { CdFormGroup } from '../../../shared/forms/cd-form-group';
 import { NotificationService } from '../../../shared/services/notification.service';
 import { SharedModule } from '../../../shared/shared.module';
@@ -35,11 +34,9 @@ describe('RoleFormComponent', () => {
   configureTestBed(
     {
       imports: [
-        [RouterTestingModule.withRoutes(routes)],
+        RouterTestingModule.withRoutes(routes),
         HttpClientTestingModule,
         ReactiveFormsModule,
-        RouterTestingModule,
-        ComponentsModule,
         ToastModule.forRoot(),
         SharedModule
       ],
index 55fdfa3afcfa579c7070a60e856af9edfc80e939..49b414e7b5f7547cdfcebf7297e833ef0c7b6b7c 100644 (file)
@@ -41,10 +41,9 @@ describe('UserFormComponent', () => {
   configureTestBed(
     {
       imports: [
-        [RouterTestingModule.withRoutes(routes)],
+        RouterTestingModule.withRoutes(routes),
         HttpClientTestingModule,
         ReactiveFormsModule,
-        RouterTestingModule,
         ComponentsModule,
         ToastModule.forRoot(),
         SharedModule
index 99aa09a890a92105e26313596b07ef4146e395aa..0c1706d7f9d2da924a847934b5a45bc08751a67c 100644 (file)
@@ -4,7 +4,6 @@ import { ToastModule } from 'ng2-toastr';
 import { PopoverModule } from 'ngx-bootstrap/popover';
 
 import { configureTestBed } from '../../../../testing/unit-test-helper';
-import { NotificationService } from '../../../shared/services/notification.service';
 import { SharedModule } from '../../../shared/shared.module';
 import { NotificationsComponent } from './notifications.component';
 
@@ -14,8 +13,7 @@ describe('NotificationsComponent', () => {
 
   configureTestBed({
     imports: [PopoverModule.forRoot(), SharedModule, ToastModule.forRoot()],
-    declarations: [NotificationsComponent],
-    providers: [NotificationService]
+    declarations: [NotificationsComponent]
   });
 
   beforeEach(() => {