From: Nizamudeen A Date: Wed, 17 Sep 2025 03:39:54 +0000 (+0530) Subject: mgr/dashboard: fix rbd form mirroring toggle X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1efd37d4b5fc4363c6c86a84ede9c826c94d2c22;p=ceph.git mgr/dashboard: fix rbd form mirroring toggle - fix the toggle not working while editing the image - the rbd form mirroring toggle doesn't disable/enable the mirror mode when you change the pool. - also re-arrange the form in a way that the required fields are together. - disable mirroring when selecting the namespace Fixes: https://tracker.ceph.com/issues/72458 Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-contants.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-contants.ts index c5b251915946..abc78f7612dc 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-contants.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-contants.ts @@ -12,3 +12,13 @@ export const RBDActionHelpers = { journalTooltipText: $localize`'Ensures reliable replication by logging changes before updating the image, but doubles write time, impacting performance. Not recommended for high-speed data processing tasks.`, snapshotTooltipText: $localize`This mode replicates RBD images between clusters using snapshots, efficiently copying data changes but requiring complete delta syncing during failover. Ideal for less demanding tasks due to its less granular approach compared to journaling.` }; + +export const RBDPoolMirrorModes = { + pool: 'pool', + image: 'image' +} + +export const RBDMirroringModes = { + journal: 'journal', + snapshot: 'snapshot' +} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.html index a6675bc0898d..225c52510814 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-form/rbd-form.component.html @@ -75,6 +75,7 @@ cdRequiredField="Pool" [invalid]="!rbdForm.controls['pool'].valid && (rbdForm.controls['pool'].dirty)" [invalidText]="poolError" + (valueChange)="setPoolMirrorMode()" *ngIf="mode !== 'editing' && poolPermission.read">