summaryrefslogtreecommitdiffstats
path: root/frontends/php/popup.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-14 09:07:41 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-14 09:07:41 +0000
commit2d62dcd5944deea452509ee5a1067c34a0a4733d (patch)
tree3f7e75f86517a76cdaa8fac9249358e0fdcabf43 /frontends/php/popup.php
parentf17b81e2bd2714c137b1aeddecf46790f15da604 (diff)
downloadzabbix-2d62dcd5944deea452509ee5a1067c34a0a4733d.tar.gz
zabbix-2d62dcd5944deea452509ee5a1067c34a0a4733d.tar.xz
zabbix-2d62dcd5944deea452509ee5a1067c34a0a4733d.zip
- split hostname and DNS name (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3825 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/popup.php')
-rw-r--r--frontends/php/popup.php37
1 files changed, 28 insertions, 9 deletions
diff --git a/frontends/php/popup.php b/frontends/php/popup.php
index 07619314..729b2a2e 100644
--- a/frontends/php/popup.php
+++ b/frontends/php/popup.php
@@ -284,7 +284,7 @@ include_once "include/page_header.php";
if($srctbl == "hosts")
{
$table = new CTableInfo(S_NO_HOSTS_DEFINED);
- $table->SetHeader(array(S_HOST,S_IP,S_PORT,S_STATUS,S_AVAILABILITY));
+ $table->SetHeader(array(S_HOST,S_DNS,S_IP,S_PORT,S_STATUS,S_AVAILABILITY));
$sql = "select distinct h.* from hosts h";
if(isset($groupid))
@@ -319,17 +319,36 @@ include_once "include/page_header.php";
else
$status=S_UNKNOWN;
- if($host["available"] == HOST_AVAILABLE_TRUE)
- $available=new CSpan(S_AVAILABLE,"off");
- else if($host["available"] == HOST_AVAILABLE_FALSE)
- $available=new CSpan(S_NOT_AVAILABLE,"on");
- else if($host["available"] == HOST_AVAILABLE_UNKNOWN)
- $available=new CSpan(S_UNKNOWN,"unknown");
+ if($host["status"] == HOST_STATUS_TEMPLATE)
+ {
+ $dns = $ip = $port = $available = '-';
+ }
+ else
+ {
+ $dns = $host['dns'];
+ $ip = $host['ip'];
+
+ if($host["useip"]==1)
+ $ip = bold($ip);
+ else
+ $dns = bold($dns);
+
+ $port = $host["port"];
+
+ if($host["available"] == HOST_AVAILABLE_TRUE)
+ $available=new CSpan(S_AVAILABLE,"off");
+ else if($host["available"] == HOST_AVAILABLE_FALSE)
+ $available=new CSpan(S_NOT_AVAILABLE,"on");
+ else if($host["available"] == HOST_AVAILABLE_UNKNOWN)
+ $available=new CSpan(S_UNKNOWN,"unknown");
+
+ }
$table->AddRow(array(
$name,
- $host["useip"]==1 ? $host["ip"] : "-",
- $host["port"],
+ $dns,
+ $ip,
+ $port,
$status,
$available
));