Can select SCSI for monitoring

This commit is contained in:
Jamie Cameron
2008-11-27 08:37:46 +00:00
parent b6a9d43946
commit 68c9cff554
2 changed files with 11 additions and 10 deletions

View File

@@ -6,3 +6,5 @@ Added a Module Config option to force ATA mode for SATA disks that appear as SCS
Added a Module Config option for extra smartctl command-line args, like -d 3ware,0
---- Changes since 1.380 ----
ATA mode is now used by default on CentOS and Redhat Enterprise versions 5 and above.
---- Changes since 1.440 ----
SCSI drives are visible in the System and Server Status module.

View File

@@ -42,24 +42,23 @@ else {
sub status_monitor_dialog
{
local $rv;
$rv = "<tr> <td><b>$text{'monitor_drive'}</b></td>\n";
$rv .= "<td colspan=3>";
local @drives = grep { $_->{'type'} eq 'ide' } &fdisk::list_disks_partitions();
local @drives = grep { $_->{'type'} eq 'ide' ||
$_->{'type'} eq 'scsi' } &fdisk::list_disks_partitions();
@drives = sort { $a->{'device'} cmp $b->{'device'} } @drives;
local ($inlist) = grep { $_->{'device'} eq $_[1]->{'drive'} } @drives;
$inlist = 1 if (!$_[1]->{'drive'});
$rv .= &ui_select("drive", !$_[1]->{'drive'} ? $drives[0]->{'device'} :
$rv .= &ui_table_row($text{'monitor_drive'},
&ui_select("drive", !$_[1]->{'drive'} ? $drives[0]->{'device'} :
$inlist ? $_[1]->{'drive'} : undef,
[ (map { [ $_->{'device'},
$_->{'desc'}.($_->{'model'} ?
" ($_->{'model'})" : "") ] } @drives),
[ "", $text{'monitor_other'} ] ]);
$rv .= &ui_textbox("other", $inlist ? "" : $_[1]->{'drive'}, 15);
$rv .= "</td> </tr>\n";
[ "", $text{'monitor_other'} ] ]).
&ui_textbox("other", $inlist ? "" : $_[1]->{'drive'}, 15), 3);
$rv .= "<tr> <td><b>$text{'monitor_errors'}</b></td>\n";
$rv .= "<td>".&ui_radio("errors", $_[1]->{'errors'} || 0,
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ])."</td> </tr>\n";
$rv .= &ui_table_row($text{'monitor_errors'},
&ui_radio("errors", $_[1]->{'errors'} || 0,
[ [ 1, $text{'yes'} ], [ 0, $text{'no'} ] ]));
return $rv;
}