From 2c4a3a8a59ab24b6add1fe908380fa66ca6bcb41 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Wed, 4 Nov 2015 17:42:45 +0100 Subject: [PATCH] Add new custom graphs and fixed others graphs. New graphs: Bullet Chart Vertical Bars and Horizontal Pie Gauges (cherry picked from commit c72f024610d08a5c23e004fed785cde9d3fb56cb) --- .../reporting/graph_builder.graph_editor.php | 15 + .../godmode/reporting/graph_builder.main.php | 36 +- .../godmode/reporting/graph_builder.php | 8 + pandora_console/include/constants.php | 5 + .../include/functions_custom_graphs.php | 9 +- pandora_console/include/functions_graph.php | 162 +++++++- .../include/functions_reporting.php | 3 +- pandora_console/include/graphs/bullet.js | 241 +++++++++++ pandora_console/include/graphs/fgraph.php | 77 +++- .../include/graphs/flot/pandora.flot.js | 380 +++++++++++++----- .../include/graphs/functions_d3.php | 133 ++++++ .../include/graphs/functions_flot.php | 140 ++++--- pandora_console/include/graphs/pandora.d3.js | 374 +++++++++++++++++ .../operation/reporting/graph_viewer.php | 21 +- 14 files changed, 1438 insertions(+), 166 deletions(-) create mode 100644 pandora_console/include/graphs/bullet.js diff --git a/pandora_console/godmode/reporting/graph_builder.graph_editor.php b/pandora_console/godmode/reporting/graph_builder.graph_editor.php index de687ffefc..cc1f8875b1 100644 --- a/pandora_console/godmode/reporting/graph_builder.graph_editor.php +++ b/pandora_console/godmode/reporting/graph_builder.graph_editor.php @@ -50,6 +50,7 @@ if ($editGraph) { $module_array = array(); $weight_array = array(); $agent_array = array(); + $label_array = array(); if($graphRows === false) { $graphRows = array(); @@ -59,6 +60,7 @@ if ($editGraph) { $idgs_array[] = $graphRow['id_gs']; $module_array[] = $graphRow['id_agent_module']; $weight_array[] = $graphRow['weight']; + $label_array[] = $graphRow['label']; $agent_array[] = $graphRow['agent_name']; } @@ -78,6 +80,7 @@ if (count($module_array) > 0) { echo " ".__('Agent')." ".__('Module')." + ".__('Label')." ".__('Weight')." ".__('Delete').""; $color = 0; @@ -95,6 +98,18 @@ if (count($module_array) > 0) { echo "" . $agent_array[$a] . ""; echo ""; echo modules_get_agentmodule_name ($module_array[$a]).""; + + echo ""; + echo ""; + + echo ""; + html_print_input_text ('label', $label_array[$a], '', 20, 10, false, false); + html_print_submit_button ('Ok', 'btn', false, '', false); + echo ""; + + echo "
"; + echo ""; + echo ""; echo ""; diff --git a/pandora_console/godmode/reporting/graph_builder.main.php b/pandora_console/godmode/reporting/graph_builder.main.php index e38725f9ff..cd6ada0fa1 100644 --- a/pandora_console/godmode/reporting/graph_builder.main.php +++ b/pandora_console/godmode/reporting/graph_builder.main.php @@ -113,13 +113,18 @@ echo "