Implement support for calculating disk usage per tenant (#5969)

Fixes #5961
This commit is contained in:
Harshavardhana
2018-05-23 03:11:29 -07:00
committed by Nitish Tiwari
parent 483fe4bed5
commit e6ec645035
23 changed files with 328 additions and 81 deletions
+4 -5
View File
@@ -25,19 +25,18 @@ export class StorageInfo extends React.Component {
fetchStorageInfo()
}
render() {
const { total, free } = this.props.storageInfo
const used = total - free
const { total, used } = this.props.storageInfo
const usedPercent = used / total * 100 + "%"
const freePercent = free * 100 / total
const freePercent = (total - used) * 100 / total
return (
<div className="feh-usage">
<div className="feh-used">
<div className="fehu-chart">
<div style={{ width: usedPercent }} />
</div>
<ul>
<li>
<span>Used: </span>
{humanize.filesize(total - free)}
{humanize.filesize(used)}
</li>
<li className="pull-right">
<span>Free: </span>