From 77ddc6cb5060564cbbff3df5d6a5b88368e82e80 Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Tue, 10 Mar 2020 12:22:49 -0100 Subject: [PATCH] mgr/dashboard: Append "Modal" to all modal components names Fixes: https://tracker.ceph.com/issues/44547 Signed-off-by: Tiago Melo --- .../frontend/src/app/ceph/block/block.module.ts | 12 ++++++------ ....html => rbd-namespace-form-modal.component.html} | 0 ....scss => rbd-namespace-form-modal.component.scss} | 0 ...ts => rbd-namespace-form-modal.component.spec.ts} | 12 ++++++------ ...nent.ts => rbd-namespace-form-modal.component.ts} | 8 ++++---- .../rbd-namespace-list.component.ts | 4 ++-- ...t.html => rbd-snapshot-form-modal.component.html} | 0 ...t.scss => rbd-snapshot-form-modal.component.scss} | 0 ....ts => rbd-snapshot-form-modal.component.spec.ts} | 12 ++++++------ ...onent.ts => rbd-snapshot-form-modal.component.ts} | 8 ++++---- .../rbd-snapshot-list.component.spec.ts | 4 ++-- .../rbd-snapshot-list/rbd-snapshot-list.component.ts | 4 ++-- ...> erasure-code-profile-form-modal.component.html} | 0 ...> erasure-code-profile-form-modal.component.scss} | 0 ...rasure-code-profile-form-modal.component.spec.ts} | 10 +++++----- ... => erasure-code-profile-form-modal.component.ts} | 8 ++++---- .../app/ceph/pool/pool-form/pool-form.component.ts | 4 ++-- .../frontend/src/app/ceph/pool/pool.module.ts | 6 +++--- 18 files changed, 46 insertions(+), 46 deletions(-) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/{rbd-namespace-form.component.html => rbd-namespace-form-modal.component.html} (100%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/{rbd-namespace-form.component.scss => rbd-namespace-form-modal.component.scss} (100%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/{rbd-namespace-form.component.spec.ts => rbd-namespace-form-modal.component.spec.ts} (75%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/{rbd-namespace-form.component.ts => rbd-namespace-form-modal.component.ts} (94%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/{rbd-snapshot-form.component.html => rbd-snapshot-form-modal.component.html} (100%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/{rbd-snapshot-form.component.scss => rbd-snapshot-form-modal.component.scss} (100%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/{rbd-snapshot-form.component.spec.ts => rbd-snapshot-form-modal.component.spec.ts} (84%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/{rbd-snapshot-form.component.ts => rbd-snapshot-form-modal.component.ts} (94%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/{erasure-code-profile-form.component.html => erasure-code-profile-form-modal.component.html} (100%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/{erasure-code-profile-form.component.scss => erasure-code-profile-form-modal.component.scss} (100%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/{erasure-code-profile-form.component.spec.ts => erasure-code-profile-form-modal.component.spec.ts} (96%) rename src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/{erasure-code-profile-form.component.ts => erasure-code-profile-form-modal.component.ts} (96%) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts index 217bd98e5575f..c592e29386b75 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/block.module.ts @@ -32,9 +32,9 @@ import { RbdDetailsComponent } from './rbd-details/rbd-details.component'; import { RbdFormComponent } from './rbd-form/rbd-form.component'; import { RbdImagesComponent } from './rbd-images/rbd-images.component'; import { RbdListComponent } from './rbd-list/rbd-list.component'; -import { RbdNamespaceFormComponent } from './rbd-namespace-form/rbd-namespace-form.component'; +import { RbdNamespaceFormModalComponent } from './rbd-namespace-form/rbd-namespace-form-modal.component'; import { RbdNamespaceListComponent } from './rbd-namespace-list/rbd-namespace-list.component'; -import { RbdSnapshotFormComponent } from './rbd-snapshot-form/rbd-snapshot-form.component'; +import { RbdSnapshotFormModalComponent } from './rbd-snapshot-form/rbd-snapshot-form-modal.component'; import { RbdSnapshotListComponent } from './rbd-snapshot-list/rbd-snapshot-list.component'; import { RbdTrashListComponent } from './rbd-trash-list/rbd-trash-list.component'; import { RbdTrashMoveModalComponent } from './rbd-trash-move-modal/rbd-trash-move-modal.component'; @@ -44,8 +44,8 @@ import { RbdTrashRestoreModalComponent } from './rbd-trash-restore-modal/rbd-tra @NgModule({ entryComponents: [ RbdDetailsComponent, - RbdNamespaceFormComponent, - RbdSnapshotFormComponent, + RbdNamespaceFormModalComponent, + RbdSnapshotFormModalComponent, RbdTrashMoveModalComponent, RbdTrashRestoreModalComponent, RbdTrashPurgeModalComponent, @@ -78,10 +78,10 @@ import { RbdTrashRestoreModalComponent } from './rbd-trash-restore-modal/rbd-tra IscsiTargetListComponent, RbdDetailsComponent, RbdFormComponent, - RbdNamespaceFormComponent, + RbdNamespaceFormModalComponent, RbdNamespaceListComponent, RbdSnapshotListComponent, - RbdSnapshotFormComponent, + RbdSnapshotFormModalComponent, RbdTrashListComponent, RbdTrashMoveModalComponent, RbdImagesComponent, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.html similarity index 100% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.html rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.html diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.scss similarity index 100% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.scss rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.scss diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.spec.ts similarity index 75% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.spec.ts rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.spec.ts index c24381017c00e..f7760157c05f5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.spec.ts @@ -10,11 +10,11 @@ import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-h import { ApiModule } from '../../../shared/api/api.module'; import { ComponentsModule } from '../../../shared/components/components.module'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; -import { RbdNamespaceFormComponent } from './rbd-namespace-form.component'; +import { RbdNamespaceFormModalComponent } from './rbd-namespace-form-modal.component'; -describe('RbdNamespaceFormComponent', () => { - let component: RbdNamespaceFormComponent; - let fixture: ComponentFixture; +describe('RbdNamespaceFormModalComponent', () => { + let component: RbdNamespaceFormModalComponent; + let fixture: ComponentFixture; configureTestBed({ imports: [ @@ -25,12 +25,12 @@ describe('RbdNamespaceFormComponent', () => { ToastrModule.forRoot(), RouterTestingModule ], - declarations: [RbdNamespaceFormComponent], + declarations: [RbdNamespaceFormModalComponent], providers: [BsModalRef, BsModalService, AuthStorageService, i18nProviders] }); beforeEach(() => { - fixture = TestBed.createComponent(RbdNamespaceFormComponent); + fixture = TestBed.createComponent(RbdNamespaceFormModalComponent); component = fixture.componentInstance; fixture.detectChanges(); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.ts similarity index 94% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.ts rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.ts index acaf334a203d2..e25f00667154b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-form/rbd-namespace-form-modal.component.ts @@ -22,11 +22,11 @@ import { NotificationService } from '../../../shared/services/notification.servi import { Pool } from '../../pool/pool'; @Component({ - selector: 'cd-rbd-namespace-form', - templateUrl: './rbd-namespace-form.component.html', - styleUrls: ['./rbd-namespace-form.component.scss'] + selector: 'cd-rbd-namespace-form-modal', + templateUrl: './rbd-namespace-form-modal.component.html', + styleUrls: ['./rbd-namespace-form-modal.component.scss'] }) -export class RbdNamespaceFormComponent implements OnInit { +export class RbdNamespaceFormModalComponent implements OnInit { poolPermission: Permission; pools: Array = null; pool: string; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts index 3dd514ee46166..80b0945f65d58 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-namespace-list/rbd-namespace-list.component.ts @@ -18,7 +18,7 @@ import { Permission } from '../../../shared/models/permissions'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; import { NotificationService } from '../../../shared/services/notification.service'; import { TaskListService } from '../../../shared/services/task-list.service'; -import { RbdNamespaceFormComponent } from '../rbd-namespace-form/rbd-namespace-form.component'; +import { RbdNamespaceFormModalComponent } from '../rbd-namespace-form/rbd-namespace-form-modal.component'; @Component({ selector: 'cd-rbd-namespace-list', @@ -119,7 +119,7 @@ export class RbdNamespaceListComponent implements OnInit { } createModal() { - this.modalRef = this.modalService.show(RbdNamespaceFormComponent); + this.modalRef = this.modalService.show(RbdNamespaceFormModalComponent); this.modalRef.content.onSubmit.subscribe(() => { this.refresh(); }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html similarity index 100% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.html rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.scss similarity index 100% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.scss rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.scss diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.spec.ts similarity index 84% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.spec.ts rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.spec.ts index f75cc8fbbe547..8feb20ae343eb 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.spec.ts @@ -11,11 +11,11 @@ import { ApiModule } from '../../../shared/api/api.module'; import { ComponentsModule } from '../../../shared/components/components.module'; import { PipesModule } from '../../../shared/pipes/pipes.module'; import { AuthStorageService } from '../../../shared/services/auth-storage.service'; -import { RbdSnapshotFormComponent } from './rbd-snapshot-form.component'; +import { RbdSnapshotFormModalComponent } from './rbd-snapshot-form-modal.component'; -describe('RbdSnapshotFormComponent', () => { - let component: RbdSnapshotFormComponent; - let fixture: ComponentFixture; +describe('RbdSnapshotFormModalComponent', () => { + let component: RbdSnapshotFormModalComponent; + let fixture: ComponentFixture; configureTestBed({ imports: [ @@ -27,12 +27,12 @@ describe('RbdSnapshotFormComponent', () => { ToastrModule.forRoot(), RouterTestingModule ], - declarations: [RbdSnapshotFormComponent], + declarations: [RbdSnapshotFormModalComponent], providers: [BsModalRef, BsModalService, AuthStorageService, i18nProviders] }); beforeEach(() => { - fixture = TestBed.createComponent(RbdSnapshotFormComponent); + fixture = TestBed.createComponent(RbdSnapshotFormModalComponent); component = fixture.componentInstance; }); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.ts similarity index 94% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.ts rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.ts index 0dcb9ad1f3ff5..d3888074cee5b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.ts @@ -14,11 +14,11 @@ import { NotificationService } from '../../../shared/services/notification.servi import { TaskManagerService } from '../../../shared/services/task-manager.service'; @Component({ - selector: 'cd-rbd-snapshot-form', - templateUrl: './rbd-snapshot-form.component.html', - styleUrls: ['./rbd-snapshot-form.component.scss'] + selector: 'cd-rbd-snapshot-form-modal', + templateUrl: './rbd-snapshot-form-modal.component.html', + styleUrls: ['./rbd-snapshot-form-modal.component.scss'] }) -export class RbdSnapshotFormComponent implements OnInit { +export class RbdSnapshotFormModalComponent implements OnInit { poolName: string; namespace: string; imageName: string; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts index b85d15d92091c..a65e82e45fc03 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts @@ -26,7 +26,7 @@ import { AuthStorageService } from '../../../shared/services/auth-storage.servic import { NotificationService } from '../../../shared/services/notification.service'; import { SummaryService } from '../../../shared/services/summary.service'; import { TaskListService } from '../../../shared/services/task-list.service'; -import { RbdSnapshotFormComponent } from '../rbd-snapshot-form/rbd-snapshot-form.component'; +import { RbdSnapshotFormModalComponent } from '../rbd-snapshot-form/rbd-snapshot-form-modal.component'; import { RbdSnapshotListComponent } from './rbd-snapshot-list.component'; import { RbdSnapshotModel } from './rbd-snapshot.model'; @@ -187,7 +187,7 @@ describe('RbdSnapshotListComponent', () => { component.rbdName = 'image01'; spyOn(TestBed.get(BsModalService), 'show').and.callFake(() => { const ref = new BsModalRef(); - ref.content = new RbdSnapshotFormComponent( + ref.content = new RbdSnapshotFormModalComponent( null, null, null, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts index fa69acafd1b67..380677430e3b4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.ts @@ -25,7 +25,7 @@ import { NotificationService } from '../../../shared/services/notification.servi import { SummaryService } from '../../../shared/services/summary.service'; import { TaskListService } from '../../../shared/services/task-list.service'; import { TaskManagerService } from '../../../shared/services/task-manager.service'; -import { RbdSnapshotFormComponent } from '../rbd-snapshot-form/rbd-snapshot-form.component'; +import { RbdSnapshotFormModalComponent } from '../rbd-snapshot-form/rbd-snapshot-form-modal.component'; import { RbdSnapshotActionsModel } from './rbd-snapshot-actions.model'; import { RbdSnapshotModel } from './rbd-snapshot.model'; @@ -169,7 +169,7 @@ export class RbdSnapshotListComponent implements OnInit, OnChanges { } private openSnapshotModal(taskName: string, snapName: string = null) { - this.modalRef = this.modalService.show(RbdSnapshotFormComponent); + this.modalRef = this.modalService.show(RbdSnapshotFormModalComponent); this.modalRef.content.poolName = this.poolName; this.modalRef.content.imageName = this.rbdName; this.modalRef.content.namespace = this.namespace; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html similarity index 100% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.html rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.html diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.scss similarity index 100% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.scss rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.scss diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts similarity index 96% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.spec.ts rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts index 0ef4e37184dd1..0d4ce97a21016 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.spec.ts @@ -18,12 +18,12 @@ import { ErasureCodeProfileService } from '../../../shared/api/erasure-code-prof import { ErasureCodeProfile } from '../../../shared/models/erasure-code-profile'; import { TaskWrapperService } from '../../../shared/services/task-wrapper.service'; import { PoolModule } from '../pool.module'; -import { ErasureCodeProfileFormComponent } from './erasure-code-profile-form.component'; +import { ErasureCodeProfileFormModalComponent } from './erasure-code-profile-form-modal.component'; -describe('ErasureCodeProfileFormComponent', () => { - let component: ErasureCodeProfileFormComponent; +describe('ErasureCodeProfileFormModalComponent', () => { + let component: ErasureCodeProfileFormModalComponent; let ecpService: ErasureCodeProfileService; - let fixture: ComponentFixture; + let fixture: ComponentFixture; let formHelper: FormHelper; let fixtureHelper: FixtureHelper; let data: {}; @@ -40,7 +40,7 @@ describe('ErasureCodeProfileFormComponent', () => { }); beforeEach(() => { - fixture = TestBed.createComponent(ErasureCodeProfileFormComponent); + fixture = TestBed.createComponent(ErasureCodeProfileFormModalComponent); fixtureHelper = new FixtureHelper(fixture); component = fixture.componentInstance; formHelper = new FormHelper(component.form); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.ts similarity index 96% rename from src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.ts rename to src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.ts index 614902e0c8bed..6a62a5c87a563 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/erasure-code-profile-form/erasure-code-profile-form-modal.component.ts @@ -14,11 +14,11 @@ import { FinishedTask } from '../../../shared/models/finished-task'; import { TaskWrapperService } from '../../../shared/services/task-wrapper.service'; @Component({ - selector: 'cd-erasure-code-profile-form', - templateUrl: './erasure-code-profile-form.component.html', - styleUrls: ['./erasure-code-profile-form.component.scss'] + selector: 'cd-erasure-code-profile-form-modal', + templateUrl: './erasure-code-profile-form-modal.component.html', + styleUrls: ['./erasure-code-profile-form-modal.component.scss'] }) -export class ErasureCodeProfileFormComponent implements OnInit { +export class ErasureCodeProfileFormModalComponent implements OnInit { @Output() submitAction = new EventEmitter(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts index 25edf591d335a..d8ceabe1b1a0d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.ts @@ -33,7 +33,7 @@ import { AuthStorageService } from '../../../shared/services/auth-storage.servic import { FormatterService } from '../../../shared/services/formatter.service'; import { TaskWrapperService } from '../../../shared/services/task-wrapper.service'; import { CrushRuleFormModalComponent } from '../crush-rule-form-modal/crush-rule-form-modal.component'; -import { ErasureCodeProfileFormComponent } from '../erasure-code-profile-form/erasure-code-profile-form.component'; +import { ErasureCodeProfileFormModalComponent } from '../erasure-code-profile-form/erasure-code-profile-form-modal.component'; import { Pool } from '../pool'; import { PoolFormData } from './pool-form-data'; @@ -542,7 +542,7 @@ export class PoolFormComponent implements OnInit { addErasureCodeProfile() { this.modalSubscription = this.modalService.onHide.subscribe(() => this.reloadECPs()); - this.bsModalService.show(ErasureCodeProfileFormComponent); + this.bsModalService.show(ErasureCodeProfileFormModalComponent); } private reloadECPs() { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts index ee768f8e60da5..98fd4360a0e99 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.module.ts @@ -14,7 +14,7 @@ import { SharedModule } from '../../shared/shared.module'; import { BlockModule } from '../block/block.module'; import { CephSharedModule } from '../shared/ceph-shared.module'; import { CrushRuleFormModalComponent } from './crush-rule-form-modal/crush-rule-form-modal.component'; -import { ErasureCodeProfileFormComponent } from './erasure-code-profile-form/erasure-code-profile-form.component'; +import { ErasureCodeProfileFormModalComponent } from './erasure-code-profile-form/erasure-code-profile-form-modal.component'; import { PoolDetailsComponent } from './pool-details/pool-details.component'; import { PoolFormComponent } from './pool-form/pool-form.component'; import { PoolListComponent } from './pool-list/pool-list.component'; @@ -37,11 +37,11 @@ import { PoolListComponent } from './pool-list/pool-list.component'; declarations: [ PoolListComponent, PoolFormComponent, - ErasureCodeProfileFormComponent, + ErasureCodeProfileFormModalComponent, CrushRuleFormModalComponent, PoolDetailsComponent ], - entryComponents: [CrushRuleFormModalComponent, ErasureCodeProfileFormComponent] + entryComponents: [CrushRuleFormModalComponent, ErasureCodeProfileFormModalComponent] }) export class PoolModule {} -- 2.39.5