--- loncom/cgi/clusterstatus.pl 2003/09/14 18:24:34 1.22
+++ loncom/cgi/clusterstatus.pl 2005/04/13 18:30:46 1.24
@@ -1,7 +1,7 @@
#!/usr/bin/perl
$|=1;
# Generates a html page showing various sataus reports about the cluster
-# $Id: clusterstatus.pl,v 1.22 2003/09/14 18:24:34 www Exp $
+# $Id: clusterstatus.pl,v 1.24 2005/04/13 18:30:46 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -247,6 +247,30 @@ sub takeonline {
print &otherwindow($local,'/cgi-bin/takeonline.pl','Take online');
}
+sub takeoffline {
+ my $local=shift;
+ print &otherwindow($local,'/cgi-bin/takeoffline.pl','Take offline');
+}
+
+sub reroute {
+ my ($local,$remote)=@_;
+ print &otherwindow($local,'/cgi-bin/takeoffline.pl?'.
+ $hostname{$remote}.'&'.$hostdom{$local}
+ ,$remote)."\n";
+}
+
+sub allreroutes {
+ my $local=shift;
+ &takeoffline($local);
+ print ' Reroute to: ';
+ foreach my $remote (sort keys %hostname) {
+ unless ($local eq $remote) {
+ &reroute($local,$remote);
+ }
+ }
+ print '';
+}
+
# ========================================================= Produce a green bar
sub bar {
my $parm=shift;
@@ -318,6 +342,8 @@ ENDHEADER
if ($host{$local.'_errors'}) {
print "
loncron errors: ".$host{$local.'_errors'};
}
+ print "