*** empty log message ***

svn path=/trunk/boinc/; revision=1981
This commit is contained in:
David Anderson 2003-08-04 23:57:37 +00:00
parent da5cef1b14
commit e1341f31e1
2 changed files with 33 additions and 30 deletions

View File

@ -4,6 +4,14 @@
require_once("util_ops.inc"); require_once("util_ops.inc");
function link_results($n, $query) {
if ($n == 0) {
return "0";
} else {
return "<a href=db_action.php?table=result&$query&sort_by=received_time&detail=low>$n</a>";
}
}
db_init(); db_init();
page_head("Result summary"); page_head("Result summary");
@ -24,7 +32,7 @@
} }
$x = $nsecs/3600.; $x = $nsecs/3600.;
echo "Results that have finished in last $x hours\n"; echo "Results that have finished in last $x hours: $x\n";
$y = time() - $nsecs; $y = time() - $nsecs;
$result = mysql_query("select * from result where received_time > $y"); $result = mysql_query("select * from result where received_time > $y");
while ($res = mysql_fetch_object($result)) { while ($res = mysql_fetch_object($result)) {
@ -38,42 +46,34 @@
} }
mysql_free_result($result); mysql_free_result($result);
// start_table(); echo "<table width=100%><tr valign=top>";
echo "<table border=2 cellpadding=4 width=400\n"; echo "<td><table border=2 cellpadding=4\n";
echo "<h3>&nbsp;</h3>";
echo "<tr><th>Server state</th><th># results</th></tr>\n"; echo "<tr><th>Server state</th><th># results</th></tr>\n";
for ($ss=1; $ss<6; $ss++) { for ($ss=1; $ss<6; $ss++) {
if ($server_state[$ss] == 0) { row2(result_server_state_string($ss),
$x = "0"; link_results($server_state[$ss], "result_server_state=$ss"));
} else {
$x = "<a href=db_action.php?table=result&received_time=$y&result_server_state=$ss&sort_by=received_time&detail=low>".$server_state[$ss]."</a>";
} }
row2(result_server_state_string($ss), $x); echo "</table></td>";
}
echo "<tr></tr>";
echo "<tr><th>Outcome of 'Over' results</th><th># results</th></tr>\n"; echo "<td><table border=2 cellpadding=4\n";
echo "<h3>'Over' results:</h3>";
echo "<tr><th>Outcome</th><th># results</th></tr>\n";
for ($ro=0; $ro<6; $ro++) { for ($ro=0; $ro<6; $ro++) {
if ($outcome[$ro] == 0) { c_row2(outcome_color($ro), result_outcome_string($ro),
$x = "0"; link_results($outcome[$ro], "result_outcome=$ro"));
} else {
$x = "<a href=db_action.php?table=result&received_time=$y&result_outcome=$ro&sort_by=received_time&detail=low>".$outcome[$ro]."</a>";
} }
$h = result_outcome_string($ro); echo "</table></td>";
$color = outcome_color($ro);
echo "<tr bgcolor=$color><td align=right>$h</td><td>$x</td></tr>\n";
}
echo "<tr></tr>";
echo "<tr><th>Client state of 'Client error' results</th><th># results</th></tr>\n"; echo "<td><table border=2 cellpadding=4\n";
echo "<h3>'Client error' results:</h3>";
echo "<tr><th>Client state</th><th># results</th></tr>\n";
for ($cs=1; $cs<6; $cs++) { for ($cs=1; $cs<6; $cs++) {
if ($client_state[$cs] == 0) { row2(result_client_state_string($cs),
$x = "0"; link_results($client_state[$cs], "result_client_state=$cs"));
} else {
$x = "<a href=db_action.php?table=result&received_time=$y&result_client_state=$cs&sort_by=received_time&detail=low>".$client_state[$cs]."</a>";
} }
row2(result_client_state_string($cs), $x); print "</td></table>";
} print "</table>";
end_table();
page_tail(); page_tail();
} ?> } ?>

View File

@ -98,6 +98,9 @@ function row($x, $y) {
function row2($x, $y) { function row2($x, $y) {
echo "<tr><td align=right>$x</td><td>$y</td></tr>\n"; echo "<tr><td align=right>$x</td><td>$y</td></tr>\n";
} }
function c_row2($color, $x, $y) {
echo "<tr bgcolor=$color><td align=right>$x</td><td>$y</td></tr>\n";
}
function row3($x, $y, $z) { function row3($x, $y, $z) {
echo "<tr><td width=30% valign=top align=right>$x</td><td>$y</td><td>$z</td></tr>\n"; echo "<tr><td width=30% valign=top align=right>$x</td><td>$y</td><td>$z</td></tr>\n";