Can select SCSI for monitoring
authorJamie Cameron <jcameron@webmin.com>
Thu, 27 Nov 2008 08:37:46 +0000 (08:37 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 27 Nov 2008 08:37:46 +0000 (08:37 +0000)
smart-status/CHANGELOG
smart-status/status_monitor.pl

index 5644932..00c0bbd 100644 (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.
index f430f3a..f67b16c 100644 (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;
 }