mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Show RAID status in more detail
This commit is contained in:
@@ -31,7 +31,7 @@ else {
|
||||
$conf = &get_raidtab();
|
||||
if (@$conf) {
|
||||
print &ui_columns_start([ $text{'index_name'},
|
||||
$text{'index_active'},
|
||||
$raid_mode eq "raidtools" ? $text{'index_active'} : $text{'index_status'},
|
||||
$text{'index_level'},
|
||||
$text{'index_size'},
|
||||
$text{'index_members'} ]);
|
||||
@@ -44,14 +44,9 @@ if (@$conf) {
|
||||
push(@mems, $d->{'value'});
|
||||
}
|
||||
}
|
||||
my @errors = grep { $_ ne "U" } @{$c->{'errors'}};
|
||||
print &ui_columns_row([
|
||||
&ui_link("view_raid.cgi?idx=$c->{'index'}",&html_escape($c->{'value'})),
|
||||
!$c->{'active'} ?
|
||||
"<font color=#ff0000>$text{'no'}</font>" :
|
||||
@errors ?
|
||||
"<font color=#ff8800>$text{'index_errors'}</font>" :
|
||||
"<font color=#00aa00>$text{'yes'}</font>",
|
||||
$raid_mode eq "raidtools" ? $c->{'active'} ? "<font color=#00aa00>$text{'yes'}</font>" : "<font color=#ff0000>$text{'no'}</font>" : $c->{'state'} =~ /resyncing/ || $c->{'state'} =~ /recovering/ || $c->{'state'} =~ /reshaping/ || $c->{'state'} =~ /degraded/ || $c->{'state'} =~ /FAILED/ ? $c->{'rebuild'} ne '' ? "<font color=#ff0000>".$c->{'state'}."(".$c->{'rebuild'}."%, ".int($c->{'remain'})."min)</font>" : "<font color=#ff0000>".$c->{'state'}."</font>" : "<font color=#00aa00>".$c->{'state'}."</font>",
|
||||
$lvl eq 'linear' ? $text{'linear'} : $text{'raid'.$lvl},
|
||||
$c->{'size'} ? &nice_size($c->{'size'}*1024) : "",
|
||||
&ui_links_row(\@mems),
|
||||
|
||||
@@ -8,7 +8,7 @@ index_mdadm=Using MDADM version $1
|
||||
index_raidtools=Using RaidTools
|
||||
index_name=Device name
|
||||
index_active=Active?
|
||||
index_errors=Errors
|
||||
index_status=Status
|
||||
index_level=RAID level
|
||||
index_size=Usable size
|
||||
index_members=Member disk devices
|
||||
|
||||
Reference in New Issue
Block a user