--- loncom/auth/lonlogin.pm 2005/04/28 01:25:08 1.55.2.2 +++ loncom/auth/lonlogin.pm 2004/11/11 22:18:23 1.60 @@ -1,7 +1,7 @@ # The LearningOnline Network # Login Screen # -# $Id: lonlogin.pm,v 1.55.2.2 2005/04/28 01:25:08 albertel Exp $ +# $Id: lonlogin.pm,v 1.60 2004/11/11 22:18:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -68,7 +68,6 @@ sub handler {
Please either continue the current session or
@@ -109,10 +108,6 @@ ENDFAILED
my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':'.$port_to_use.
$r->dir_config('lonIconsURL');
my $domain = $r->dir_config('lonDefDomain');
- my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0];
- foreach my $posdom (values(%Apache::lonnet::hostdom)) {
- if (lc($posdom) eq lc($testdomain)) { $domain=$testdomain; }
- }
if (($ENV{'form.domain'}) &&
($Apache::lonnet::domaindescription{$ENV{'form.domain'}})) {
$domain=$ENV{'form.domain'};
@@ -139,7 +134,7 @@ ENDFAILED
$loadavg=<$loadfile>;
}
$loadavg =~ s/\s.*//g;
- my $loadpercent=100*$loadavg/$loadlim;
+ my $loadpercent=sprintf("%.1f",100*$loadavg/$loadlim);
my $userloadpercent=&Apache::lonnet::userload();
# ------------------------------------------------------- Do the load balancing
@@ -184,15 +179,22 @@ ENDFAILED
if ($logtoken eq 'con_lost') {
my $spares='';
- foreach (keys %Apache::lonnet::hostname) {
- if ($_ ne $lonhost) {
- $spares.='
'.
- $Apache::lonnet::hostname{$_}.'';
- if ($Apache::lonnet::spareid{$_}) {
- $spares.=' (preferred)';
- }
- }
+
+ foreach my $hostid (keys(%Apache::lonnet::spareid)) {
+ next if ($hostid eq $lonhost);
+ $spares.='
'.
+ $Apache::lonnet::hostname{$hostid}.''.
+ ' (preferred)'.$/;
+ }
+ $spares.= '
';
+ foreach my $hostid (keys(%Apache::lonnet::hostname)) {
+ next if ($hostid eq $lonhost || $Apache::lonnet::spareid{$hostid});
+ $spares.='
'.
+ $Apache::lonnet::hostname{$hostid}.'';
}
$r->print(<
-
- $lt{'sysadm'}:
- $sysadm
- $lt{'servadm'}:
- $servadm
- $version
-
+ $contactblock
@@ -533,8 +530,8 @@ $domainlogo
-
@@ -542,7 +539,31 @@ ENDDOCUMENT
}
$r->print('