diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-02 13:15:05 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-02 13:15:05 +0000 |
commit | ec55273c758e96dcf8219df76afb2daa0b2b3f61 (patch) | |
tree | a3de4d4035c244ab1f37feae6800a326af09d517 /frontends/php/include/graphs.inc.php | |
parent | d2a3e65806eb484b59de7c3d8b7a8612249e70ca (diff) | |
download | zabbix-ec55273c758e96dcf8219df76afb2daa0b2b3f61.tar.gz zabbix-ec55273c758e96dcf8219df76afb2daa0b2b3f61.tar.xz zabbix-ec55273c758e96dcf8219df76afb2daa0b2b3f61.zip |
- fixed remembering of previous charts viewed (Eugene)
- fixed color validation (Eugene)
- fixed template graphs editing (Eugene)
- fixed trigger overview status (Eugene)
[THANKS TO: 'ZP Gu' for detailed bug report]
git-svn-id: svn://svn.zabbix.com/trunk@3966 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/graphs.inc.php')
-rw-r--r-- | frontends/php/include/graphs.inc.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php index 76855f29..9497af5c 100644 --- a/frontends/php/include/graphs.inc.php +++ b/frontends/php/include/graphs.inc.php @@ -204,7 +204,8 @@ { if($g_graph['graphtype'] != $graphtype && $graphtype == GRAPH_TYPE_STACKED) { - $result = DBexecute("update graphs_items set calc_fnc=".CALC_FNC_AVG.",drawtype=1,type=".GRAPH_ITEM_SIMPLE); + $result = DBexecute('update graphs_items set calc_fnc='.CALC_FNC_AVG.',drawtype=1,type='.GRAPH_ITEM_SIMPLE. + ' where graphid='.$graphid); } info("Graph '".$g_graph["name"]."' updated"); @@ -217,10 +218,14 @@ $result = update_graph($graphid,$name,$width,$height,$yaxistype,$yaxismin,$yaxismax,$showworkperiod, $showtriggers,$graphtype,$templateid); - if($result) $result = DBexecute("delete from graphs_items where graphid=$graphid"); - if($result) { + $db_graphs_items = DBselect('select gitemid from graphs_items where graphid='.$graphid); + while($gitem_data = DBfetch($db_graphs_items)) + { + delete_graph_item($gitem_data['gitemid']); + } + foreach($items as $gitem) { if(!add_item_to_graph( |