summaryrefslogtreecommitdiffstats
path: root/frontends/php/screenedit.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-12-23 15:08:03 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-12-23 15:08:03 +0000
commitec1886349223f7320e56ddf27be5f16a54f4ff7f (patch)
tree7ad40943bcb652dbc9b5e6b25339c7558b2a7e2c /frontends/php/screenedit.php
parent8d1090105ed319c35253d03bcf3ba6a4e18705e3 (diff)
downloadzabbix-ec1886349223f7320e56ddf27be5f16a54f4ff7f.tar.gz
zabbix-ec1886349223f7320e56ddf27be5f16a54f4ff7f.tar.xz
zabbix-ec1886349223f7320e56ddf27be5f16a54f4ff7f.zip
- support of plain text value for screens (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1557 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/screenedit.php')
-rw-r--r--frontends/php/screenedit.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/frontends/php/screenedit.php b/frontends/php/screenedit.php
index 75738bf3..ba7d399e 100644
--- a/frontends/php/screenedit.php
+++ b/frontends/php/screenedit.php
@@ -130,12 +130,32 @@
echo "<OPTION VALUE='0' ".iif($resource==0,"selected","").">".S_GRAPH;
echo "<OPTION VALUE='1' ".iif($resource==1,"selected","").">".S_SIMPLE_GRAPH;
echo "<OPTION VALUE='2' ".iif($resource==2,"selected","").">".S_MAP;
+ echo "<OPTION VALUE='3' ".iif($resource==3,"selected","").">".S_PLAIN_TEXT;
echo "</SELECT>";
+// Simple graph
if($resource == 1)
{
show_table2_v_delimiter();
- echo nbsp(S_GRAPH_NAME);
+ echo nbsp(S_PARAMETER);
+ show_table2_h_delimiter();
+ $result=DBselect("select h.host,i.description,i.itemid from hosts h,items i where h.hostid=i.hostid and h.status in (0,2) and i.status=0 order by h.host,i.description");
+ echo "<select name=\"resourceid\" size=1>";
+ echo "<OPTION VALUE='0'>(none)";
+ for($i=0;$i<DBnum_rows($result);$i++)
+ {
+ $host_=DBget_field($result,$i,0);
+ $description_=DBget_field($result,$i,1);
+ $itemid_=DBget_field($result,$i,2);
+ echo "<OPTION VALUE='$itemid_' ".iif($resourceid==$itemid_,"selected","").">$host_: $description_";
+ }
+ echo "</SELECT>";
+ }
+// Plain text
+ else if($resource == 3)
+ {
+ show_table2_v_delimiter();
+ echo nbsp(S_PARAMETER);
show_table2_h_delimiter();
$result=DBselect("select h.host,i.description,i.itemid from hosts h,items i where h.hostid=i.hostid and h.status in (0,2) and i.status=0 order by h.host,i.description");
echo "<select name=\"resourceid\" size=1>";
@@ -149,6 +169,7 @@
}
echo "</SELECT>";
}
+// User-defined graph
else if($resource == 0)
{
show_table2_v_delimiter();
@@ -165,6 +186,7 @@
}
echo "</SELECT>";
}
+// Map
else if($resource == 2)
{
show_table2_v_delimiter();
@@ -225,6 +247,10 @@
{
echo "<a href=screenedit.php?register=edit&screenid=$screenid&x=$c&y=$r><img src='map.php?noedit=1&sysmapid=$resourceid&width=$width&height=$height&period=3600' border=0></a>";
}
+ else if( ($screenitemid!=0) && ($resource==3) )
+ {
+ show_screen_plaintext($resourceid);
+ }
else
{
echo "<a href=screenedit.php?register=edit&screenid=$screenid&x=$c&y=$r>".S_EMPTY."</a>";