Fix filesystem detection by volid, improve spacing, show size on main page
authorJamie Cameron <jcameron@webmin.com>
Wed, 3 Dec 2008 23:53:08 +0000 (23:53 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 3 Dec 2008 23:53:08 +0000 (23:53 +0000)
raid/index.cgi
raid/lang/en
raid/raid-lib.pl
raid/view_raid.cgi

index a748986..4ffb1b7 100755 (executable)
@@ -33,6 +33,7 @@ if (@$conf) {
        print &ui_columns_start([ $text{'index_name'},
                                $text{'index_active'},
                                $text{'index_level'},
+                               $text{'index_size'},
                                $text{'index_members'} ]);
        foreach $c (@$conf) {
                $lvl = &find_value('raid-level', $c->{'members'});
@@ -50,6 +51,7 @@ if (@$conf) {
                                "<font color=#00aa00>$text{'yes'}</font>" :
                                "<font color=#ff0000>$text{'no'}</font>",
                        $lvl eq 'linear' ? $text{'linear'} : $text{'raid'.$lvl},
+                       $c->{'size'} ? &nice_size($c->{'size'}*1024) : "",
                        &ui_links_row(\@mems),
                        ]);
                }
index b7b85b8..039febc 100644 (file)
@@ -9,6 +9,7 @@ index_raidtools=Using RaidTools
 index_name=Device name
 index_active=Active?
 index_level=RAID level
+index_size=Usable size
 index_members=Member disk devices
 index_header=RAID problem notification options
 index_mailaddr=Send notifications to
index 07e0761..46f635e 100644 (file)
@@ -458,11 +458,14 @@ sub device_status
 @mounted = &foreign_call("mount", "list_mounted") if (!@mounted);
 @mounts = &foreign_call("mount", "list_mounts") if (!@mounts);
 local $label = &fdisk::get_label($_[0]);
+local $volid = &fdisk::get_volid($_[0]);
 
 local ($mounted) = grep { &same_file($_->[1], $_[0]) ||
-                         $_->[1] eq "LABEL=$label" } @mounted;
+                         $_->[1] eq "LABEL=$label" ||
+                         $_->[1] eq "UUID=$volid" } @mounted;
 local ($mount) = grep { &same_file($_->[1], $_[0]) ||
-                       $_->[1] eq "LABEL=$label" } @mounts;
+                       $_->[1] eq "LABEL=$label" ||
+                       $_->[1] eq "UUID=$volid" } @mounts;
 if ($mounted) { return ($mounted->[0], $mounted->[2], 1,
                        &indexof($mount, @mounts),
                        &indexof($mounted, @mounted)); }
index 9969405..9221753 100755 (executable)
@@ -168,7 +168,8 @@ if (!$st[2]) {
        }
 
 if (@grid) {
-       print &ui_grid_table(\@grid, 2, 100, [ "width=20% nowrap" ]);
+       print &ui_grid_table(\@grid, 2, 100, [ "width=20% nowrap" ],
+                            "cellpadding=5"),"<p>\n";
        }
 if ($st[2]) {
        print "<b>$text{'view_cannot2'}</b><p>\n";