summaryrefslogtreecommitdiffstats
path: root/frontends/php/graph.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-12 09:56:36 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-08-12 09:56:36 +0000
commit9a5e01ab230b05d2506131fcfeb85978651ef474 (patch)
tree7dd6e5a40bbbc2799ebc4f6a0ecd1acfaab04425 /frontends/php/graph.php
parentcba7572f9fd0fde78741f348be7ef0f1c87cfea1 (diff)
Support for graphs_items.sortorder.
git-svn-id: svn://svn.zabbix.com/trunk@904 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/graph.php')
-rw-r--r--frontends/php/graph.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/frontends/php/graph.php b/frontends/php/graph.php
index 96640c53..c712dde9 100644
--- a/frontends/php/graph.php
+++ b/frontends/php/graph.php
@@ -75,6 +75,7 @@
show_table_header("DISPLAYED PARAMETERS");
echo "<TABLE BORDER=0 COLS=4 WIDTH=100% BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
+ echo "<TD WIDTH=5% NOSAVE><B>Sort order</B></TD>";
echo "<TD WIDTH=10% NOSAVE><B>Host</B></TD>";
echo "<TD WIDTH=10% NOSAVE><B>Parameter</B></TD>";
echo "<TD WIDTH=10% NOSAVE><B>Type</B></TD>";
@@ -82,7 +83,7 @@
echo "<TD WIDTH=10% NOSAVE><B>Actions</B></TD>";
echo "</TR>";
- $sql="select i.itemid,h.host,i.description,gi.gitemid,gi.color,gi.drawtype from hosts h,graphs_items gi,items i where i.itemid=gi.itemid and gi.graphid=".$HTTP_GET_VARS["graphid"]." and h.hostid=i.hostid";
+ $sql="select i.itemid,h.host,i.description,gi.gitemid,gi.color,gi.drawtype,gi.sortorder from hosts h,graphs_items gi,items i where i.itemid=gi.itemid and gi.graphid=".$HTTP_GET_VARS["graphid"]." and h.hostid=i.hostid order by gi.sortorder";
$result=DBselect($sql);
$col=0;
while($row=DBfetch($result))
@@ -90,14 +91,14 @@
if($col++%2==0) { echo "<TR BGCOLOR=#EEEEEE>"; }
else { echo "<TR BGCOLOR=#DDDDDD>"; }
+ echo "<TD>".$row["sortorder"]."</TD>";
echo "<TD>".$row["host"]."</TD>";
echo "<TD><a href=\"chart.php?itemid=".$row["itemid"]."&period=3600&from=0\">".$row["description"]."</a></TD>";
echo "<TD>".get_drawtype_description($row["drawtype"])."</TD>";
echo "<TD>".$row["color"]."</TD>";
echo "<TD>";
echo "<A HREF=\"graph.php?graphid=".$HTTP_GET_VARS["graphid"]."&gitemid=".$row["gitemid"]."#form\">Change</A>";
- echo " - ";
- echo "<A HREF=\"graph.php?register=delete&graphid=".$HTTP_GET_VARS["graphid"]."&gitemid=".$row["gitemid"]."\">Delete</A>";
+ echo "</A>";
echo "</TD>";
echo "</TR>";
}
@@ -179,6 +180,7 @@
if(isset($itemid))
{
echo "<input type=\"submit\" name=\"register\" value=\"update\">";
+ echo "<input type=\"submit\" name=\"register\" value=\"delete\">";
}
show_table2_header_end();