2004-06-09 19:15:57 +00:00
|
|
|
<?php
|
2005-02-08 04:38:31 +00:00
|
|
|
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
|
2004-05-23 23:52:59 +00:00
|
|
|
|
|
|
|
require_once("../inc/util_ops.inc");
|
|
|
|
|
|
|
|
db_init();
|
2005-02-08 04:38:31 +00:00
|
|
|
admin_page_head("Result Failure Summary by Host");
|
2004-05-23 23:52:59 +00:00
|
|
|
|
|
|
|
$query_appid = $_GET['appid'];
|
|
|
|
$query_received_time = time() - $_GET['nsecs'];
|
|
|
|
|
|
|
|
$main_query = "
|
|
|
|
SELECT
|
|
|
|
app_version_num AS App_Version,
|
|
|
|
hostid AS Host_ID,
|
|
|
|
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'
|
2005-02-08 04:38:31 +00:00
|
|
|
when INSTR(host.os_name, 'Solaris') then 'Solaris'
|
|
|
|
when INSTR(host.os_name, 'Mac') then 'Mac'
|
2004-05-23 23:52:59 +00:00
|
|
|
else 'Unknown'
|
|
|
|
end AS OS_Name,
|
|
|
|
case
|
|
|
|
when INSTR(host.os_name, 'Linux') then
|
|
|
|
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,
|
2004-05-28 22:11:42 +00:00
|
|
|
host.nresults_today AS Results_Today,
|
2004-05-24 00:02:37 +00:00
|
|
|
COUNT(*) AS error_count
|
2004-05-23 23:52:59 +00:00
|
|
|
FROM result
|
|
|
|
left join host on result.hostid = host.id
|
|
|
|
WHERE
|
|
|
|
appid = '$query_appid' and
|
|
|
|
server_state = '5' and
|
|
|
|
outcome = '3' and
|
|
|
|
received_time > '$query_received_time'
|
|
|
|
GROUP BY
|
|
|
|
app_version_num DESC,
|
|
|
|
hostid,
|
|
|
|
OS_Name,
|
2004-05-28 22:11:42 +00:00
|
|
|
OS_Version,
|
|
|
|
host.nresults_today
|
2004-05-23 23:52:59 +00:00
|
|
|
";
|
|
|
|
|
|
|
|
$result = mysql_query($main_query);
|
|
|
|
|
|
|
|
echo "<table>\n";
|
2004-05-28 22:11:42 +00:00
|
|
|
echo "<tr><th>App Version</th><th>Host ID</th><th>OS Name</th><th>OS Version</th><th>Results Today</th><th>Error Count</th></tr>\n";
|
2004-05-23 23:52:59 +00:00
|
|
|
|
|
|
|
while ($res = mysql_fetch_object($result)) {
|
|
|
|
|
|
|
|
echo "<tr>";
|
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
echo "<td align=\"left\" valign=\"top\">";
|
2004-05-23 23:52:59 +00:00
|
|
|
echo $res->App_Version;
|
|
|
|
echo "</td>";
|
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
echo "<td align=\"left\" valign=\"top\">";
|
2004-05-23 23:52:59 +00:00
|
|
|
echo $res->Host_ID;
|
|
|
|
echo "</td>";
|
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
echo "<td align=\"left\" valign=\"top\">";
|
2004-05-23 23:52:59 +00:00
|
|
|
echo $res->OS_Name;
|
|
|
|
echo "</td>";
|
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
echo "<td align=\"left\" valign=\"top\">";
|
2004-05-23 23:52:59 +00:00
|
|
|
echo $res->OS_Version;
|
|
|
|
echo "</td>";
|
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
echo "<td align=\"left\" valign=\"top\">";
|
2004-05-28 22:11:42 +00:00
|
|
|
echo $res->Results_Today;
|
|
|
|
echo "</td>";
|
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
echo "<td align=\"left\" valign=\"top\">";
|
2004-05-24 00:02:37 +00:00
|
|
|
echo $res->error_count;
|
2004-05-23 23:52:59 +00:00
|
|
|
echo "</td>";
|
|
|
|
|
|
|
|
echo "</tr>\n";
|
|
|
|
|
|
|
|
}
|
|
|
|
mysql_free_result($result);
|
|
|
|
|
|
|
|
echo "</table>\n";
|
|
|
|
|
2005-02-08 04:38:31 +00:00
|
|
|
admin_page_tail();
|
2004-05-23 23:52:59 +00:00
|
|
|
|
2004-06-09 19:15:57 +00:00
|
|
|
?>
|