From: Stephen L Johnson Date: Wed, 9 Feb 2000 20:13:02 +0000 (+0000) Subject: added type "full" display routines to display_html() (hosts by group) X-Git-Tag: spong-2_7-alpha5~87 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09bdea5cbd9e8081446b040666e06b33e7e4352a;p=spong.git added type "full" display routines to display_html() (hosts by group) --- diff --git a/src/lib/Spong/HostGroups.pm b/src/lib/Spong/HostGroups.pm index 9886dd3..99c235e 100755 --- a/src/lib/Spong/HostGroups.pm +++ b/src/lib/Spong/HostGroups.pm @@ -255,6 +255,24 @@ sub display_html { } elsif( $format eq "full" ) { + # Compute the total list of services running on the various hosts, and + # sort them alphabetically (except always put ping first). + + if( grep( /^ping$/, keys %main::SERVICES ) ) { push( @names, "ping" ); } + foreach $service ( sort keys %main::SERVICES ) { + push( @names, $service ) unless $service eq "ping"; } + + # Run though reach group and print the hosts for each group + foreach $group ( $self->groups() ) { + my $name = $group->name(); + my $grname = $main::GROUPS{$name}->{'name'}; + + # Display the host group table + print "Group - $grname\n"; + $group->display_html("standard"); + + print "\n
\n"; + } } }