#!/usr/bin/perl # index.cgi # Display hosts on which users are being managed, and inputs for adding more require './cluster-useradmin-lib.pl'; &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1); # Display hosts on which users will be managed print &ui_subheading($text{'index_hosts'}); @servers = &list_servers(); @hosts = &list_useradmin_hosts(); if ($config{'sort_mode'} == 1) { @hosts = sort { my ($as) = grep { $_->{'id'} == $a->{'id'} } @servers; my ($bs) = grep { $_->{'id'} == $b->{'id'} } @servers; lc($as->{'host'}) cmp lc($bs->{'host'}) } @hosts; } elsif ($config{'sort_mode'} == 2) { @hosts = sort { my ($as) = grep { $_->{'id'} == $a->{'id'} } @servers; my ($bs) = grep { $_->{'id'} == $b->{'id'} } @servers; lc(&server_name($as)) cmp lc(&server_name($bs)) }@hosts; } $formno = 0; foreach $h (@hosts) { local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers; next if (!$s); local ($link) = $config{'conf_host_links'} ? "edit_host.cgi?id=$h->{'id'}" : "#"; push(@titles, &server_name($s)); push(@links, $link); push(@icons, &get_webprefix()."/servers/images/". $s->{'type'}.".svg"); push(@installed, @{$h->{'packages'}}); $gothost{$h->{'id'}}++; } if (@links) { if ($config{'table_mode'}) { # Show as table print &ui_columns_start([ $text{'index_thost'}, $text{'index_tdesc'}, $text{'index_tucount'}, $text{'index_tgcount'}, $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; local ($link) = $config{'conf_host_links'} ? &ui_link("edit_host.cgi?id=$h->{'id'}", ($s->{'host'} || &get_system_hostname())) : ($s->{'host'} || &get_system_hostname()); print &ui_columns_row([ $link, $s->{'desc'}, scalar(@{$h->{'users'}}), scalar(@{$h->{'groups'}}), $type->[1], ]); } print &ui_columns_end(); } else { # Show as icons &icons_table(\@links, \@titles, \@icons); } } else { print "<b>$text{'index_nohosts'}</b><p>\n"; } $formno++; print &ui_buttons_start(); # Add one server my @addservers = grep { !$gothost{$_->{'id'}} } @servers; if (@addservers) { print &ui_buttons_row("add.cgi", $text{'index_add'}, undef, [ [ "add", 1 ] ], &ui_select("server", undef, [ map { [ $_->{'id'}, &server_name($_) ] } @addservers ])); } # Add one group @groups = &servers::list_all_groups(\@servers); if (@groups) { print &ui_buttons_row("add.cgi", $text{'index_gadd'}, undef, [ [ "gadd", 1 ] ], &ui_select("group", undef, [ map { $_->{'name'} } @groups ])); } print &ui_buttons_end(); if (!$config{'conf_add_user'} && !$config{'conf_add_group'} && !$config{'conf_allow_refresh'} && !$config{'conf_allow_sync'} && !$config{'conf_find_user'} && !$config{'conf_find_group'}) { # If we have configured EVERY possible 'host' action off, then don't # show the header/horizontal-rule/etc... @hosts = (); } if (@hosts) { # Display search and add forms print &ui_hr(); print &ui_subheading($text{'index_users'}); print &ui_buttons_start(); if ($config{'conf_find_user'}) { print &ui_buttons_row( "search_user.cgi", $text{'index_finduser'}, undef, undef, &ui_select("field", "user", [ [ "user", $text{'user'} ], [ "real", $text{'real'} ], [ "shell", $text{'shell'} ], [ "home", $text{'home'} ], [ "uid", $text{'uid'} ] ])." ". &ui_select("match", 0, [ [ 0, $text{'index_equals'} ], [ 4, $text{'index_contains'} ], [ 1, $text{'index_matches'} ], [ 5, $text{'index_ncontains'} ], [ 3, $text{'index_nmatches'} ] ])." ". &ui_textbox("what", undef, 15)); } if ($config{'conf_find_group'}) { print &ui_buttons_row( "search_group.cgi", $text{'index_findgroup'}, undef, undef, &ui_select("field", "group", [ [ "group", $text{'gedit_group'} ], [ "members", $text{'gedit_members'} ], [ "gid", $text{'gid'} ] ])." ". &ui_select("match", 0, [ [ 0, $text{'index_equals'} ], [ 4, $text{'index_contains'} ], [ 1, $text{'index_matches'} ], [ 5, $text{'index_ncontains'} ], [ 3, $text{'index_nmatches'} ] ])." ". &ui_textbox("what", undef, 15)); } print &ui_buttons_hr(); if ($config{'conf_add_user'}) { print &ui_buttons_row("user_form.cgi", $text{'index_newuser'}, undef, [ [ "new", 1 ] ]); } if ($config{'conf_add_group'}) { print &ui_buttons_row("group_form.cgi", $text{'index_newgroup'}, undef, [ [ "new", 1 ] ]); } print &ui_buttons_hr(); if ($config{'conf_allow_refresh'}) { print &ui_buttons_row("refresh.cgi", $text{'index_refresh'}, undef, undef, &create_on_input(1)); } if ($config{'conf_allow_sync'}) { print &ui_buttons_row("sync_form.cgi", $text{'index_sync'}); } print &ui_buttons_end(); } &ui_print_footer("/", $text{'index'});
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
help | Folder | 0755 |
|
|
images | Folder | 0755 |
|
|
lang | Folder | 0755 |
|
|
CHANGELOG | File | 273 B | 0644 |
|
add.cgi | File | 2.09 KB | 0755 |
|
cluster-useradmin-lib.pl | File | 5.51 KB | 0755 |
|
config | File | 150 B | 0644 |
|
config.info | File | 566 B | 0644 |
|
config.info.ca | File | 655 B | 0644 |
|
config.info.cs | File | 79 B | 0644 |
|
config.info.de | File | 657 B | 0644 |
|
config.info.es | File | 78 B | 0644 |
|
config.info.fr | File | 758 B | 0644 |
|
config.info.hr | File | 0 B | 0644 |
|
config.info.hu | File | 0 B | 0644 |
|
config.info.ms | File | 131 B | 0644 |
|
config.info.nl | File | 129 B | 0644 |
|
config.info.no | File | 137 B | 0644 |
|
config.info.pl | File | 121 B | 0644 |
|
create_group.cgi | File | 3.32 KB | 0755 |
|
create_user.cgi | File | 9.72 KB | 0755 |
|
delete_group.cgi | File | 3.61 KB | 0755 |
|
delete_host.cgi | File | 257 B | 0755 |
|
delete_user.cgi | File | 5.22 KB | 0755 |
|
edit_group.cgi | File | 5.39 KB | 0755 |
|
edit_host.cgi | File | 1.96 KB | 0755 |
|
edit_user.cgi | File | 17.68 KB | 0755 |
|
group_form.cgi | File | 2.29 KB | 0755 |
|
index.cgi | File | 4.98 KB | 0755 |
|
log_parser.pl | File | 542 B | 0755 |
|
module.info | File | 387 B | 0644 |
|
module.info.af | File | 0 B | 0644 |
|
module.info.af.auto | File | 259 B | 0644 |
|
module.info.ar | File | 0 B | 0644 |
|
module.info.ar.auto | File | 392 B | 0644 |
|
module.info.be | File | 0 B | 0644 |
|
module.info.be.auto | File | 489 B | 0644 |
|
module.info.bg | File | 0 B | 0644 |
|
module.info.bg.auto | File | 487 B | 0644 |
|
module.info.ca | File | 265 B | 0644 |
|
module.info.ca.auto | File | 29 B | 0644 |
|
module.info.cs | File | 40 B | 0644 |
|
module.info.cs.auto | File | 247 B | 0644 |
|
module.info.da | File | 0 B | 0644 |
|
module.info.da.auto | File | 249 B | 0644 |
|
module.info.de | File | 147 B | 0644 |
|
module.info.de.auto | File | 24 B | 0644 |
|
module.info.el | File | 0 B | 0644 |
|
module.info.el.auto | File | 521 B | 0644 |
|
module.info.es | File | 36 B | 0644 |
|
module.info.es.auto | File | 228 B | 0644 |
|
module.info.eu | File | 0 B | 0644 |
|
module.info.eu.auto | File | 275 B | 0644 |
|
module.info.fa | File | 0 B | 0644 |
|
module.info.fa.auto | File | 406 B | 0644 |
|
module.info.fi | File | 0 B | 0644 |
|
module.info.fi.auto | File | 291 B | 0644 |
|
module.info.fr | File | 44 B | 0644 |
|
module.info.fr.auto | File | 260 B | 0644 |
|
module.info.he | File | 0 B | 0644 |
|
module.info.he.auto | File | 316 B | 0644 |
|
module.info.hr | File | 0 B | 0644 |
|
module.info.hr.auto | File | 261 B | 0644 |
|
module.info.hu | File | 31 B | 0644 |
|
module.info.hu.auto | File | 285 B | 0644 |
|
module.info.it | File | 0 B | 0644 |
|
module.info.it.auto | File | 253 B | 0644 |
|
module.info.ja | File | 0 B | 0644 |
|
module.info.ja.auto | File | 361 B | 0644 |
|
module.info.ko | File | 0 B | 0644 |
|
module.info.ko.auto | File | 310 B | 0644 |
|
module.info.lt | File | 0 B | 0644 |
|
module.info.lt.auto | File | 298 B | 0644 |
|
module.info.lv | File | 0 B | 0644 |
|
module.info.lv.auto | File | 274 B | 0644 |
|
module.info.ms | File | 247 B | 0644 |
|
module.info.ms.auto | File | 25 B | 0644 |
|
module.info.mt | File | 0 B | 0644 |
|
module.info.mt.auto | File | 282 B | 0644 |
|
module.info.nl | File | 40 B | 0644 |
|
module.info.nl.auto | File | 242 B | 0644 |
|
module.info.no | File | 36 B | 0644 |
|
module.info.no.auto | File | 225 B | 0644 |
|
module.info.pl | File | 240 B | 0644 |
|
module.info.pl.auto | File | 29 B | 0644 |
|
module.info.pt | File | 0 B | 0644 |
|
module.info.pt.auto | File | 282 B | 0644 |
|
module.info.pt_BR | File | 0 B | 0644 |
|
module.info.pt_BR.auto | File | 291 B | 0644 |
|
module.info.ro | File | 0 B | 0644 |
|
module.info.ro.auto | File | 301 B | 0644 |
|
module.info.ru | File | 0 B | 0644 |
|
module.info.ru.auto | File | 477 B | 0644 |
|
module.info.sk | File | 0 B | 0644 |
|
module.info.sk.auto | File | 305 B | 0644 |
|
module.info.sl | File | 0 B | 0644 |
|
module.info.sl.auto | File | 266 B | 0644 |
|
module.info.sv | File | 0 B | 0644 |
|
module.info.sv.auto | File | 265 B | 0644 |
|
module.info.th | File | 0 B | 0644 |
|
module.info.th.auto | File | 597 B | 0644 |
|
module.info.tr | File | 0 B | 0644 |
|
module.info.tr.auto | File | 291 B | 0644 |
|
module.info.uk | File | 0 B | 0644 |
|
module.info.uk.auto | File | 456 B | 0644 |
|
module.info.ur | File | 0 B | 0644 |
|
module.info.ur.auto | File | 468 B | 0644 |
|
module.info.vi | File | 0 B | 0644 |
|
module.info.vi.auto | File | 287 B | 0644 |
|
module.info.zh | File | 0 B | 0644 |
|
module.info.zh.auto | File | 244 B | 0644 |
|
module.info.zh_TW | File | 0 B | 0644 |
|
module.info.zh_TW.auto | File | 253 B | 0644 |
|
prefs.info | File | 28 B | 0644 |
|
refresh.cgi | File | 2.31 KB | 0755 |
|
save_group.cgi | File | 4.65 KB | 0755 |
|
save_user.cgi | File | 12.76 KB | 0755 |
|
search_group.cgi | File | 1.69 KB | 0755 |
|
search_user.cgi | File | 1.73 KB | 0755 |
|
sync.cgi | File | 4.92 KB | 0755 |
|
sync_form.cgi | File | 1.75 KB | 0755 |
|
user_form.cgi | File | 5.66 KB | 0755 |
|