summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/graphs.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-31 14:28:45 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-05-31 14:28:45 +0000
commitbfb41b23166d700a588f192bd0ad6e819595adba (patch)
tree1c47a9bd2077047e9da96dfa5dfb3000a4d6c22c /frontends/php/include/graphs.inc.php
parent100ead984d87b8d482709fcea91e49d677dbb50b (diff)
- improved graphs, added selector of data calculation function (Eugene)
NOTE: don't finished historical graphs git-svn-id: svn://svn.zabbix.com/trunk@2933 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/graphs.inc.php')
-rw-r--r--frontends/php/include/graphs.inc.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php
index a5c7f3aa..b18000a7 100644
--- a/frontends/php/include/graphs.inc.php
+++ b/frontends/php/include/graphs.inc.php
@@ -201,11 +201,11 @@
return 0;
}
- function add_item_to_graph($graphid,$itemid,$color,$drawtype,$sortorder,$yaxisside)
+ function add_item_to_graph($graphid,$itemid,$color,$drawtype,$sortorder,$yaxisside,$calc_fnc,$show_history,$history_len)
{
$result = DBexecute("insert into graphs_items".
- " (graphid,itemid,color,drawtype,sortorder,yaxisside)".
- " values ($graphid,$itemid,".zbx_dbstr($color).",$drawtype,$sortorder,$yaxisside)");
+ " (graphid,itemid,color,drawtype,sortorder,yaxisside,calc_fnc,show_history,history_len)".
+ " values ($graphid,$itemid,".zbx_dbstr($color).",$drawtype,$sortorder,$yaxisside,$calc_fnc,$show_history,$history_len)");
$gitemid = DBinsert_id($result,"graphs_items","gitemid");
@@ -245,7 +245,7 @@
}
// recursion
$result = add_item_to_graph($new_graphid,$db_item["itemid"],
- $color,$drawtype,$sortorder,$yaxisside);
+ $color,$drawtype,$sortorder,$yaxisside,$calc_fnc,$show_history,$history_len);
if(!$result)
break;
@@ -270,7 +270,7 @@
}
// recursion
$result = add_item_to_graph($child["graphid"],$db_item["itemid"],
- $color,$drawtype,$sortorder,$yaxisside);
+ $color,$drawtype,$sortorder,$yaxisside,$calc_fnc,$show_history,$history_len);
if(!$result)
break;
}
@@ -290,7 +290,7 @@
return $gitemid;
}
- function update_graph_item($gitemid,$itemid,$color,$drawtype,$sortorder,$yaxisside)
+ function update_graph_item($gitemid,$itemid,$color,$drawtype,$sortorder,$yaxisside,$calc_fnc,$show_history,$history_len)
{
$gitem = get_graphitem_by_gitemid($gitemid);
@@ -316,14 +316,16 @@
// recursion
$result = update_graph_item($chd_gitem["gitemid"],$db_item["itemid"],
- $color,$drawtype,$sortorder,$yaxisside);
+ $color,$drawtype,$sortorder,$yaxisside,$calc_fnc,$show_history,$history_len);
if(!$result)
return $reslut;
break;
}
}
$result = DBexecute("update graphs_items set itemid=$itemid,color=".zbx_dbstr($color).",".
- "drawtype=$drawtype,sortorder=$sortorder,yaxisside=$yaxisside where gitemid=$gitemid");
+ "drawtype=$drawtype,sortorder=$sortorder,yaxisside=$yaxisside,calc_fnc=$calc_fnc".
+ ",show_history=".$show_history.",history_len=".$history_len.
+ " where gitemid=$gitemid");
if($result)
{
$host = get_host_by_itemid($item["itemid"]);
@@ -492,7 +494,8 @@
$result = add_item_to_graph($dist_graphid,$host_itemid,$src_graphitem["color"],
$src_graphitem["drawtype"],$src_graphitem["sortorder"],
- $src_graphitem["yaxisside"]);
+ $src_graphitem["yaxisside"],$src_graphitem["calc_fnc"],
+ $src_graphitem["show_history"],$src_graphitem["history_len"]);
if(!$result)
return $result;
break;