From 09bdea5cbd9e8081446b040666e06b33e7e4352a Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Wed, 9 Feb 2000 20:13:02 +0000 Subject: [PATCH] added type "full" display routines to display_html() (hosts by group) --- src/lib/Spong/HostGroups.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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"; + } } } -- 2.30.2