mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Show LV space used on main page
This commit is contained in:
@@ -12,3 +12,5 @@ Converted all user interface code to use the new Webmin UI library.
|
||||
Fixed the command used to move data to another physical volume under LVM 2.
|
||||
---- Changes since 1.410 ----
|
||||
The percentage of a snapshot's blocks used is now shown on the Edit Snapshot page.
|
||||
---- Changes since 1.440 ----
|
||||
Filesystem space used is show on the logical volume list, and the field for a new volume's size is more user-friendly.
|
||||
|
||||
@@ -168,6 +168,7 @@ if (@vgs) {
|
||||
print &ui_columns_start([ $text{'index_lvname'},
|
||||
$text{'index_lvvg'},
|
||||
$text{'index_lvsize'},
|
||||
$text{'index_lvused'},
|
||||
$text{'index_lvuse'} ], 100);
|
||||
foreach $l (@alllvs) {
|
||||
($v) = grep { $_->{'name'} eq $l->{'vg'} } @vgs;
|
||||
@@ -181,11 +182,20 @@ if (@vgs) {
|
||||
$snapof = undef;
|
||||
}
|
||||
@stat = &device_status($l->{'device'});
|
||||
$usedmsg = "";
|
||||
if (@stat[2]) {
|
||||
($total, $free) = &mount::disk_space(
|
||||
$stat[1], $stat[0]);
|
||||
$usedmsg = &text('lv_petotals',
|
||||
&nice_size(($total-$free)*1024),
|
||||
&nice_size($total));
|
||||
}
|
||||
print &ui_columns_row([
|
||||
"<a href='edit_lv.cgi?vg=".&urlize($v->{'name'}).
|
||||
"&lv=".&urlize($l->{'name'})."'>$l->{'name'}</a>",
|
||||
$v->{'name'},
|
||||
&nice_size($l->{'size'}*1024),
|
||||
$usedmsg,
|
||||
(@stat ? &device_message(@stat) : undef).
|
||||
($snap ? " ".&text('index_snapof', $snap->{'name'})
|
||||
: ""),
|
||||
|
||||
@@ -35,6 +35,7 @@ index_lvsdesc=A logical volume is a virtual partition created from the combined
|
||||
index_lvname=Logical volume
|
||||
index_lvvg=Volume group
|
||||
index_lvsize=Size
|
||||
index_lvused=Space used
|
||||
index_lvuse=Used for
|
||||
index_snapof=(Snapshot of $1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user