--- loncom/cgi/clusterstatus.pl 2003/08/05 18:33:08 1.16 +++ loncom/cgi/clusterstatus.pl 2003/08/29 17:42:32 1.20 @@ -3,7 +3,7 @@ $|=1; # The LearningOnline Network with CAPA # Cluster Status # -# $Id: clusterstatus.pl,v 1.16 2003/08/05 18:33:08 www Exp $ +# $Id: clusterstatus.pl,v 1.20 2003/08/29 17:42:32 www Exp $ use lib '/home/httpd/lib/perl/'; use LONCAPA::Configuration; @@ -26,6 +26,10 @@ my $fromcache; my %domaindescription = (); my %domain_auth_def = (); my %domain_auth_arg_def = (); +my %domain_lang_def=(); +my %domain_city=(); +my %domain_longi=(); +my %domain_lati=(); my %hostname=(); my %hostip=(); @@ -212,6 +216,11 @@ sub server { print &otherwindow($local,'/server-status','Server Status'); } +sub announcement { + my $local=shift; + print &otherwindow($local,'/announcement.txt','Announcement'); +} + # ========================================================= Produce a green bar sub bar { my $parm=shift; @@ -233,9 +242,11 @@ sub serverstatus { $local $hostdom{$local} ($hostname{$local}; $hostrole{$local})
$domaindescription{$hostdom{$local}} +$domain_city{$hostdom{$local}}
ENDHEADER &login($local);&server($local);&users($local);&versions($local); + &announcement($local); &loncron($local);&lond($local);&lonc($local);&runloncron($local); print ""; if ($trouble) { @@ -303,7 +314,7 @@ sub resetvars { $stat_total=0; $stat_notyet=0; $stat_fromcache=0; - + $concount=0; undef %host; %host=(); } @@ -431,12 +442,12 @@ sub reports { "". ""; foreach my $remote (sort keys %hostname) { - print ''; + print ''; } print "\n"; # connection matrix foreach my $local (sort keys %hostname) { - print ''; + print ''; foreach my $remote (sort keys %hostname) { if ($connectionstatus{$local.'_TO_'.$remote} eq 'not_yet') { my $cellcolor='#FFFFFF'; @@ -448,7 +459,7 @@ sub reports { print ''; } else { - my $cellcolor='#DDBBBB'; + my $cellcolor='#DDCCAA'; if ($connectionstatus{$local.'_TO_'.$remote} eq 'local_error') { if ($local eq $remote) { $cellcolor='#DD88AA'; @@ -456,7 +467,7 @@ sub reports { $cellcolor='#DDAACC'; } } else { - if ($local eq $remote) { $cellcolor='#DD9999'; } + if ($local eq $remote) { $cellcolor='#DDBB77'; } } print '
 '.$remote.''.$remote.'
'.$local.'
'.$local.'ok'. @@ -641,11 +652,15 @@ delete $perlvar{'lonSqlAccess'}; # remov while (<$fh>) { next if (/^(\#|\s*$)/); chomp; - my ($domain, $domain_description, $def_auth, $def_auth_arg) - = split(/:/,$_,4); - $domain_auth_def{$domain}=$def_auth; + my ($domain, $domain_description, $def_auth, $def_auth_arg, + $def_lang, $city, $longi, $lati) = split(/:/,$_); + $domain_auth_def{$domain}=$def_auth; $domain_auth_arg_def{$domain}=$def_auth_arg; - $domaindescription{$domain}=$domain_description; + $domaindescription{$domain}=$domain_description; + $domain_lang_def{$domain}=$def_lang; + $domain_city{$domain}=$city; + $domain_longi{$domain}=$longi; + $domain_lati{$domain}=$lati; } } }