mirror of
https://github.com/pgsty/minio.git
synced 2026-08-07 16:21:14 +03:00
Browser: Update UI with new components and elements (#5671)
This commit is contained in:
@@ -28,22 +28,15 @@ export class StorageInfo extends React.Component {
|
||||
const { total, free } = this.props.storageInfo
|
||||
const used = total - free
|
||||
const usedPercent = used / total * 100 + "%"
|
||||
const freePercent = free * 100 / total
|
||||
|
||||
return (
|
||||
<div className="feh-usage">
|
||||
<div className="fehu-chart">
|
||||
<div style={{ width: usedPercent }} />
|
||||
<div className="storage hidden-sm hidden-xs">
|
||||
<small>
|
||||
{humanize.filesize(total - free)} of {humanize.filesize(total)} Used
|
||||
</small>
|
||||
<div className="storage__progress">
|
||||
<span style={{ width: usedPercent }} />
|
||||
</div>
|
||||
<ul>
|
||||
<li>
|
||||
<span>Used: </span>
|
||||
{humanize.filesize(total - free)}
|
||||
</li>
|
||||
<li className="pull-right">
|
||||
<span>Free: </span>
|
||||
{humanize.filesize(total - used)}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -51,13 +44,13 @@ export class StorageInfo extends React.Component {
|
||||
|
||||
const mapStateToProps = state => {
|
||||
return {
|
||||
storageInfo: state.browser.storageInfo
|
||||
storageInfo: state.browser.storageInfo,
|
||||
}
|
||||
}
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
fetchStorageInfo: () => dispatch(actionsCommon.fetchStorageInfo())
|
||||
fetchStorageInfo: () => dispatch(actionsCommon.fetchStorageInfo()),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user