mirror of
https://github.com/pgsty/minio.git
synced 2026-08-05 07:02:04 +03:00
Implement support for calculating disk usage per tenant (#5969)
Fixes #5961
This commit is contained in:
committed by
Nitish Tiwari
parent
483fe4bed5
commit
e6ec645035
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user