diff --git a/html/ops/db_ops.inc b/html/ops/db_ops.inc index 88683086bc..274be07cad 100644 --- a/html/ops/db_ops.inc +++ b/html/ops/db_ops.inc @@ -353,7 +353,11 @@ function result_short_header() { function show_result_short($result) { $ss = result_server_state_string($result->server_state); - $cs = result_client_state_string($result->client_state); + if ($result->outcome == 3) { + $cs = result_client_state_string($result->client_state); + } else { + $cs = '---'; + } $oc = result_outcome_string($result->outcome); $received = time_str($result->received_time); $version = client_version_string($result->client_version_num); diff --git a/html/ops/result_summary.php b/html/ops/result_summary.php index 9525a46de4..b6ac41d0fb 100644 --- a/html/ops/result_summary.php +++ b/html/ops/result_summary.php @@ -5,11 +5,11 @@ require_once("util_ops.inc"); function link_results($n, $query) { + global $received_time; if ($n == 0) { return "0"; } else { - return "$n"; - // &sort_by=received_time + return "$n"; } } @@ -21,7 +21,7 @@ $client_state = array(); $nsecs = $_GET["nsecs"]; - + for ($ss=1; $ss<6; $ss++) { $server_state[$ss] = 0; } @@ -33,11 +33,13 @@ } $x = $nsecs/3600.; - echo "Results that have finished in last $x hours: $x\n"; - $y = time() - $nsecs; - $result = mysql_query("select * from result where received_time > $y"); + echo "Results that have finished in last $x hours:\n"; + $received_time = time() - $nsecs; + $result = mysql_query("select * from result where received_time > $received_time"); + $ntotal =0; // TODO: how to count $result? while ($res = mysql_fetch_object($result)) { $server_state[$res->server_state] += 1; + $ntotal += 1; if ($res->server_state == 5) { $outcome[$res->outcome] += 1; if ($res->outcome == 3) { @@ -47,11 +49,11 @@ } mysql_free_result($result); - echo "
All results | ";
- echo "'Over' results | ";
- echo "'Client error' results | ";
+ echo "$ntotal results | ";
+ echo "'Over' results | ";
+ echo "'Client error' results | ";
echo "