diff --git a/checkin_notes b/checkin_notes index 07a3b8d65e..c852ecc9ad 100755 --- a/checkin_notes +++ b/checkin_notes @@ -14041,3 +14041,11 @@ David 20 June 2004 sched/ assimilator.C db_dump.C + +David 21 June 2004 + - Web: when displaying results, try to show "---" (i.e. undefined) + where a field isn't determined yet. + Show "pending" instead of 0 for granted credit of unvalidated results + + html/inc/ + result.inc diff --git a/html/inc/result.inc b/html/inc/result.inc index 4274dd246b..c1c770f23e 100644 --- a/html/inc/result.inc +++ b/html/inc/result.inc @@ -1,25 +1,32 @@ server_state <> 5) return "---"; + switch($result->outcome) { + case 1: return $string_to_show; //Success + case 2: return "---"; //Couldn't send + case 3: return $string_to_show; //Client error + case 4: return "---"; //No reply + case 5: return "---"; //Didn't need + default: return $string_to_show; + } } -function result_granted_credit_string($outcome,$string_to_show) { - switch($outcome) { - case 1: return $string_to_show; //Success - case 2: return "---"; //Couldn't send - case 3: return "-!-"; //Client error - case 4: return "---"; //No reply - case 5: return "---"; //Didn't need - default: return $string_to_show; - } +function result_granted_credit_string($result, $string_to_show) { + if ($result->server_state <> 5) return "---"; + switch($result->outcome) { + case 1: //Success + if ($result->validate_state == 0) { + return "pending"; + } else { + return $string_to_show; + } + case 2: return "---"; //Couldn't send + case 3: return "-!-"; //Client error + case 4: return "---"; //No reply + case 5: return "---"; //Didn't need + default: return $string_to_show; + } } function result_server_state_string($s) { @@ -29,7 +36,7 @@ function result_server_state_string($s) { case 4: return "In Progress"; case 5: return "Over"; } - return "unknown"; + return "Unknown"; } function result_outcome_string($s) { @@ -40,7 +47,7 @@ function result_outcome_string($s) { case 4: return "No reply"; case 5: return "Didn't need"; } - return "unknown"; + return "Unknown"; } function result_client_state_string($s) { @@ -61,7 +68,7 @@ function validate_state_str($s) { case 2: return "Invalid"; case 3: return "Check skipped"; } - return "unknown"; + return "Unknown"; } function result_table_start($show_wu_link, $show_host_link, $show_result_link) { @@ -107,8 +114,8 @@ function show_result_row( $cl = result_client_state_string($result->client_state); $result_claimed_credit = format_credit($result->claimed_credit); $result_granted_credit = format_credit($result->granted_credit); - $result_claimed_credit = result_claimed_credit_string($result->outcome,$result_claimed_credit); - $result_granted_credit = result_granted_credit_string($result->outcome,$result_granted_credit); + $result_claimed_credit = result_claimed_credit_string($result, $result_claimed_credit); + $result_granted_credit = result_granted_credit_string($result, $result_granted_credit); echo "