Show normalized values too
This commit is contained in:
@@ -118,7 +118,8 @@ if ($config{'attribs'} && @{$st->{'attribs'}}) {
|
||||
foreach my $a (@{$st->{'attribs'}}) {
|
||||
next if ($a->[0] =~ /UDMA CRC Error Count/i); # too long
|
||||
print &ui_table_row($a->[0],
|
||||
$a->[2] =~ /^\s*(seconds|minutes|hours|days|months|years|weeks)\s*/i || !$a->[2] ? $a->[1]." ".$a->[2] : $a->[2]);
|
||||
($a->[2] =~ /^\s*(seconds|minutes|hours|days|months|years|weeks)\s*/i || !$a->[2] ? $a->[1]." ".$a->[2] : $a->[2]).
|
||||
($a->[3] ? " ($text{'index_norm'} $a->[3])" : ""));
|
||||
}
|
||||
print &ui_hidden_table_end();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ index_return=module index
|
||||
index_family=Model family
|
||||
index_serial=Serial number
|
||||
index_capacity=Capacity
|
||||
index_norm=Normalized:
|
||||
|
||||
monitor_type=SMART Drive Check
|
||||
monitor_type2=SSD Wearout
|
||||
|
||||
@@ -350,7 +350,7 @@ if ($config{'attribs'}) {
|
||||
elsif (/^\s*(\d+)\s+(\S+)\s+(0x\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)/) {
|
||||
# A new-style vendor attribute
|
||||
$doneknown = 1;
|
||||
push(@attribs, [ $2, $10, $4 ]);
|
||||
push(@attribs, [ $2, $10, undef, $4 ]);
|
||||
$attribs[$#attribs]->[0] =~ s/_/ /g;
|
||||
}
|
||||
elsif (/^(\S.*\S):\s+\(\s*(\S+)\)\s*(.*)/ && !$doneknown) {
|
||||
|
||||
@@ -50,14 +50,14 @@ if ($type eq "wearout") {
|
||||
return { 'up' => -1,
|
||||
'desc' => $text{'monitor_nowearout'} };
|
||||
}
|
||||
if ($wo->[2] < $mon->{'wearlevel'}) {
|
||||
if ($wo->[3] < $mon->{'wearlevel'}) {
|
||||
return { 'up' => 0,
|
||||
'desc' => &text('monitor_wornout', $wo->[2]),
|
||||
'value' => $wo->[2] };
|
||||
'desc' => &text('monitor_wornout', $wo->[3]),
|
||||
'value' => $wo->[3] };
|
||||
}
|
||||
else {
|
||||
return { 'up' => 1,
|
||||
'value' => $wo->[2] };
|
||||
'value' => $wo->[3] };
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user