]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix remove host in subsystem resource page 67347/head
authorpujaoshahu <pshahu@redhat.com>
Fri, 13 Feb 2026 10:04:01 +0000 (15:34 +0530)
committerpujaoshahu <pshahu@redhat.com>
Tue, 24 Feb 2026 17:25:04 +0000 (22:55 +0530)
Fixes: https://tracker.ceph.com/issues/74931
Signed-off-by: pujaoshahu <pshahu@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-edit-host-key-modal/nvmeof-edit-host-key-modal.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-initiators-list/nvmeof-initiators-list.component.ts

index 5357ece4cad8aacca17ab491ce71eb9689678c19..0e4952bbf3aa13e336da93113a356cfb39250b59 100644 (file)
@@ -2,21 +2,24 @@
            [open]="open"
            (overlaySelected)="closeModal()">
   <cds-modal-header (closeSelect)="closeModal()">
-    <h2 cdsModalHeaderLabel
+    <h2
+        cdsModalHeaderLabel
         i18n>
-        {{'Subsystem'}}
+      {{'Subsystem'}}
     </h2>
 
   <!-- Step 1: Enter DHCHAP key -->
   <ng-container *ngIf="!showConfirmation">
-    <h2 class="cds--type-heading-03"
+    <h2
+        class="cds--type-heading-03"
         cdsModalHeaderHeading
         i18n>Edit Host Key</h2>
   </ng-container>
 
   <!-- Step 2: Confirm changes -->
   <ng-container *ngIf="showConfirmation">
-    <h2 class="cds--type-heading-03"
+    <h2
+        class="cds--type-heading-03"
         cdsModalHeaderHeading
         i18n>Confirm changes</h2>
   </ng-container>
index 84e0391634f62445f091c77fc80f783857f69092..e4820f735a0c8a70320ca70ea68511e880a67760 100644 (file)
@@ -3,6 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router';
 import { NvmeofService } from '~/app/shared/api/nvmeof.service';
 import { DeleteConfirmationModalComponent } from '~/app/shared/components/delete-confirmation-modal/delete-confirmation-modal.component';
 import { ActionLabelsI18n, URLVerbs } from '~/app/shared/constants/app.constants';
+import { DeletionImpact } from '~/app/shared/enum/delete-confirmation-modal-impact.enum';
 import { Icons } from '~/app/shared/enum/icons.enum';
 import { CdTableAction } from '~/app/shared/models/cd-table-action';
 import { CdTableSelection } from '~/app/shared/models/cd-table-selection';
@@ -190,10 +191,15 @@ export class NvmeofInitiatorsListComponent implements OnInit {
       hostNQNs.splice(allowAllHostIndex, 1);
       itemNames = [...hostNQNs, $localize`Allow any host(*)`];
     }
+    const hostName = itemNames[0];
     this.modalService.show(DeleteConfirmationModalComponent, {
-      itemDescription: 'Initiator',
+      itemDescription: $localize`host`,
+      impact: DeletionImpact.high,
       itemNames,
       actionDescription: 'remove',
+      bodyContext: {
+        deletionMessage: $localize`Removing <strong>${hostName}</strong> will disconnect it and revoke its permissions for the <strong>${this.subsystemNQN}</strong> subsystem.`
+      },
       submitActionObservable: () =>
         this.taskWrapper.wrapTaskAroundCall({
           task: new FinishedTask('nvmeof/initiator/remove', {