]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / services / service-form / service-form.component.html
index 6c465d46998d8b682e2dc63ed9b473c9e84ea0ae..b95f9353db35207b13719b6f52b3c91bf903972f 100644 (file)
@@ -7,7 +7,14 @@
           [formGroup]="serviceForm"
           novalidate>
       <div class="modal-body">
-
+        <cd-alert-panel *ngIf="serviceForm.controls.service_type.value === 'rgw' && showRealmCreationForm"
+                        type="info"
+                        spacingClass="mb-3"
+                        i18n>
+          <a class="text-decoration-underline"
+             (click)="createMultisiteSetup()">
+             Click here</a> to create a new Realm/Zone Group/Zone
+        </cd-alert-panel>
         <!-- Service type -->
         <div class="form-group row">
           <label class="cd-col-form-label required"
             <span class="invalid-feedback"
                   *ngIf="serviceForm.showError('service_id', frm, 'uniqueName')"
                   i18n>This service id is already in use.</span>
-            <span class="invalid-feedback"
-                  *ngIf="serviceForm.showError('service_id', frm, 'rgwPattern')"
-                  i18n>The value does not match the pattern <strong>&lt;service_id&gt;[.&lt;realm_name&gt;.&lt;zone_name&gt;]</strong>.</span>
             <span class="invalid-feedback"
                   *ngIf="serviceForm.showError('service_id', frm, 'mdsPattern')"
                   i18n>MDS service id must start with a letter and contain alphanumeric characters or '.', '-', and '_'</span>
           </div>
         </div>
 
+        <div class="form-group row"
+             *ngIf="serviceForm.controls.service_type.value === 'rgw'">
+          <label class="cd-col-form-label"
+                 for="realm_name"
+                 i18n>Realm</label>
+          <div class="cd-col-form-input">
+            <select class="form-select"
+                    id="realm_name"
+                    formControlName="realm_name"
+                    name="realm_name"
+                    [attr.disabled]="realmList.length === 0  || editing ? true : null">
+            <option *ngIf="realmList.length === 0"
+                    i18n
+                    selected>-- No realm available --</option>
+            <option *ngFor="let realm of realmList"
+                    [value]="realm.name">
+                  {{ realm.name }}
+            </option>
+            </select>
+          </div>
+        </div>
+
+        <div class="form-group row"
+             *ngIf="serviceForm.controls.service_type.value === 'rgw'">
+          <label class="cd-col-form-label"
+                 for="zonegroup_name"
+                 i18n>Zone Group</label>
+          <div class="cd-col-form-input">
+            <select class="form-select"
+                    id="zonegroup_name"
+                    formControlName="zonegroup_name"
+                    name="zonegroup_name"
+                    [attr.disabled]="zonegroupList.length === 0  || editing ? true : null">
+              <option *ngFor="let zonegroup of zonegroupList"
+                      [value]="zonegroup.name">
+              {{ zonegroup.name }}
+              </option>
+            </select>
+          </div>
+        </div>
+
+        <div class="form-group row"
+             *ngIf="serviceForm.controls.service_type.value === 'rgw'">
+          <label class="cd-col-form-label"
+                 for="zone_name"
+                 i18n>Zone</label>
+          <div class="cd-col-form-input">
+            <select class="form-select"
+                    id="zone_name"
+                    formControlName="zone_name"
+                    name="zone_name"
+                    [attr.disabled]="zoneList.length === 0  || editing ? true : null">
+              <option *ngFor="let zone of zoneList"
+                      [value]="zone.name">
+              {{ zone.name }}
+              </option>
+            </select>
+          </div>
+        </div>
+
         <!-- unmanaged -->
         <div class="form-group row">
           <div class="cd-col-form-offset">