2004-06-09 19:15:57 +00:00
|
|
|
<?php
|
2004-05-03 22:20:43 +00:00
|
|
|
|
2004-05-06 21:29:15 +00:00
|
|
|
$query_appid = $_GET['appid'];
|
|
|
|
$query_received_time = time() - $_GET['nsecs'];
|
|
|
|
|
|
|
|
$q = new SqlQueryString();
|
|
|
|
$q->process_form_items();
|
|
|
|
|
|
|
|
$main_query = "
|
|
|
|
SELECT
|
|
|
|
app_version_num AS App_Version,
|
|
|
|
case
|
|
|
|
when INSTR(host.os_name, 'Darwin') then 'Darwin'
|
|
|
|
when INSTR(host.os_name, 'Linux') then 'Linux'
|
|
|
|
when INSTR(host.os_name, 'Windows') then 'Windows'
|
|
|
|
when INSTR(host.os_name, 'SunOS') then 'SunOS'
|
|
|
|
else 'Unknown'
|
|
|
|
end AS OS_Name,
|
|
|
|
case
|
2004-11-09 07:54:31 +00:00
|
|
|
when INSTR(host.os_name, 'Linux') then
|
2004-05-06 21:29:15 +00:00
|
|
|
case
|
|
|
|
when INSTR(LEFT(host.os_version, 6), '-') then LEFT(host.os_version, (INSTR(LEFT(host.os_version, 6), '-') - 1))
|
|
|
|
else LEFT(host.os_version, 6)
|
|
|
|
end
|
|
|
|
else host.os_version
|
|
|
|
end AS OS_Version,
|
|
|
|
exit_status,
|
|
|
|
COUNT(*) AS error_count
|
|
|
|
FROM result
|
2004-11-09 07:54:31 +00:00
|
|
|
left join host on result.hostid = host.id
|
2004-05-06 21:29:15 +00:00
|
|
|
WHERE
|
|
|
|
appid = '$query_appid' and
|
|
|
|
server_state = '5' and
|
2004-11-09 07:54:31 +00:00
|
|
|
outcome = '3' and
|
2004-05-06 21:29:15 +00:00
|
|
|
received_time > '$query_received_time'
|
|
|
|
GROUP BY
|
|
|
|
app_version_num DESC,
|
|
|
|
OS_Name,
|
|
|
|
OS_Version,
|
|
|
|
exit_status
|
|
|
|
";
|
|
|
|
|
|
|
|
$urlquery = $q->urlquery;
|
|
|
|
$result = mysql_query($main_query);
|
|
|
|
|
|
|
|
echo "<table>\n";
|
|
|
|
echo "<tr><th>App Version</th><th>OS Name</th><th>OS Version</th><th>Exit Status</th><th>Error Count</th></tr>\n";
|
|
|
|
|
|
|
|
while ($res = mysql_fetch_object($result)) {
|
|
|
|
|
|
|
|
echo "<tr>";
|
2004-11-09 07:54:31 +00:00
|
|
|
|
2004-05-06 21:29:15 +00:00
|
|
|
echo "<td align=left valign=top>";
|
|
|
|
echo $res->App_Version;
|
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "<td align=left valign=top>";
|
|
|
|
echo $res->OS_Name;
|
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "<td align=left valign=top>";
|
|
|
|
echo $res->OS_Version;
|
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "<td align=left valign=top>";
|
|
|
|
$exit_status_condition = "exit_status=$res->exit_status";
|
2004-11-09 07:54:31 +00:00
|
|
|
echo link_results(exit_status_string($res), $urlquery, "$exit_status_condition", "");
|
2004-05-06 21:29:15 +00:00
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "<td align=left valign=top>";
|
|
|
|
echo $res->error_count;
|
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
}
|
|
|
|
mysql_free_result($result);
|
|
|
|
|
|
|
|
echo "</table>\n";
|
|
|
|
|
|
|
|
page_tail();
|
2004-05-03 22:20:43 +00:00
|
|
|
|
2004-06-09 19:15:57 +00:00
|
|
|
?>
|