]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Unable to delete realm via dashboard 60072/head
authorDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>
Tue, 1 Oct 2024 11:48:13 +0000 (17:18 +0530)
committerDnyaneshwari <dnyaneshwari@li-9c9fbecc-2d5c-11b2-a85c-e2a7cc8a424f.ibm.com>
Tue, 1 Oct 2024 12:00:58 +0000 (17:30 +0530)
Replacing Bootstrap Modal Service (ModalService) with Carbon Modal Service (ModalCdsService)

Fixes: https://tracker.ceph.com/issues/68290
Signed-off-by: Dnyaneshwari talwekar <dtalweka@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.ts

index fbe3110b978ea8179ad30aa10c40edc604857b93..6204432470e740b016e960ccc2a6471ca667ac50 100644 (file)
@@ -546,20 +546,20 @@ export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit {
 
   delete(node: TreeNode) {
     if (node.data.type === 'realm') {
-      this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
+      const modalRef = this.cdsModalService.show(CriticalConfirmationModalComponent, {
         itemDescription: $localize`${node.data.type} ${node.data.name}`,
         itemNames: [`${node.data.name}`],
         submitAction: () => {
           this.rgwRealmService.delete(node.data.name).subscribe(
             () => {
-              this.modalRef.close();
               this.notificationService.show(
                 NotificationType.success,
                 $localize`Realm: '${node.data.name}' deleted successfully`
               );
+              this.cdsModalService.dismissAll();
             },
             () => {
-              this.modalRef.componentInstance.stopLoadingSpinner();
+              this.cdsModalService.stopLoadingSpinner(modalRef.deletionForm);
             }
           );
         }