New: Add label to disk usage progress bar (#4958) [common]

pull/2/head
nitsua 4 years ago committed by GitHub
parent f286f99bb6
commit 7c8ac30077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -65,7 +65,7 @@ class DiskSpace extends Component {
totalSpace
} = item;
const diskUsage = (100 - freeSpace / totalSpace * 100);
const diskUsage = Math.round(100 - freeSpace / totalSpace * 100);
let diskUsageKind = kinds.PRIMARY;
if (diskUsage > 90) {
@ -98,6 +98,8 @@ class DiskSpace extends Component {
progress={diskUsage}
kind={diskUsageKind}
size={sizes.MEDIUM}
showText={diskUsage >= 12}
text={`${diskUsage}%`}
/>
</TableRowCell>
</TableRow>

Loading…
Cancel
Save