summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/config.inc.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-07-20 18:15:21 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2003-07-20 18:15:21 +0000
commitedb44e0293222987bcbaf6409c021c767c6faeec (patch)
treebaee5dd84d6b408971e24c1ba72e6ec6bb2411bb /frontends/php/include/config.inc.php
parent960f15d24df774d5853ad8e8cbcaf81f0c61d56d (diff)
downloadzabbix-edb44e0293222987bcbaf6409c021c767c6faeec.tar.gz
zabbix-edb44e0293222987bcbaf6409c021c767c6faeec.tar.xz
zabbix-edb44e0293222987bcbaf6409c021c767c6faeec.zip
- support for changing of graph items (Alexei)
- menu will not require more than three lines (Alexei) - fixed dividion by zero in chart2.php (Alexei) - period and start of interval are preserved in full-screen mode (Alexei) - added units in graph legends (Alexei) - table-like legend for user graphs (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@853 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
-rw-r--r--frontends/php/include/config.inc.php56
1 files changed, 39 insertions, 17 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index 3d52da01..27258313 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -573,6 +573,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
}
echo "<center>";
// echo "<font size=+1 color='$color'>";
+ echo "<font color='$color'>";
if($ERROR_MSG=="")
{
echo "<b>[$msg]</b>";
@@ -581,7 +582,7 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
{
echo "<b>[$msg. $ERROR_MSG]</b>";
}
-// echo "</font>";
+ echo "</font>";
echo "</center><br>";
}
@@ -901,11 +902,11 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
if( ($page["file"]=="latest.php") ||
($page["file"]=="history.php"))
{
- echo "<b>[LATEST VALUES]</b></a>";
+ echo "<b>[LATEST&nbsp;VALUES]</b></a>";
}
else
{
- echo "LATEST VALUES</a>";
+ echo "LATEST&nbsp;VALUES</a>";
}
?>
</td>
@@ -988,11 +989,11 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
<?php
if($page["file"]=="maps.php")
{
- echo "<b>[NETWORK MAPS]</b></a>";
+ echo "<b>[NETWORK&nbsp;MAPS]</b></a>";
}
else
{
- echo "NETWORK MAPS</a>";
+ echo "NETWORK&nbsp;MAPS</a>";
}
?>
</td>
@@ -1041,11 +1042,11 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
}
if($page["file"]=="srv_status.php")
{
- echo "<b>[IT SERVICES]</b></a>";
+ echo "<b>[IT&nbsp;SERVICES]</b></a>";
}
else
{
- echo "IT SERVICES</a>";
+ echo "IT&nbsp;SERVICES</a>";
}
?>
</td>
@@ -1093,11 +1094,11 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
<?php
if($page["file"]=="report1.php")
{
- echo "<b>[STATUS OF ZABBIX]</b></a>";
+ echo "<b>[STATUS&nbsp;OF&nbsp;ZABBIX]</b></a>";
}
else
{
- echo "STATUS OF ZABBIX</a>";
+ echo "STATUS&nbsp;OF&nbsp;ZABBIX</a>";
}
?>
</td>
@@ -1111,11 +1112,11 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
<?php
if($page["file"]=="report2.php")
{
- echo "<b>[AVAILABILITY REPORT]</b></a>";
+ echo "<b>[AVAILABILITY&nbsp;REPORT]</b></a>";
}
else
{
- echo "AVAILABILITY REPORT</a>";
+ echo "AVAILABILITY&nbsp;REPORT</a>";
}
?>
</td>
@@ -1231,11 +1232,11 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
if( ($page["file"]=="sysmaps.php")||
($page["file"]=="sysmap.php"))
{
- echo "<b>[NETWORK MAPS]</b></a>";
+ echo "<b>[NETWORK&nbsp;MAPS]</b></a>";
}
else
{
- echo "NETWORK MAPS</a>";
+ echo "NETWORK&nbsp;MAPS</a>";
}
?>
</td>
@@ -1282,11 +1283,11 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
}
if($page["file"]=="services.php")
{
- echo "<b>[IT SERVICES]</b></a>";
+ echo "<b>[IT&nbsp;SERVICES]</b></a>";
}
else
{
- echo "IT SERVICES</a>";
+ echo "IT&nbsp;SERVICES</a>";
}
?>
</td>
@@ -1805,13 +1806,19 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
function add_service_link($servicedownid,$serviceupid,$softlink)
{
-// global $ERROR_MSG;
+ global $ERROR_MSG;
if( ($softlink==0) && (is_service_hardlinked($servicedownid)==TRUE) )
{
return FALSE;
}
+ if($servicedownid==$serviceupid)
+ {
+ $ERROR_MSG="Cannot link service to itself.";
+ return FALSE;
+ }
+
$sql="insert into services_links (servicedownid,serviceupid,soft) values ($servicedownid,$serviceupid,$softlink)";
return DBexecute($sql);
}
@@ -2326,6 +2333,12 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
return DBexecute($sql);
}
+ function update_graph_item($gitemid,$itemid,$color,$drawtype)
+ {
+ $sql="update graphs_items set itemid=$itemid,color='$color',drawtype=$drawtype where gitemid=$gitemid";
+ return DBexecute($sql);
+ }
+
function add_item_to_graph($graphid,$itemid,$color,$drawtype)
{
$sql="insert into graphs_items (graphid,itemid,color,drawtype) values ($graphid,$itemid,'$color',$drawtype)";
@@ -4220,18 +4233,28 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
{
return $result;
}
+ $sql="delete from screens_graphs where screenid=$screenid";
+ $result=DBexecute($sql);
+ if(!$result)
+ {
+ return $result;
+ }
$sql="delete from screens where screenid=$screenid";
return DBexecute($sql);
}
function add_screen_item($screenid,$x,$y,$graphid,$width,$height)
{
+ $sql="delete from screens_items where screenid=$screenid and x=$x and y=$y";
+ DBexecute($sql);
$sql="insert into screens_items (screenid,x,y,graphid,width,height) values ($screenid,$x,$y,$graphid,$width,$height)";
return DBexecute($sql);
}
function add_screen_graph($screenid,$x,$y,$itemid,$width,$height)
{
+ $sql="delete from screens_graphs where screenid=$screenid and x=$x and y=$y";
+ DBexecute($sql);
$sql="insert into screens_graphs (screenid,x,y,itemid,width,height) values ($screenid,$x,$y,$itemid,$width,$height)";
return DBexecute($sql);
}
@@ -4248,7 +4271,6 @@ where h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=$triggerid";
return DBexecute($sql);
}
-
function get_drawtype_description($drawtype)
{
if($drawtype==0)