]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Display RGW user/bucket quota max size in human readable form 24047/head
authorVolker Theile <vtheile@suse.com>
Fri, 31 Aug 2018 16:49:45 +0000 (18:49 +0200)
committerPrashant D <pdhange@redhat.com>
Wed, 12 Sep 2018 00:35:22 +0000 (20:35 -0400)
Fixes: https://tracker.ceph.com/issues/34315
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit 8311e4b6f5db5391b535f7d19c60bbd621978239)

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 93ba8f4460546c93c1ad35a037852eb61313d37d..5c852d55c1529e84ce37d7fa9d8b5be4f6f7ddd4 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="(frm.submitted || userForm.controls.user_quota_max_size.dirty) && userForm.controls.user_quota_max_size.hasError('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="(frm.submitted || userForm.controls.bucket_quota_max_size.dirty) && userForm.controls.bucket_quota_max_size.hasError('required')"
                     i18n>
index d3a44f642d6ff77f1f4b99fb93bd0e839f1d34ab..850303bd2b30240f3f5d832a18a946e59a7290f0 100644 (file)
@@ -179,7 +179,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_size_unlimited'] = true;