Added a Module Config option to show managed systems in a table
authorJamie Cameron <jcameron@webmin.com>
Thu, 20 Dec 2007 19:46:05 +0000 (19:46 +0000)
committerJamie Cameron <jcameron@webmin.com>
Thu, 20 Dec 2007 19:46:05 +0000 (19:46 +0000)
cluster-webmin/CHANGELOG
cluster-webmin/config
cluster-webmin/config.info
cluster-webmin/index.cgi
cluster-webmin/lang/en

index d63392a..d13ea98 100644 (file)
@@ -15,3 +15,5 @@ Users can now have their passwords set to use external authentication.
 Added support for cluster upgrading the Debian package of Webmin.
 ---- Changes since 1.300 ----
 Added an option to not re-install deleted or new modules when upgrading.
+---- Changes since 1.380 ----
+Added a Module Config option to show managed systems in a table.
index 9a3ce07..470eaee 100644 (file)
@@ -1 +1,2 @@
 sort_mode=0
+table_mode=0
index 6264e71..b6b7a1e 100644 (file)
@@ -1 +1,2 @@
 sort_mode=Sort hosts by,1,1-Hostname,0-Order added,2-Description
+table_mode=Show hosts as,1,1-Table,0-Icons
index 88c22e2..7dd8b58 100755 (executable)
@@ -31,9 +31,34 @@ foreach $h (@hosts) {
        $gothost{$h->{'id'}}++;
        }
 if (@links) {
-       &icons_table(\@links, \@titles, \@icons);
+       if ($config{'table_mode'}) {
+               # Show as table
+               print &ui_columns_start([ $text{'index_thost'},
+                                         $text{'index_tdesc'},
+                                         $text{'index_tver'},
+                                         $text{'index_ttype'} ]);
+               foreach $h (@hosts) {
+                       local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers;
+                       next if (!$s);
+                       local ($type) = grep { $_->[0] eq $s->{'type'} }
+                                            @servers::server_types;
+                       print &ui_columns_row([
+                               "<a href='edit_host.cgi?id=$h->{'id'}'>".
+                               ($s->{'host'} || &get_system_hostname())."</a>",
+                               $s->{'desc'},
+                               $h->{'version'},
+                               $type->[1],
+                               ]);
+                       }
+               print &ui_columns_end();
+               }
+       else {
+               # Show as icons
+               &icons_table(\@links, \@titles, \@icons);
+               }
        }
 else {
+       # Nothing to show
        print "<b>$text{'index_nohosts'}</b><p>\n";
        }
 
index 753b08b..e21f34d 100644 (file)
@@ -35,6 +35,10 @@ index_upgradeon=Servers to upgrade
 index_update=Update Modules
 index_updateon=Servers to update
 index_updatedesc=This form allows you to upgrade Webmin modules that have been found to contain bugs or security holes from the <a href=http://www.webmin.com/updates.html>Webmin Updates</a> page or from another source.
+index_thost=Hostname
+index_tdesc=Description
+index_tver=Version
+index_ttype=OS type
 
 this_server=this server