From cb0e044c855322110f8c074d11ae75652ff2124b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 4 Feb 2009 05:29:28 +0000 Subject: [PATCH] Show hostname in mouseover of icon --- status/CHANGELOG | 2 ++ status/index.cgi | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/status/CHANGELOG b/status/CHANGELOG index 4a4d145cd..8b43ba26d 100644 --- a/status/CHANGELOG +++ b/status/CHANGELOG @@ -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. diff --git a/status/index.cgi b/status/index.cgi index b9f3b7b7d..6d96b9234 100755 --- a/status/index.cgi +++ b/status/index.cgi @@ -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, ""); + "down.gif"). + " title='".&html_escape($h)."'>"); } push(@cols, join("", @icons)); }