mgr/dashboard: Display RGW user/bucket quota max size in human readable form

Fixes: https://tracker.ceph.com/issues/34315

Signed-off-by: Volker Theile <vtheile@suse.com>
This commit is contained in:
Volker Theile 2018-08-31 18:49:45 +02:00
parent ff192f493c
commit 8311e4b6f5
2 changed files with 5 additions and 3 deletions

View File

@ -476,7 +476,8 @@
<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>
@ -579,7 +580,8 @@
<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>

View 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;