diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-02 14:29:11 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-05-02 14:29:11 +0000 |
commit | 5f5f27c2d19ab6687d10aa04c88d5b835d024e48 (patch) | |
tree | 7b04e4d7bffcc5866c8d4f3d0276cfb09bda489a /frontends/php/include/graphs.inc.php | |
parent | 666e0dbf5f8cf58a42855dbd33ea9eb83328d211 (diff) | |
download | zabbix-5f5f27c2d19ab6687d10aa04c88d5b835d024e48.tar.gz zabbix-5f5f27c2d19ab6687d10aa04c88d5b835d024e48.tar.xz zabbix-5f5f27c2d19ab6687d10aa04c88d5b835d024e48.zip |
- added trigger displaying on graphs (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2792 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/graphs.inc.php')
-rw-r--r-- | frontends/php/include/graphs.inc.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php index f50fad40..17e02abe 100644 --- a/frontends/php/include/graphs.inc.php +++ b/frontends/php/include/graphs.inc.php @@ -94,7 +94,7 @@ # Add Graph - function add_graph($name,$width,$height,$yaxistype,$yaxismin,$yaxismax,$showworkperiod,$templateid=0) + function add_graph($name,$width,$height,$yaxistype,$yaxismin,$yaxismax,$showworkperiod,$showtriggers,$templateid=0) { if(!check_right("Graph","A",0)) { @@ -103,9 +103,9 @@ } $result=DBexecute("insert into graphs". - " (name,width,height,yaxistype,yaxismin,yaxismax,templateid,show_work_period)". + " (name,width,height,yaxistype,yaxismin,yaxismax,templateid,show_work_period,show_triggers)". " values (".zbx_dbstr($name).",$width,$height,$yaxistype,$yaxismin,". - " $yaxismax,$templateid,$showworkperiod)"); + " $yaxismax,$templateid,$showworkperiod,$showtriggers)"); $graphid = DBinsert_id($result,"graphs","graphid"); if($graphid) { @@ -116,7 +116,7 @@ # Update Graph - function update_graph($graphid,$name,$width,$height,$yaxistype,$yaxismin,$yaxismax,$showworkperiod,$templateid=0) + function update_graph($graphid,$name,$width,$height,$yaxistype,$yaxismin,$yaxismax,$showworkperiod,$showtriggers,$templateid=0) { if(!check_right("Graph","U",0)) { @@ -130,14 +130,14 @@ while($graph = DBfetch($graphs)) { $result = update_graph($graph["graphid"],$name,$width, - $height,$yaxistype,$yaxismin,$yaxismax,$showworkperiod,$graphid); + $height,$yaxistype,$yaxismin,$yaxismax,$showworkperiod,$showtriggers,$graphid); if(!$result) return $result; } $result = DBexecute("update graphs set name=".zbx_dbstr($name).",width=$width,height=$height,". "yaxistype=$yaxistype,yaxismin=$yaxismin,yaxismax=$yaxismax,templateid=$templateid,". - "show_work_period=$showworkperiod ". + "show_work_period=$showworkperiod,show_triggers=$showtriggers ". "where graphid=$graphid"); if($result) { @@ -216,7 +216,7 @@ { $new_graphid = add_graph($graph["name"],$graph["width"],$graph["height"], $graph["yaxistype"],$graph["yaxismin"],$graph["yaxismax"],$graph["show_work_period"], - $graph["graphid"]); + $graph["show_triggers"],$graph["graphid"]); if(!$new_graphid) { @@ -451,7 +451,8 @@ $db_graph = get_graph_by_graphid($graphid); $new_graphid = add_graph($db_graph["name"],$db_graph["width"],$db_graph["height"], $db_graph["yaxistype"],$db_graph["yaxismin"],$db_graph["yaxismax"],$graph["show_work_period"], - $graphid); + $graph["show_triggers"],$graphid); + if(!$new_graphid) return $new_graphid; |