From 7d5d535db34439f8f002ed3f7fc41c2e4b3f2eba Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 17 Dec 2009 16:16:55 +0000 Subject: [PATCH] 2009-12-17 Miguel de Dios * pandora_console/godmode/reporting/graph_builder.php: fix blank row when redraw graph in builder, and fix the empty column agent name in table of modules. Fixes: 2916194 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2213 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++ .../godmode/reporting/graph_builder.php | 30 +++++++++---------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 0c38aebe33..232613c5bf 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-12-17 Miguel de Dios + + * pandora_console/godmode/reporting/graph_builder.php: fix blank row when + redraw graph in builder, and fix the empty column agent name in table of + modules. + Fixes: 2916194 + 2009-12-17 Miguel de Dios * pandora_console/extensions/update_manager/load_updatemanager.php: add more diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php index 85db06d3dc..b9558bae8a 100644 --- a/pandora_console/godmode/reporting/graph_builder.php +++ b/pandora_console/godmode/reporting/graph_builder.php @@ -195,21 +195,22 @@ if (isset ($_GET["delete_module"] )) { if ($add_module) { if ($editGraph) { - $id = get_parameter('id'); $id_module = get_parameter('id_module'); - $factor = get_parameter('factor'); - process_sql_insert('tgraph_source', array('id_graph' => $id, 'id_agent_module' => $id_module, 'weight' => $factor)); - - $period = get_parameter('period'); - $width = get_parameter('width'); - $height = get_parameter('height'); - $events = get_parameter('events'); - $stacked = get_parameter('stacked'); - - process_sql_update('tgraph', array('period' => $period, - 'width' => $width, 'height' => $height, 'events' => $events, - 'stacked' => $stacked), array('id_graph' => $id)); + if ($id_module != -1) { + $factor = get_parameter('factor'); + process_sql_insert('tgraph_source', array('id_graph' => $id, 'id_agent_module' => $id_module, 'weight' => $factor)); + + $period = get_parameter('period'); + $width = get_parameter('width'); + $height = get_parameter('height'); + $events = get_parameter('events'); + $stacked = get_parameter('stacked'); + + process_sql_update('tgraph', array('period' => $period, + 'width' => $width, 'height' => $height, 'events' => $events, + 'stacked' => $stacked), array('id_graph' => $id)); + } } else { $id_agent = $_POST["id_agent"]; @@ -345,8 +346,7 @@ if (isset ($chunk1)) { $color = 1; } - echo ""; - echo get_agent_name ($agent_array[$a]).""; + echo "" . $agent_array[$a] . ""; echo ""; echo get_agentmodule_name ($module_array[$a]).""; echo "";