]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Display RGW user/bucket quota max size in human readable form 23842/head
authorVolker Theile <vtheile@suse.com>
Fri, 31 Aug 2018 16:49:45 +0000 (18:49 +0200)
committerVolker Theile <vtheile@suse.com>
Mon, 3 Sep 2018 07:46:07 +0000 (09:46 +0200)
Fixes: https://tracker.ceph.com/issues/34315
Signed-off-by: Volker Theile <vtheile@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts

index 943a4d96ff3bd7b73bb0fc223faa44a5f1d30ee6..45b4f0ae61f7f28f054bb50b8f8be6e8baa85cb6 100644 (file)
               <input id="user_quota_max_size"
                      class="form-control"
                      type="text"
-                     formControlName="user_quota_max_size">
+                     formControlName="user_quota_max_size"
+                     cdDimlessBinary>
               <span class="help-block"
                     *ngIf="userForm.showError('user_quota_max_size', frm, 'required')"
                     i18n>
               <input id="bucket_quota_max_size"
                      class="form-control"
                      type="text"
-                     formControlName="bucket_quota_max_size">
+                     formControlName="bucket_quota_max_size"
+                     cdDimlessBinary>
               <span class="help-block"
                     *ngIf="userForm.showError('bucket_quota_max_size', frm, 'required')"
                     i18n>
index 8623351791de6104ff097b152e3056b677e349d5..422a65d148fa9658e69b8fd78c888ade2f7dbc91 100644 (file)
@@ -177,7 +177,7 @@ export class RgwUserFormComponent implements OnInit {
               value[type + '_quota_max_size'] = null;
             } else {
               value[type + '_quota_max_size_unlimited'] = false;
-              value[type + '_quota_max_size'] = quota.max_size;
+              value[type + '_quota_max_size'] = `${quota.max_size} B`;
             }
             if (quota.max_objects < 0) {
               value[type + '_quota_max_objects_unlimited'] = true;