--- loncom/cgi/clusterstatus.pl 2009/01/15 22:34:18 1.27 +++ loncom/cgi/clusterstatus.pl 2014/05/28 18:16:09 1.28 @@ -1,7 +1,7 @@ #!/usr/bin/perl $|=1; # Generates a html page showing various status reports about the domain or cluster -# $Id: clusterstatus.pl,v 1.27 2009/01/15 22:34:18 raeburn Exp $ +# $Id: clusterstatus.pl,v 1.28 2014/05/28 18:16:09 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -165,7 +165,7 @@ sub connected { # # Actually do the query # - &statuslist($local,'connecting '.$remote); + &statuslist($local,&mt('connecting [_1]',$remote),1); my $reply=&request($local,$url,3600); $reply=(split("\n",$reply))[0]; $reply=~s/\W//g; @@ -297,7 +297,7 @@ sub serverstatus { vers => 'Version:', load => 'Load:', acti => 'Active Users:', - rpms => 'RPMs', + rpms => 'RPMs:', mysq => 'MySQL Database:', notc => 'Not connected', lonc => 'loncron errors', @@ -654,13 +654,18 @@ sub reports { # ====================================================================== Status sub statuslist { - my ($local,$what)=@_; + my ($local,$what,$nomt)=@_; my $displaylocal; if (defined($local)) { $displaylocal = " $local ($hostname{$local})"; } - print ''."\n"; + my $output = &Apache::lonlocal::mt('Testing[_1]:',$displaylocal).' '; + if ($nomt) { + $output .= $what; + } else { + $output .= &Apache::lonlocal::mt($what); + } + print ''."\n"; } # ============================================================================= @@ -776,10 +781,10 @@ print &Apache::lonlocal::mt('Choose next if (!$FORM{'runonetime'}) { my $lcscope = lc($scope); print '

'.&Apache::lonlocal::mt("Gathering initial $lcscope data").'

'. - &Apache::lonlocal::mt('This may take some time ..').'
'; + &Apache::lonlocal::mt('This may take some time ...').'
'; $fromcache=0; &mainloop(); - &statuslist(undef,'Done initial run.'); + &statuslist(undef,'Done initial run'); &reports(); } else { $fromcache=1; @@ -792,7 +797,7 @@ print &Apache::lonlocal::mt('Choose next &hidden('runonetime',1); print '
'.&Apache::lonlocal::mt('Total number of queries: [_1]',$stat_total); if ($stat_total != 0) { - print '
'.&Apache::lonlocal::mt('Percent complete:').''. + print '
'.&Apache::lonlocal::mt('Percent complete:').' '. int(($stat_total-$stat_notyet)/$stat_total*100.). '
'.&Apache::lonlocal::mt('Percent from cache:').' '. int($stat_fromcache/$stat_total*100.).'
';