From 393c9ed7f43d6d6471bfac4efaa072e1e9db0a9e Mon Sep 17 00:00:00 2001 From: osmiy Date: Mon, 30 Jan 2006 15:12:53 +0000 Subject: - Frontend improvements (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2577 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/graph.php | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) (limited to 'frontends/php/graph.php') diff --git a/frontends/php/graph.php b/frontends/php/graph.php index 2a31526b..8e4c5116 100644 --- a/frontends/php/graph.php +++ b/frontends/php/graph.php @@ -27,7 +27,7 @@ ?> "; + echo BR; ?> ".S_ACTIONS.""; echo ""; - $sql="select i.itemid,h.host,i.description,gi.gitemid,gi.color,gi.drawtype,gi.sortorder,i.key_ from hosts h,graphs_items gi,items i where i.itemid=gi.itemid and gi.graphid=".$_REQUEST["graphid"]." and h.hostid=i.hostid order by gi.sortorder"; + $sql="select i.itemid,h.host,i.description,gi.gitemid,gi.color,gi.drawtype,gi.sortorder,i.key_". + " from hosts h,graphs_items gi,items i where i.itemid=gi.itemid". + " and gi.graphid=".$_REQUEST["graphid"]." and h.hostid=i.hostid order by gi.sortorder"; $result=DBselect($sql); $col=0; while($row=DBfetch($result)) @@ -151,7 +167,8 @@ if(isset($_REQUEST["gitemid"])) { - $sql="select itemid,color,drawtype,sortorder,yaxisside from graphs_items where gitemid=".$_REQUEST["gitemid"]; + $sql="select itemid,color,drawtype,sortorder,yaxisside from graphs_items". + " where gitemid=".$_REQUEST["gitemid"]; $result=DBselect($sql); $row=DBfetch($result); $itemid=$row["itemid"]; @@ -179,7 +196,9 @@ echo S_PARAMETER; show_table2_h_delimiter(); - $result=DBselect("select h.host,i.description,i.itemid,i.key_ from hosts h,items i where h.hostid=i.hostid and h.status in(".HOST_STATUS_MONITORED.",".HOST_STATUS_TEMPLATE.") and i.status=".ITEM_STATUS_ACTIVE." order by h.host,i.description"); + $result=DBselect("select h.host,i.description,i.itemid,i.key_ from hosts h,items" + " where h.hostid=i.hostid and h.status in(".HOST_STATUS_MONITORED.",".HOST_STATUS_TEMPLATE.")". + " and i.status=".ITEM_STATUS_ACTIVE." order by h.host,i.description"); echo "