From: Afreen Misbah Date: Tue, 21 Apr 2026 21:48:55 +0000 (+0530) Subject: mgr/dashboard: Allow moving to next when Bidirectional mode is chosen X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6b0ade4b0988944939d2ff042f5883e9442c9de6;p=ceph.git mgr/dashboard: Allow moving to next when Bidirectional mode is chosen - there is an issue with bi-auth , where the validation is getting empty due to some state refresh - fixed by removing re-setting of form state Fixes https://tracker.ceph.com/issues/76194 Signed-off-by: Afreen Misbah (cherry picked from commit 2cbc270a3451dcfb47c04fc461925db0f4b9683d) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.html index 00f045c2a501..9ee61b903f85 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.html @@ -91,6 +91,7 @@

{{formGroup.get('authType').value === AUTHENTICATION.Bidirectional ? 'All fields are required.' : 'Optional fields.'}}

+ @if (hostDchapKeyList.controls.length) { @for (hostDchapKeyItem of hostDchapKeyList.controls; track $index; let i = $index) {
} + } @else { +

No hosts selected.

+ } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts index 1811c6c44456..315d7fca793f 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.spec.ts @@ -57,6 +57,19 @@ describe('NvmeofSubsystemsStepThreeComponent', () => { }); describe('form initialization', () => { + beforeEach(() => { + fixture = TestBed.createComponent(NvmeofSubsystemsStepThreeComponent); + component = fixture.componentInstance; + + component.stepTwoValue = { + hostType: 'specific', + addedHosts: ['nqn.2001-07.com.ceph:1776805137618'] + } as any; + + fixture.detectChanges(); + form = component.formGroup; + }); + it('should initialize form with default values', () => { expect(form).toBeTruthy(); expect(form.get('authType')?.value).toBe(AUTHENTICATION.Unidirectional); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.ts index dc158ac8b087..9bfc3c4c0cdf 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-subsystems-form/nvmeof-subsystem-step-3/nvmeof-subsystem-step-3.component.ts @@ -50,8 +50,6 @@ export class NvmeofSubsystemsStepThreeComponent implements OnInit, TearsheetStep hosts.forEach((nqn) => { currentList.push(this.createHostDhchapKeyFormGroup(nqn, existing.get(nqn) ?? null)); }); - } else { - currentList.push(this.createHostDhchapKeyFormGroup('', null)); } }