From e1341f31e14d4f09144b560267e7f4b921e14ee2 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 4 Aug 2003 23:57:37 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=1981 --- html/ops/result_summary.php | 60 ++++++++++++++++++------------------- html/ops/util_ops.inc | 3 ++ 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/html/ops/result_summary.php b/html/ops/result_summary.php index af4474ea42..ddb8812a3f 100644 --- a/html/ops/result_summary.php +++ b/html/ops/result_summary.php @@ -4,6 +4,14 @@ require_once("util_ops.inc"); + function link_results($n, $query) { + if ($n == 0) { + return "0"; + } else { + return "$n"; + } + } + db_init(); page_head("Result summary"); @@ -24,7 +32,7 @@ } $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; $result = mysql_query("select * from result where received_time > $y"); while ($res = mysql_fetch_object($result)) { @@ -38,42 +46,34 @@ } mysql_free_result($result); - // start_table(); - echo ""; + echo ""; + + echo ""; + + echo "
 "; echo "\n"; for ($ss=1; $ss<6; $ss++) { - if ($server_state[$ss] == 0) { - $x = "0"; - } else { - $x = "".$server_state[$ss].""; - } - row2(result_server_state_string($ss), $x); + row2(result_server_state_string($ss), + link_results($server_state[$ss], "result_server_state=$ss")); } - echo ""; - - echo "\n"; + echo "
Server state# results
Outcome of 'Over' results# results
'Over' results:"; + echo "\n"; for ($ro=0; $ro<6; $ro++) { - if ($outcome[$ro] == 0) { - $x = "0"; - } else { - $x = "".$outcome[$ro].""; - } - $h = result_outcome_string($ro); - $color = outcome_color($ro); - echo "\n"; + c_row2(outcome_color($ro), result_outcome_string($ro), + link_results($outcome[$ro], "result_outcome=$ro")); } - echo ""; - - echo "\n"; + echo "
Outcome# results
$h$x
Client state of 'Client error' results# results
'Client error' results:"; + echo "\n"; for ($cs=1; $cs<6; $cs++) { - if ($client_state[$cs] == 0) { - $x = "0"; - } else { - $x = "".$client_state[$cs].""; - } - row2(result_client_state_string($cs), $x); + row2(result_client_state_string($cs), + link_results($client_state[$cs], "result_client_state=$cs")); } - end_table(); + print "
Client state# results
"; + print "
"; page_tail(); } ?> diff --git a/html/ops/util_ops.inc b/html/ops/util_ops.inc index 33c7324fe9..67b5a919e0 100644 --- a/html/ops/util_ops.inc +++ b/html/ops/util_ops.inc @@ -98,6 +98,9 @@ function row($x, $y) { function row2($x, $y) { echo "$x$y\n"; } +function c_row2($color, $x, $y) { + echo "$x$y\n"; +} function row3($x, $y, $z) { echo "$x$y$z\n";