From: Lenz Grimmer Date: Thu, 25 Jun 2020 12:49:01 +0000 (+0200) Subject: Merge pull request #34606 from rhcs-dashboard/wip-45011-bucket-usage-feature X-Git-Tag: v16.1.0~1925 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=584baf132fb077e8e0c84cfc3edd1615bd574698;p=ceph.git Merge pull request #34606 from rhcs-dashboard/wip-45011-bucket-usage-feature mgr/dashboard: Display users current bucket quota usage Reviewed-by: Alfonso Martínez Reviewed-by: Ernesto Puerta Reviewed-by: Stephan Müller Reviewed-by: Volker Theile --- 584baf132fb077e8e0c84cfc3edd1615bd574698 diff --cc src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html index aee75c724f28,727d44b35f2b..91ddad6ae668 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/osd/osd-list/osd-list.component.html @@@ -77,28 -76,7 +77,28 @@@ - + + + + + +
+
+ + +
+
+
+
+
diff --cc src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.ts index 789e41cb4d6a,40e110e3f272..99b6aa60df69 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/usage-bar/usage-bar.component.ts @@@ -13,11 -15,11 +15,9 @@@ export class UsageBarComponent implemen usedPercentage: number; freePercentage: number; - freeBytes: number; - constructor() {} - ngOnChanges() { - this.usedPercentage = Math.round((this.usedBytes / this.totalBytes) * 100); + this.usedPercentage = this.total > 0 ? Math.round((this.used / this.total) * 100) : 0; this.freePercentage = 100 - this.usedPercentage; - this.freeBytes = this.totalBytes - this.usedBytes; } }