Show hostname in mouseover of icon

This commit is contained in:
Jamie Cameron
2009-02-04 05:29:28 +00:00
parent 46e05aa110
commit cb0e044c85
2 changed files with 11 additions and 3 deletions

View File

@@ -58,3 +58,5 @@ Allow saving of remote Webmin monitors when the remote host is down.
Added a new monitor type for checking the expiry and validity of SSL certificates in a local file or on any SSL website.
---- Changes since 1.440 ----
Added an option to the FTP status monitor to make a TLS encrypted connection. Requires the Net::FTPSSL Perl module though.
---- Changes since 1.450 ----
Added a tooltip to status icons to show the hostname.

View File

@@ -129,26 +129,32 @@ foreach $s (@_) {
# Showing the current status
@stats = &service_status($s, 1);
@ups = map { $_->{'up'} } @stats;
@remotes = map { $_->{'remote'} } @stats;
}
elsif ($oldstatus) {
# Getting status from last check
$stat = &expand_oldstatus($oldstatus{$s->{'id'}});
@remotes = &expand_remotes($s);
@ups = map { defined($stat->{$_}) ? ( $stat->{$_} ) : ( ) }
&expand_remotes($s);
@remotes;
}
if (!@ups) {
push(@cols, "");
}
else {
local @icons;
foreach my $up (@ups) {
for(my $i=0; $i<@ups; $i++) {
$up = $ups[$i];
$h = $remotes[$i];
$h = $text{'index_local'} if ($h eq '*');
push(@icons, "<img src=images/".
($up == 1 ? "up.gif" :
$up == -1 ? "not.gif" :
$up == -2 ? "webmin.gif" :
$up == -3 ? "timed.gif" :
$up == -4 ? "skip.gif" :
"down.gif").">");
"down.gif").
" title='".&html_escape($h)."'>");
}
push(@cols, join("", @icons));
}