mirror of
https://github.com/webmin/webmin.git
synced 2025-08-19 01:15:14 +00:00
Use consistent function for server name
This commit is contained in:
@ -109,7 +109,10 @@ elsif ($uconfig{'home_style'} == 3) {
|
||||
sub server_name
|
||||
{
|
||||
my ($server) = @_;
|
||||
return $server->{'desc'} || $server->{'host'};
|
||||
my @w;
|
||||
push(@w, $server->{'host'} || &get_system_hostname());
|
||||
push(@w, "(".$server->{'desc'}.")") if ($server->{'desc'});
|
||||
return join(" ", @w);
|
||||
}
|
||||
|
||||
# supports_gothers(&server)
|
||||
|
@ -24,8 +24,7 @@ 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, $s->{'desc'} ? $s->{'desc'}
|
||||
: "$s->{'host'}:$s->{'port'}");
|
||||
push(@titles, &server_name($s));
|
||||
push(@links, $link);
|
||||
push(@icons, &get_webprefix()."/servers/images/".
|
||||
$s->{'type'}.".gif");
|
||||
@ -151,6 +150,8 @@ if (@hosts) {
|
||||
&ui_textbox("what", undef, 15));
|
||||
}
|
||||
|
||||
print &ui_buttons_hr();
|
||||
|
||||
if ($config{'conf_add_user'}) {
|
||||
print &ui_buttons_row("user_form.cgi",
|
||||
$text{'index_newuser'},
|
||||
@ -165,6 +166,8 @@ if (@hosts) {
|
||||
[ [ "new", 1 ] ]);
|
||||
}
|
||||
|
||||
print &ui_buttons_hr();
|
||||
|
||||
if ($config{'conf_allow_refresh'}) {
|
||||
print &ui_buttons_row("refresh.cgi",
|
||||
$text{'index_refresh'}, undef, undef,
|
||||
|
@ -5,7 +5,7 @@ index_add=Add server
|
||||
index_gadd=Add servers in group
|
||||
index_users=Users and Groups
|
||||
index_return=servers list
|
||||
index_refresh=Refresh user and group lists
|
||||
index_refresh=Refresh user and group lists on
|
||||
index_finduser=Find users whose
|
||||
index_findgroup=Find groups whose
|
||||
index_newuser=Add User
|
||||
|
Reference in New Issue
Block a user