]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: mgr/dashboard: Carbonize Realm Name and Token block in Multi-site... 68441/head
authorSagar Gopale <sagar.gopale@ibm.com>
Fri, 17 Apr 2026 10:49:44 +0000 (16:19 +0530)
committerSagar Gopale <sagar.gopale@ibm.com>
Tue, 21 Apr 2026 08:28:07 +0000 (13:58 +0530)
Fixes: https://tracker.ceph.com/issues/76085
Signed-off-by: Sagar Gopale <sagar.gopale@ibm.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-multisite-wizard/rgw-multisite-wizard.component.html

index af96cc9bd56a54e69146cba9e6884a0d2dc4374e..0513d40f35d74b29a646e1b20616f0824df9a6a4 100644 (file)
                   <select class="form-select"
                           id="selectedRealm"
                           formControlName="selectedRealm">
-                  <option *ngFor="let realm of realmList"
-                          [value]="realm">
+                    <option *ngFor="let realm of realmList"
+                            [value]="realm">
                         {{ realm }}
-                  </option>
+                    </option>
                   </select>
                 </div>
               </div>
 </ng-template>
 
 <ng-template #exportTokenTemplate>
-  <div *ngFor="let realminfo of realms">
-    <div class="form-group row">
-      <label class="cd-col-form-label"
-             for="realmName"
-             i18n>Realm Name</label>
-      <div class="cd-col-form-input">
-        <input id="realmName"
-               name="realmName"
-               type="text"
-               [value]="realminfo.realm"
-               readonly>
-        <cd-help-text>
-          <span i18n>Name of the realm that will be involved in replication.</span>
-        </cd-help-text>
-      </div>
-    </div>
-    <div class="form-group row">
-      <label class="cd-col-form-label"
-             for="token"
-             i18n>Token</label>
-      <div class="cd-col-form-input">
-        <input id="realmToken"
-               name="realmToken"
-               type="text"
-               [value]="realminfo.token"
-               class="me-2 mb-4"
-               readonly>
-        <cd-copy-2-clipboard-button [source]="realminfo.token"
-                                    [byId]="false">
-        </cd-copy-2-clipboard-button>
-        <cd-help-text>
-          <span i18n>This field displays the token needed to import the multisite configuration into a secondary cluster. Copy this token securely and use it on the secondary cluster to replicate the current multisite setup. Ensure that the token is handled securely to prevent unauthorized access.</span>
-        </cd-help-text>
-      </div>
-    </div>
-    <hr *ngIf="realms.length > 1">
+  @for (realminfo of realms; track realminfo; let i = $index) {
+  <div class="form-item">
+    <cds-text-label
+      [labelInputID]="'wizard-export-realm-' + i"
+      i18n
+      helperText="Name of the realm that will be involved in replication."
+      i18n-helperText
+    >
+      Realm Name
+      <input
+        cdsText
+        readonly
+        type="text"
+        [id]="'wizard-export-realm-' + i"
+        [value]="realminfo.realm"
+      />
+    </cds-text-label>
   </div>
+
+  <div class="form-item form-item-append">
+    <cds-text-label
+      [labelInputID]="'wizard-export-token-' + i"
+      i18n
+      helperText="This field displays the token needed to import the multisite configuration into a secondary cluster. Copy this token securely and use it on the secondary cluster to replicate the current multisite setup. Ensure that the token is handled securely to prevent unauthorized access."
+      i18n-helperText
+    >
+      Token
+      <input
+        cdsText
+        readonly
+        type="text"
+        [id]="'wizard-export-token-' + i"
+        [value]="realminfo.token"
+      />
+    </cds-text-label>
+    <cd-copy-2-clipboard-button
+      class="cds-mt-6"
+      [source]="realminfo.token"
+      [byId]="false"
+      size="md"
+    >
+    </cd-copy-2-clipboard-button>
+  </div>
+
+  @if (i < realms.length - 1) {
+  <hr />
+  }
+  }
 </ng-template>
 
 <ng-template #reviewTemplate>