From 257ba5a7a1e3135857e3c42b78fceeaad1fde996 Mon Sep 17 00:00:00 2001 From: Naman Munet Date: Fri, 31 Oct 2025 23:08:49 +0530 Subject: [PATCH] mgr/dashboard: Carbonize multisite sync policy forms Fixes: https://tracker.ceph.com/issues/73164 Signed-off-by: Naman Munet (cherry picked from commit 495f9b74965ea255776b9f4605f7a2df0016bcfd) Conflicts: src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.html src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-pipe-modal/rgw-multisite-sync-pipe-modal.component.html src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-pipe-modal/rgw-multisite-sync-pipe-modal.component.spec.ts --- .../frontend/cypress/e2e/rgw/multisite.po.ts | 7 +- ...w-multisite-sync-flow-modal.component.html | 226 ++++++++---------- ...ultisite-sync-flow-modal.component.spec.ts | 35 ++- ...rgw-multisite-sync-flow-modal.component.ts | 78 +++--- ...w-multisite-sync-pipe-modal.component.html | 221 ++++++++--------- ...ultisite-sync-pipe-modal.component.spec.ts | 59 +++-- ...rgw-multisite-sync-pipe-modal.component.ts | 112 +++++---- ...ltisite-sync-policy-details.component.html | 42 ++-- ...multisite-sync-policy-details.component.ts | 11 +- ...-multisite-sync-policy-form.component.html | 162 ++++++------- ...ltisite-sync-policy-form.component.spec.ts | 5 +- ...gw-multisite-sync-policy-form.component.ts | 11 +- 12 files changed, 496 insertions(+), 473 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/rgw/multisite.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/rgw/multisite.po.ts index 5240c8364244..1eefd77f7c72 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/rgw/multisite.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/rgw/multisite.po.ts @@ -38,14 +38,15 @@ export class MultisitePageHelper extends PageHelper { @PageHelper.restrictTo(pages.create.url) create(group_id: string, status: string, bucket_name: string) { // Enter in group_id - cy.get('#group_id').type(group_id); + cy.get('#group_id').type(group_id, { force: true }); // Show Status this.selectOption('status', status); cy.get('#status').should('have.class', 'ng-valid'); // Enter the bucket_name cy.get('#bucket_name').type(bucket_name); + cy.get('#bucket_name').should('have.class', 'ng-valid'); // Click the create button and wait for policy to be made - cy.contains('button', 'Create Sync Policy Group').wait(WAIT_TIMER).click(); + cy.contains('cd-submit-button button', 'Create').click(); this.getFirstTableCell(group_id).should('exist'); } @@ -55,7 +56,7 @@ export class MultisitePageHelper extends PageHelper { // Change the status field this.selectOption('status', status); - cy.contains('button', 'Edit Sync Policy Group').click(); + cy.contains('cd-submit-button button', 'Edit').click(); this.searchTable(group_id); cy.get(`[cdstabledata]:nth-child(${this.columnIndex.status})`) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.html index 5f13a0aedb1f..4a18e14b5f8d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-sync-flow-modal/rgw-multisite-sync-flow-modal.component.html @@ -1,127 +1,113 @@ - - {{ action | titlecase }} {{ groupType | upperFirst }} Flow - - -
-