diff --git a/cluster-usermin/CHANGELOG b/cluster-usermin/CHANGELOG index a610020d7..82631dde6 100644 --- a/cluster-usermin/CHANGELOG +++ b/cluster-usermin/CHANGELOG @@ -2,3 +2,5 @@ First version of this module, which can manage multiple Usermin servers from a single interface. ---- Changes since 1.290 ---- Added support for cluster upgrading the Debian package of Usermin. +---- Changes since 1.380 ---- +Added a Module Config option to show managed systems in a table. diff --git a/cluster-usermin/config b/cluster-usermin/config index 9a3ce078b..470eaee86 100644 --- a/cluster-usermin/config +++ b/cluster-usermin/config @@ -1 +1,2 @@ sort_mode=0 +table_mode=0 diff --git a/cluster-usermin/config.info b/cluster-usermin/config.info index 6264e71de..b6b7a1e3f 100644 --- a/cluster-usermin/config.info +++ b/cluster-usermin/config.info @@ -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 diff --git a/cluster-usermin/index.cgi b/cluster-usermin/index.cgi index 37a5d6017..36e52b41b 100755 --- a/cluster-usermin/index.cgi +++ b/cluster-usermin/index.cgi @@ -29,7 +29,31 @@ 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([ + "". + ($s->{'host'} || &get_system_hostname())."", + $s->{'desc'}, + $h->{'version'}, + $type->[1], + ]); + } + print &ui_columns_end(); + } + else { + # Show as icons + &icons_table(\@links, \@titles, \@icons); + } } else { print "$text{'index_nohosts'}
\n"; diff --git a/cluster-usermin/lang/en b/cluster-usermin/lang/en index 85a5bd17d..35a07cc9c 100644 --- a/cluster-usermin/lang/en +++ b/cluster-usermin/lang/en @@ -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 Usermin modules that have been found to contain bugs or security holes from the Usermin Updates page or from another source. +index_thost=Hostname +index_tdesc=Description +index_tver=Version +index_ttype=OS type this_server=this server