From aeeaf73507c28ef45de8773d0445bdc9eea3419c Mon Sep 17 00:00:00 2001 From: Afreen Misbah Date: Thu, 17 Apr 2025 21:05:39 +0530 Subject: [PATCH] mgr/dashboard: Fix pool update on edit Issue: Pool field was blank on editing namespace form and user needs to type out pool Reason: `image` field is no longer supported in form yet edit function trying to fetch it and failing on that, hence no following updates for pool Fix: Removed stale `image` field Additional changes: - included unit tests for edit to capture such errors - enhanced unit tests to sue ActivatedRouteStub and `router.url` - pre populating pool form on create with first rbd pool in the list Fixes https://tracker.ceph.com/issues/70966 Regression by: https://tracker.ceph.com/issues/69900 Signed-off-by: Afreen Misbah --- .../nvmeof-namespaces-form.component.html | 7 +- .../nvmeof-namespaces-form.component.spec.ts | 138 +++++++++++++++--- .../nvmeof-namespaces-form.component.ts | 8 +- .../src/testing/activated-route-stub.ts | 19 ++- 4 files changed, 140 insertions(+), 32 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.html index f030e17dd94..bdd3830ffea 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/nvmeof-namespaces-form/nvmeof-namespaces-form.component.html @@ -19,9 +19,10 @@