diff --git a/html/ops/db_ops.inc b/html/ops/db_ops.inc index 7bba4a97ed..5e86bddcac 100644 --- a/html/ops/db_ops.inc +++ b/html/ops/db_ops.inc @@ -295,6 +295,15 @@ function client_version_string($client_version_num) { } } +function outcome_color($outcome) { + switch($s) { + switch($s) { + case 1: return 'darkgreen'; // "Success" + case 3: return 'darkred'; // "Client error" + } + return 'white'; +} + function show_result($result, $hide_xml_docs, $hide_stderr, $hide_times) { start_table(); if (!$hide_times) { @@ -349,12 +358,7 @@ function show_result_short($result) { $oc = result_outcome_string($result->outcome); $received = time_str($result->received_time); $version = client_version_string($result->client_version_num); - - if ($result->outcome == 3) { - $outcome_color = 'red'; - } else { - $outcome_color = 'white'; - } + $outcome_color = outcome_color($result->outcome); echo " diff --git a/html/ops/result_summary.php b/html/ops/result_summary.php index 180a6de3d4..dfa9d5cd44 100644 --- a/html/ops/result_summary.php +++ b/html/ops/result_summary.php @@ -1,4 +1,4 @@ -"; - start_table(); echo "Outcome of 'Over' results# results\n"; for ($ro=0; $ro<6; $ro++) { if ($outcome[$ro] == 0) { @@ -58,11 +57,12 @@ } else { $x = "".$outcome[$ro].""; } - row2(result_outcome_string($ro), $x); + $h = result_outcome_string($ro); + $color = outcome_color($ro); + echo "$h$x\n"; } - end_table(); + echo ""; - start_table(); echo "Client state of 'Client error' results# results\n"; for ($cs=1; $cs<6; $cs++) { if ($client_state[$cs] == 0) {