From fd3fba2879558ef1220d13c3d345688df41720eb Mon Sep 17 00:00:00 2001 From: Afreen Misbah Date: Wed, 22 Apr 2026 05:55:06 +0530 Subject: [PATCH] mgr/dashboard: Fix review page showing auth details when all hosts selected Signed-off-by: Afreen Misbah --- .../nvmeof-subsystem-step-4.component.html | 2 ++ .../nvmeof-subsystem-step-4.component.spec.ts | 5 +++++ .../nvmeof-subsystem-step-4.component.ts | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.html index 9d25200f568a..f4dbcddba42b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.html @@ -72,6 +72,7 @@ } + @if (hostType === HOST_TYPE.SPECIFIC) {
@@ -113,4 +114,5 @@ i18n>No keys added

}
+ } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts index 6f467fd88e8f..447b709239c5 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.spec.ts @@ -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'); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.ts index 518b9697847d..1a3d2c11449e 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-4/nvmeof-subsystem-step-4.component.ts @@ -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`; -- 2.47.3