From 64ac1f99f5cfc6a30d5c00e82a73db031dcf5b0e Mon Sep 17 00:00:00 2001 From: hugetoad Date: Sun, 10 Nov 2002 09:16:25 +0000 Subject: Misc changes to PHP frontend. git-svn-id: svn://svn.zabbix.com/trunk@565 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/items.php | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'frontends/php/items.php') diff --git a/frontends/php/items.php b/frontends/php/items.php index 1d9a9abc..2a33ac1d 100644 --- a/frontends/php/items.php +++ b/frontends/php/items.php @@ -76,7 +76,7 @@ $lasthost=""; if(isset($HTTP_GET_VARS["hostid"])&&!isset($HTTP_GET_VARS["itemid"])) { - $result=DBselect("select h.host,i.key_,i.itemid,i.description,h.port,i.delay,i.history,i.lastvalue,i.lastclock,i.status,i.lastdelete,i.nextcheck,h.hostid from hosts h,items i where h.hostid=i.hostid and h.hostid=".$HTTP_GET_VARS["hostid"]." order by h.host,i.key_,i.description"); + $result=DBselect("select h.host,i.key_,i.itemid,i.description,h.port,i.delay,i.history,i.lastvalue,i.lastclock,i.status,i.lastdelete,i.nextcheck,h.hostid,i.type from hosts h,items i where h.hostid=i.hostid and h.hostid=".$HTTP_GET_VARS["hostid"]." order by h.host,i.key_,i.description"); $col=0; while($row=DBfetch($result)) { @@ -101,6 +101,7 @@ echo "Delay"; echo "History"; echo "Shortname"; + echo "Type"; echo "Status"; echo "Actions"; echo ""; @@ -117,6 +118,25 @@ echo "".$row["history"].""; echo "".$row["host"].":".$row["key_"].""; + echo ""; + switch($row["type"]) + { + case 0: + echo "Zabbix agent"; + break; + case 1: + echo "SNMPv1 agent"; + break; + case 2: + echo "Zabbix trapper"; + break; + default: + echo "Unknown"; + break; + } + echo ""; + + echo ""; if(isset($HTTP_GET_VARS["hostid"])) { @@ -128,9 +148,9 @@ case 1: echo "Not active"; break; - case 2: - echo "Trapper"; - break; +# case 2: +# echo "Trapper"; +# break; case 3: echo "Not supported"; break; -- cgit