version 1.27, 2009/01/15 22:34:18
|
version 1.28, 2014/05/28 18:16:09
|
Line 165 sub connected {
|
Line 165 sub connected {
|
# |
# |
# Actually do the query |
# Actually do the query |
# |
# |
&statuslist($local,'connecting '.$remote); |
&statuslist($local,&mt('connecting [_1]',$remote),1); |
my $reply=&request($local,$url,3600); |
my $reply=&request($local,$url,3600); |
$reply=(split("\n",$reply))[0]; |
$reply=(split("\n",$reply))[0]; |
$reply=~s/\W//g; |
$reply=~s/\W//g; |
Line 297 sub serverstatus {
|
Line 297 sub serverstatus {
|
vers => 'Version:', |
vers => 'Version:', |
load => 'Load:', |
load => 'Load:', |
acti => 'Active Users:', |
acti => 'Active Users:', |
rpms => 'RPMs', |
rpms => 'RPMs:', |
mysq => 'MySQL Database:', |
mysq => 'MySQL Database:', |
notc => 'Not connected', |
notc => 'Not connected', |
lonc => 'loncron errors', |
lonc => 'loncron errors', |
Line 654 sub reports {
|
Line 654 sub reports {
|
|
|
# ====================================================================== Status |
# ====================================================================== Status |
sub statuslist { |
sub statuslist { |
my ($local,$what)=@_; |
my ($local,$what,$nomt)=@_; |
my $displaylocal; |
my $displaylocal; |
if (defined($local)) { |
if (defined($local)) { |
$displaylocal = " $local ($hostname{$local})"; |
$displaylocal = " $local ($hostname{$local})"; |
} |
} |
print '<script>document.prgstat.progress.value="'. |
my $output = &Apache::lonlocal::mt('Testing[_1]:',$displaylocal).' '; |
&Apache::lonlocal::mt("Testing[_1]: $what",$displaylocal).'";</script>'."\n"; |
if ($nomt) { |
|
$output .= $what; |
|
} else { |
|
$output .= &Apache::lonlocal::mt($what); |
|
} |
|
print '<script>document.prgstat.progress.value="'.$output.'";</script>'."\n"; |
} |
} |
|
|
# ============================================================================= |
# ============================================================================= |
Line 776 print &Apache::lonlocal::mt('Choose next
|
Line 781 print &Apache::lonlocal::mt('Choose next
|
if (!$FORM{'runonetime'}) { |
if (!$FORM{'runonetime'}) { |
my $lcscope = lc($scope); |
my $lcscope = lc($scope); |
print '<h3>'.&Apache::lonlocal::mt("Gathering initial $lcscope data").'</h3>'. |
print '<h3>'.&Apache::lonlocal::mt("Gathering initial $lcscope data").'</h3>'. |
&Apache::lonlocal::mt('This may take some time ..').'<br />'; |
&Apache::lonlocal::mt('This may take some time ...').'<br />'; |
$fromcache=0; |
$fromcache=0; |
&mainloop(); |
&mainloop(); |
&statuslist(undef,'Done initial run.'); |
&statuslist(undef,'Done initial run'); |
&reports(); |
&reports(); |
} else { |
} else { |
$fromcache=1; |
$fromcache=1; |
Line 792 print &Apache::lonlocal::mt('Choose next
|
Line 797 print &Apache::lonlocal::mt('Choose next
|
&hidden('runonetime',1); |
&hidden('runonetime',1); |
print '<tt><br />'.&Apache::lonlocal::mt('Total number of queries: [_1]',$stat_total); |
print '<tt><br />'.&Apache::lonlocal::mt('Total number of queries: [_1]',$stat_total); |
if ($stat_total != 0) { |
if ($stat_total != 0) { |
print '<br />'.&Apache::lonlocal::mt('Percent complete:').''. |
print '<br />'.&Apache::lonlocal::mt('Percent complete:').' '. |
int(($stat_total-$stat_notyet)/$stat_total*100.). |
int(($stat_total-$stat_notyet)/$stat_total*100.). |
'<br />'.&Apache::lonlocal::mt('Percent from cache:').' '. |
'<br />'.&Apache::lonlocal::mt('Percent from cache:').' '. |
int($stat_fromcache/$stat_total*100.).'</tt>'; |
int($stat_fromcache/$stat_total*100.).'</tt>'; |