From: Dnyaneshwari Date: Tue, 4 Nov 2025 04:45:02 +0000 (+0530) Subject: mgr/dashboard: Carbonize - Multisite Zone X-Git-Tag: testing/wip-jcollin-testing-20260212.143545-tentacle~48^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0879475a23bbaecb052410bd00a588934204ade9;p=ceph-ci.git mgr/dashboard: Carbonize - Multisite Zone Fixes: https://tracker.ceph.com/issues/73707 Signed-off-by: Dnyaneshwari Talwekar (cherry picked from commit 1be7446ada23c477cb272e8e4de119553ff81c04) Conflicts: src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.html src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zonegroup-form/rgw-multisite-zonegroup-form.component.html --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.ts index c980c9d32ee..478c09a50ba 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-details/rgw-multisite-details.component.ts @@ -42,6 +42,7 @@ import { RgwMultisiteWizardComponent } from '../rgw-multisite-wizard/rgw-multisi import { RgwMultisiteSyncPolicyComponent } from '../rgw-multisite-sync-policy/rgw-multisite-sync-policy.component'; import { ModalCdsService } from '~/app/shared/services/modal-cds.service'; import { RgwMultisiteService } from '~/app/shared/api/rgw-multisite.service'; +import { CdForm } from '~/app/shared/forms/cd-form'; const BASE_URL = 'rgw/multisite/configuration'; @@ -51,7 +52,7 @@ const BASE_URL = 'rgw/multisite/configuration'; styleUrls: ['./rgw-multisite-details.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) -export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit { +export class RgwMultisiteDetailsComponent extends CdForm implements OnDestroy, OnInit { private sub = new Subscription(); @ViewChild('treeNodeTemplate') labelTpl: TemplateRef; @ViewChild(RgwMultisiteSyncPolicyComponent) syncPolicyComp: RgwMultisiteSyncPolicyComponent; @@ -140,12 +141,13 @@ export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit { private rgwMultisiteService: RgwMultisiteService, private changeDetectionRef: ChangeDetectorRef ) { + super(); this.permissions = this.authStorageService.getPermissions(); } openModal(entity: any | string, edit = false) { const entityName = edit ? entity?.data?.type : entity; - const action = edit ? 'edit' : 'create'; + const action = edit ? this.actionLabels.EDIT : this.actionLabels.CREATE; const initialState = { resource: entityName, action: action, @@ -154,14 +156,18 @@ export class RgwMultisiteDetailsComponent implements OnDestroy, OnInit { multisiteInfo: this.multisiteInfo }; if (entityName === 'realm') { - this.bsModalRef = this.cdsModalService.show(RgwMultisiteRealmFormComponent, initialState); + this.cdsModalService.show(RgwMultisiteRealmFormComponent, initialState); } else if (entityName === 'zonegroup') { this.bsModalRef = this.modalService.show(RgwMultisiteZonegroupFormComponent, initialState, { size: 'lg' }); } else { - this.bsModalRef = this.modalService.show(RgwMultisiteZoneFormComponent, initialState, { - size: 'lg' + this.cdsModalService.show(RgwMultisiteZoneFormComponent, { + resource: entityName, + action: action, + info: entity, + defaultsInfo: this.defaultsInfo, + multisiteInfo: this.multisiteInfo }); } } diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.html index ca96ff05674..a8855e94d5b 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-zone-form/rgw-multisite-zone-form.component.html @@ -1,296 +1,278 @@ - - {{ action | titlecase }} {{ resource | upperFirst }} - - -
-