]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix review page showing auth details when all hosts selected 68531/head
authorAfreen Misbah <afreen@ibm.com>
Wed, 22 Apr 2026 00:25:06 +0000 (05:55 +0530)
committerAfreen Misbah <afreen@ibm.com>
Wed, 22 Apr 2026 10:22:55 +0000 (15:52 +0530)
Signed-off-by: Afreen Misbah <afreen@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.ts

index 9d25200f568a88b458a99db9d292d23faad38272..f4dbcddba42b5d695e42e39cf968779980442146 100644 (file)
@@ -72,6 +72,7 @@
   }
 
   <!-- Authentication details -->
+  @if (hostType === HOST_TYPE.SPECIFIC) {
   <div cdsCol
        [columnNumbers]="{sm: 4, md: 8, lg: 12}"
        class="cds-mt-7">
        i18n>No keys added</p>
     }
   </div>
+  }
 </div>
index 6f467fd88e8ff164ab837ddb2e6f164ed498726e..447b709239c5d1c2b400e6153065b454acca244a 100644 (file)
@@ -54,6 +54,11 @@ describe('NvmeofSubsystemsStepFourComponent', () => {
   });
 
   it('should return correct auth type label', () => {
+    component.hostDchapKeyCount = 0;
+    expect(component.authTypeLabel).toContain('No authentication');
+
+    component.hostDchapKeyCount = 2;
+
     component.authType = AUTHENTICATION.Bidirectional;
     expect(component.authTypeLabel).toContain('Bidirectional');
 
index 518b9697847d5e41809dba06c5a21233823c6627..1a3d2c11449e425c6aba81f13f26bb2d580a7ed9 100644 (file)
@@ -45,7 +45,7 @@ export class NvmeofSubsystemsStepFourComponent implements OnInit, TearsheetStep
   }
 
   get authTypeLabel(): string {
-    if (this.authType === AUTHENTICATION.None) return NO_AUTH;
+    if (this.authType === AUTHENTICATION.None || this.hostDchapKeyCount === 0) return NO_AUTH;
     return this.authType === AUTHENTICATION.Bidirectional
       ? $localize`Bidirectional`
       : $localize`Unidirectional`;