--- loncom/auth/lonlogin.pm 2004/03/16 20:42:50 1.56
+++ 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.56 2004/03/16 20:42:50 albertel Exp $
+# $Id: lonlogin.pm,v 1.60 2004/11/11 22:18:23 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -134,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
@@ -179,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(<
@@ -256,8 +263,8 @@ my %lt=&Apache::lonlocal::texthash(
'help' => 'Help',
'serv' => 'Server',
'servadm' => 'Server Administration',
- 'sysadm' => 'System Administration');
-
+ 'sysadm' => 'System Administration',
+ 'helpdesk' => 'Contact Helpdesk');
# ---------------------------------------------------------- Serve rest of page
$r->print(<
ENDLOGIN
if ($fullgraph) {
+ my $contactblock = &contactdisplay(\%lt,$sysadm,$servadm,$version);
$r->print(<
@@ -492,13 +500,7 @@ ENDLOGIN
-
- $lt{'sysadm'}:
- $sysadm
- $lt{'servadm'}:
- $servadm
- $version
-
+ $contactblock
@@ -528,8 +530,8 @@ $domainlogo
-
@@ -537,7 +539,31 @@ ENDDOCUMENT
}
$r->print('