diff --git a/html/ops/db.inc b/html/ops/db.inc index 32390ff700..4756765c2e 100644 --- a/html/ops/db.inc +++ b/html/ops/db.inc @@ -170,7 +170,7 @@ function show_workunit($wu,$show_xml_doc) { echo "
"; } -function res_state_string($s) { +function res_server_state_string($s) { switch($s) { case 1: return "Inactive"; case 2: return "Unsent"; @@ -182,6 +182,15 @@ function res_state_string($s) { return "unknown"; } +function result_client_state_str($s) { + switch($s) { + case 1: return "Downloading"; + case 2: return "Computing"; + case 3: return "Uploading"; + case 4: return "Done"; + } +} + function validate_state_str($s) { switch($s) { case 0: return "Initial"; @@ -201,10 +210,10 @@ function show_result($result,$show_xml_docs,$show_stderr,$show_times) { } row("Name", $result->name); row("Workunit", "workunitid>" . wu_name_by_id($result->workunitid) . "" ); - row("Server state", res_state_string($result->server_state)); + row("Server state", res_server_state_string($result->server_state)); row("Deadline", time_str($result->report_deadline)); row("Host ID", "hostid>" . host_name_by_id($result->hostid) . ""); - row("Client state", $result->client_state); + row("Client state", result_client_state_str($result->client_state)); row("CPU time", $result->cpu_time); if ($show_xml_docs) { row("XML doc in", "
".htmlspecialchars($result->xml_doc_in).""); diff --git a/html/ops/db.php b/html/ops/db.php index 09808b3157..be0d158506 100644 --- a/html/ops/db.php +++ b/html/ops/db.php @@ -66,7 +66,7 @@ if (strlen($result_state) && $result_state != 0) { $query = append_sql_query( $query, "server_state = $result_state", $first ); - $english_query = append_sql_query( $english_query, "server state is ".res_state_string($result_state), $first ); + $english_query = append_sql_query( $english_query, "server state is ".res_server_state_string($result_state), $first ); $rstate = $result_state; $first = 0; } else { @@ -172,7 +172,7 @@ . "