]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Allow the user to add the access/secret key on zone edit 55226/head
authorAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Thu, 18 Jan 2024 06:44:42 +0000 (12:14 +0530)
committerAashish Sharma <aasharma@li-e74156cc-2f67-11b2-a85c-e98659a63c5c.ibm.com>
Wed, 6 Mar 2024 08:19:08 +0000 (13:49 +0530)
and not on zone creation

Fixes: https://tracker.ceph.com/issues/64080
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
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-zone-form/rgw-multisite-zone-form.component.ts

index 3856c42f0ea7673e8918468596b623550b3c2c12..98741bed3990e193ee6fa42959a520a0f9d448f2 100644 (file)
         </div>
       </div>
       <div class="form-group row">
-        <label class="cd-col-form-label required"
+        <label class="cd-col-form-label"
                for="access_key"
                i18n>S3 access key
           <cd-helper>
           </cd-helper>
         </label>
         <div class="cd-col-form-input">
-          <input class="form-control"
-                 type="text"
-                 placeholder="DiPt4V7WWvy2njL1z6aC"
-                 id="access_key"
-                 name="access_key"
-                 formControlName="access_key">
+          <div class="input-group">
+            <input class="form-control"
+                   type="password"
+                   placeholder="DiPt4V7WWvy2njL1z6aC"
+                   id="access_key"
+                   name="access_key"
+                   formControlName="access_key">
+            <button type="button"
+                    class="btn btn-light"
+                    cdPasswordButton="access_key">
+            </button>
+          </div>
         </div>
       </div>
       <div class="form-group row">
-        <label class="cd-col-form-label required"
-               for="access_key"
+        <label class="cd-col-form-label"
+               for="secret_key"
                i18n>S3 secret key
           <cd-helper>
             <span>To see or copy your S3 access key, go to <b>Object Gateway > Users</b> and click on your user name. In <b>Keys</b>, click <b>Show</b>. View the secret key by clicking Show and copy the key by clicking <b>Copy to Clipboard</b>.</span>
           </cd-helper>
         </label>
         <div class="cd-col-form-input">
-          <input class="form-control"
-                 type="text"
-                 placeholder="xSZUdYky0bTctAdCEEW8ikhfBVKsBV5LFYL82vvh"
-                 id="secret_key"
-                 name="secret_key"
-                 formControlName="secret_key">
+          <div class="input-group">
+            <input class="form-control"
+                   type="password"
+                   placeholder="xSZUdYky0bTctAdCEEW8ikhfBVKsBV5LFYL82vvh"
+                   id="secret_key"
+                   name="secret_key"
+                   formControlName="secret_key">
+            <button type="button"
+                    class="btn btn-light"
+                    cdPasswordButton="secret_key">
+            </button>
+          </div>
         </div>
       </div>
       <div class="form-group row"
index 76e2970dde7faf9dd93512175042e914a9ef45f2..21106c53eb3ba199e1c179d2064e50e88fe89c06 100644 (file)
@@ -112,8 +112,8 @@ export class RgwMultisiteZoneFormComponent implements OnInit {
           Validators.required
         ]
       }),
-      access_key: new UntypedFormControl(null, Validators.required),
-      secret_key: new UntypedFormControl(null, Validators.required),
+      access_key: new UntypedFormControl('', {}),
+      secret_key: new UntypedFormControl('', {}),
       placementTarget: new UntypedFormControl(null),
       placementDataPool: new UntypedFormControl(''),
       placementIndexPool: new UntypedFormControl(null),