Show normalized values too

This commit is contained in:
Jamie Cameron
2014-10-11 11:25:58 -07:00
parent ee87e6e555
commit 6735d79b58
4 changed files with 8 additions and 6 deletions
+2 -1
View File
@@ -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();
}
+1
View File
@@ -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
+1 -1
View File
@@ -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) {
+4 -4
View File
@@ -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 {