]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Replacing bootstrap modal service with cds modal service 60422/head
authorDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>
Tue, 22 Oct 2024 07:16:58 +0000 (12:46 +0530)
committerDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>
Tue, 29 Oct 2024 16:46:03 +0000 (22:16 +0530)
Fixes: https://tracker.ceph.com/issues/68650
Signed-off-by: Dnyaneshwari talwekar <dtalweka@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/prometheus/silence-list/silence-list.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/upgrade/upgrade-progress/upgrade-progress.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.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/auth/user-form/user-form.component.ts

index 3609467db1e36657fbaa813f0ee53760824e2798..47793509747c7b6db1d0d7b962f6499f95e59478 100644 (file)
@@ -13,7 +13,7 @@ import { TableActionsComponent } from '~/app/shared/datatable/table-actions/tabl
 import { NotificationType } from '~/app/shared/enum/notification-type.enum';
 import { Permission } from '~/app/shared/models/permissions';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
-import { ModalService } from '~/app/shared/services/modal.service';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 import { NotificationService } from '~/app/shared/services/notification.service';
 import { SharedModule } from '~/app/shared/shared.module';
 import { configureTestBed, PermissionHelper } from '~/testing/unit-test-helper';
@@ -159,7 +159,7 @@ describe('SilenceListComponent', () => {
       const mockObservable = () => of([]);
       spyOn(component, 'refresh').and.callFake(mockObservable);
       spyOn(prometheusService, 'expireSilence').and.callFake(mockObservable);
-      spyOn(TestBed.inject(ModalService), 'show').and.callFake((deletionClass, config) => {
+      spyOn(TestBed.inject(ModalCdsService), 'show').and.callFake((deletionClass, config) => {
         return {
           componentInstance: Object.assign(new deletionClass(), config)
         };
index c5734236e5f1c4eee1299573e9f8c508b41a9d56..7098e0027970f9cb694076b8e376627cb2134d96 100644 (file)
@@ -19,7 +19,7 @@ import { Permission } from '~/app/shared/models/permissions';
 import { PrometheusRule } from '~/app/shared/models/prometheus-alerts';
 import { CdDatePipe } from '~/app/shared/pipes/cd-date.pipe';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
-import { ModalService } from '~/app/shared/services/modal.service';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 import { NotificationService } from '~/app/shared/services/notification.service';
 import { PrometheusSilenceMatcherService } from '~/app/shared/services/prometheus-silence-matcher.service';
 import { URLBuilderService } from '~/app/shared/services/url-builder.service';
@@ -56,7 +56,7 @@ export class SilenceListComponent extends PrometheusListHelper {
   constructor(
     private authStorageService: AuthStorageService,
     private cdDatePipe: CdDatePipe,
-    private modalService: ModalService,
+    private modalService: ModalCdsService,
     private notificationService: NotificationService,
     private urlBuilder: URLBuilderService,
     private actionLabels: ActionLabelsI18n,
index 03bb6ed084dff1ca14cda041bf34204dcc5c4c4b..a04b4577365867f37b3bdd2b5b0fad83208b2fcf 100644 (file)
@@ -5,7 +5,7 @@ import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
 
 import { Icons } from '~/app/shared/enum/icons.enum';
 import { CriticalConfirmationModalComponent } from '~/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
-import { ModalService } from '~/app/shared/services/modal.service';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 import { Permission } from '~/app/shared/models/permissions';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
 import { UpgradeService } from '~/app/shared/api/upgrade.service';
@@ -37,7 +37,7 @@ export class UpgradeProgressComponent implements OnInit, OnDestroy {
     private authStorageService: AuthStorageService,
     private upgradeService: UpgradeService,
     private notificationService: NotificationService,
-    private modalService: ModalService,
+    private modalService: ModalCdsService,
     private summaryService: SummaryService,
     private router: Router,
     private refreshIntervalService: RefreshIntervalService
index caf8c0b6a71a66a1c737bad5f625bcf4f369c20b..811371329dbdfc5f358522f23f4b313433cad7c4 100644 (file)
@@ -28,7 +28,7 @@ import { ErasureCodeProfile } from '~/app/shared/models/erasure-code-profile';
 import { Permission } from '~/app/shared/models/permissions';
 import { PoolFormInfo } from '~/app/shared/models/pool-form-info';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
-import { ModalService } from '~/app/shared/services/modal.service';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 import { TaskWrapperService } from '~/app/shared/services/task-wrapper.service';
 import { SharedModule } from '~/app/shared/shared.module';
 import {
@@ -765,7 +765,7 @@ describe('PoolFormComponent', () => {
     it('should select the newly created rule', () => {
       expect(form.getValue('crushRule').rule_name).toBe('rep1');
       const name = 'awesomeRule';
-      spyOn(TestBed.inject(ModalService), 'show').and.callFake(() => {
+      spyOn(TestBed.inject(ModalCdsService), 'show').and.callFake(() => {
         return {
           componentInstance: {
             submitAction: of({ name })
@@ -828,7 +828,7 @@ describe('PoolFormComponent', () => {
       };
 
       beforeEach(() => {
-        modalSpy = spyOn(TestBed.inject(ModalService), 'show').and.callFake(
+        modalSpy = spyOn(TestBed.inject(ModalCdsService), 'show').and.callFake(
           (deletionClass: any, initialState: any) => {
             deletion = Object.assign(new deletionClass(), initialState);
             return {
@@ -933,7 +933,7 @@ describe('PoolFormComponent', () => {
       spyOn(ecpService, 'list').and.callFake(() => of(infoReturn.erasure_code_profiles));
       expect(form.getValue('erasureProfile').name).toBe('ecp1');
       const name = 'awesomeProfile';
-      spyOn(TestBed.inject(ModalService), 'show').and.callFake(() => {
+      spyOn(TestBed.inject(ModalCdsService), 'show').and.callFake(() => {
         return {
           componentInstance: {
             submitAction: of({ name })
@@ -977,7 +977,7 @@ describe('PoolFormComponent', () => {
 
       beforeEach(() => {
         deletion = undefined;
-        modalSpy = spyOn(TestBed.inject(ModalService), 'show').and.callFake(
+        modalSpy = spyOn(TestBed.inject(ModalCdsService), 'show').and.callFake(
           (comp: any, init: any) => {
             modal = modalServiceShow(comp, init);
             return modal;
index c1a54223dcce8baa58727230d651abc345e66aa2..1cdbcccd647ced39351307d31071412eb41d604d 100644 (file)
@@ -31,7 +31,7 @@ import { PoolFormInfo } from '~/app/shared/models/pool-form-info';
 import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
 import { FormatterService } from '~/app/shared/services/formatter.service';
-import { ModalService } from '~/app/shared/services/modal.service';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 import { TaskWrapperService } from '~/app/shared/services/task-wrapper.service';
 import { CrushRuleFormModalComponent } from '../crush-rule-form-modal/crush-rule-form-modal.component';
 import { ErasureCodeProfileFormModalComponent } from '../erasure-code-profile-form/erasure-code-profile-form-modal.component';
@@ -95,7 +95,7 @@ export class PoolFormComponent extends CdForm implements OnInit {
     private dimlessBinaryPipe: DimlessBinaryPipe,
     private route: ActivatedRoute,
     private router: Router,
-    private modalService: ModalService,
+    private modalService: ModalCdsService,
     private poolService: PoolService,
     private authStorageService: AuthStorageService,
     private formatter: FormatterService,
index 4f95ac1e26c42ab579b217fe89a4410f36d06106..943fc033ede059e4f1bdbdae8ac1f38f80749173 100644 (file)
@@ -16,13 +16,13 @@ import { ComponentsModule } from '~/app/shared/components/components.module';
 import { LoadingPanelComponent } from '~/app/shared/components/loading-panel/loading-panel.component';
 import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
-import { ModalService } from '~/app/shared/services/modal.service';
 import { NotificationService } from '~/app/shared/services/notification.service';
 import { PasswordPolicyService } from '~/app/shared/services/password-policy.service';
 import { SharedModule } from '~/app/shared/shared.module';
 import { configureTestBed, FormHelper } from '~/testing/unit-test-helper';
 import { UserFormComponent } from './user-form.component';
 import { UserFormModel } from './user-form.model';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 
 describe('UserFormComponent', () => {
   let component: UserFormComponent;
@@ -30,7 +30,7 @@ describe('UserFormComponent', () => {
   let fixture: ComponentFixture<UserFormComponent>;
   let httpTesting: HttpTestingController;
   let userService: UserService;
-  let modalService: ModalService;
+  let modalService: ModalCdsService;
   let router: Router;
   let formHelper: FormHelper;
 
@@ -67,7 +67,7 @@ describe('UserFormComponent', () => {
     form = component.userForm;
     httpTesting = TestBed.inject(HttpTestingController);
     userService = TestBed.inject(UserService);
-    modalService = TestBed.inject(ModalService);
+    modalService = TestBed.inject(ModalCdsService);
     router = TestBed.inject(Router);
     spyOn(router, 'navigate');
     fixture.detectChanges();
index 1a0ddf35cc99482207c4a2bfc976a2c1b08fa28a..7c02b86eae0583bf11bd3df0be1d66f72f56a8a4 100644 (file)
@@ -22,7 +22,7 @@ import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
 import { CdValidators } from '~/app/shared/forms/cd-validators';
 import { CdPwdExpirationSettings } from '~/app/shared/models/cd-pwd-expiration-settings';
 import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
-import { ModalService } from '~/app/shared/services/modal.service';
+import { ModalCdsService } from '~/app/shared/services/modal-cds.service';
 import { NotificationService } from '~/app/shared/services/notification.service';
 import { PasswordPolicyService } from '~/app/shared/services/password-policy.service';
 import { UserFormMode } from './user-form-mode.enum';
@@ -61,7 +61,7 @@ export class UserFormComponent extends CdForm implements OnInit {
     private authStorageService: AuthStorageService,
     private route: ActivatedRoute,
     public router: Router,
-    private modalService: ModalService,
+    private modalService: ModalCdsService,
     private roleService: RoleService,
     private userService: UserService,
     private notificationService: NotificationService,