mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-19 07:52:33 +02:00
New: Add label to disk usage progress bar (#4958) [common]
This commit is contained in:
parent
f286f99bb6
commit
7c8ac30077
@ -65,7 +65,7 @@ class DiskSpace extends Component {
|
|||||||
totalSpace
|
totalSpace
|
||||||
} = item;
|
} = item;
|
||||||
|
|
||||||
const diskUsage = (100 - freeSpace / totalSpace * 100);
|
const diskUsage = Math.round(100 - freeSpace / totalSpace * 100);
|
||||||
let diskUsageKind = kinds.PRIMARY;
|
let diskUsageKind = kinds.PRIMARY;
|
||||||
|
|
||||||
if (diskUsage > 90) {
|
if (diskUsage > 90) {
|
||||||
@ -98,6 +98,8 @@ class DiskSpace extends Component {
|
|||||||
progress={diskUsage}
|
progress={diskUsage}
|
||||||
kind={diskUsageKind}
|
kind={diskUsageKind}
|
||||||
size={sizes.MEDIUM}
|
size={sizes.MEDIUM}
|
||||||
|
showText={diskUsage >= 12}
|
||||||
|
text={`${diskUsage}%`}
|
||||||
/>
|
/>
|
||||||
</TableRowCell>
|
</TableRowCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
Loading…
Reference in New Issue
Block a user