mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Show percent used
This commit is contained in:
@@ -21,3 +21,4 @@ Mounted filesystems can now be displayed on Intel macs, without needing the gcc
|
||||
SMBFS authentication credentials can be stored in a separate file, thanks to a patch by Rob Shinn.
|
||||
---- Changes since 1.440 ----
|
||||
Improved support for filesystems on partitions identified by volume ID when the vol_id command is missing.
|
||||
Show the used disk space for each filesystem on the main page.
|
||||
|
||||
@@ -50,6 +50,7 @@ if (@visible) {
|
||||
print &ui_columns_start([ $text{'index_dir'},
|
||||
$text{'index_type'},
|
||||
$text{'index_dev'},
|
||||
$text{'index_used'},
|
||||
$text{'index_use'},
|
||||
$text{'index_perm'} ], 100);
|
||||
foreach $m (@visible) {
|
||||
@@ -79,6 +80,15 @@ if (@visible) {
|
||||
$fsn .= " ($minfo[2])" if (uc($fsn) ne uc($minfo[2]));
|
||||
push(@cols, $minfo[2] eq "*" ? $text{'index_auto'} : $fsn);
|
||||
push(@cols, &device_name($minfo[1]));
|
||||
($total, $free) = &disk_space($minfo[2],$minfo[0]);
|
||||
if ($total) {
|
||||
$pc = int(100*($total-$free) / $total);
|
||||
push(@cols, $pc >= 99 ? "<font color=red>$pc %</font>" :
|
||||
$pc >= 95 ? "<font color=orange>$pc %</font>" : $pc."%");
|
||||
}
|
||||
else {
|
||||
push(@cols, "");
|
||||
}
|
||||
if (&can_edit_fs(@minfo)) {
|
||||
push(@cols,
|
||||
defined($medidx) ?
|
||||
|
||||
@@ -2,8 +2,9 @@ index_title=Disk and Network Filesystems
|
||||
index_dir=Mounted as
|
||||
index_type=Type
|
||||
index_dev=Location
|
||||
index_used=Used
|
||||
index_use=In use?
|
||||
index_perm=Permanent?
|
||||
index_perm=Saved?
|
||||
index_add=Add mount
|
||||
index_auto=Unknown Type
|
||||
index_swap=Virtual Memory
|
||||
|
||||
Reference in New Issue
Block a user