summaryrefslogtreecommitdiffstats
path: root/frontends/php/hosts.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-01-15 09:16:25 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-01-15 09:16:25 +0000
commit109e7d3d970622e6ea20f2c9e5522e8ae9348a74 (patch)
tree642a24b566592a26888182a768799ac5f393fe2d /frontends/php/hosts.php
parent15b84090305640db312b39c8be647669eb0b5265 (diff)
Minor changes.
git-svn-id: svn://svn.zabbix.com/trunk@1609 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/hosts.php')
-rw-r--r--frontends/php/hosts.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php
index a07b9dce..f5d2c6a9 100644
--- a/frontends/php/hosts.php
+++ b/frontends/php/hosts.php
@@ -399,15 +399,15 @@
<?php
table_begin();
- table_header(array(S_ID,S_HOST,S_IP,S_PORT,S_STATUS,S_ERROR,S_ACTIONS));
+ table_header(array(S_ID,S_HOST,S_IP,S_PORT,S_STATUS,S_AVAILABILITY,S_ERROR,S_ACTIONS));
if(isset($_GET["groupid"]))
{
- $sql="select h.hostid,h.host,h.port,h.status,h.useip,h.ip,h.error from hosts h,hosts_groups hg where hg.groupid=".$_GET["groupid"]." and hg.hostid=h.hostid order by h.host";
+ $sql="select h.hostid,h.host,h.port,h.status,h.useip,h.ip,h.error,h.available from hosts h,hosts_groups hg where hg.groupid=".$_GET["groupid"]." and hg.hostid=h.hostid order by h.host";
}
else
{
- $sql="select h.hostid,h.host,h.port,h.status,h.useip,h.ip,h.error from hosts h order by h.host";
+ $sql="select h.hostid,h.host,h.port,h.status,h.useip,h.ip,h.error,h.available from hosts h order by h.host";
}
$result=DBselect($sql);
@@ -458,6 +458,14 @@
else
$status=S_UNKNOWN;
}
+
+ if($row["available"] == HOST_AVAILABLE_TRUE)
+ $available=array("value"=>S_AVAILABLE,"class"=>"off");
+ else if($row["available"] == HOST_AVAILABLE_FALSE)
+ $available=array("value"=>S_NOT_AVAILABLE,"class"=>"on");
+ else if($row["available"] == HOST_AVAILABLE_UNKNOWN)
+ $available=array("value"=>S_UNKNOWN,"class"=>"unknown");
+
if($row["error"] == "")
{
$error=array("value"=>"&nbsp;","class"=>"off");
@@ -494,6 +502,7 @@
$ip,
$row["port"],
$status,
+ $available,
$error,
$actions
),$col++);