From 09b90be1ca1208a2fcfdc37aef9293510b739ddc Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Thu, 25 May 2017 10:08:30 +0200 Subject: [PATCH] Works in good dashboards module graphs --- pandora_console/include/graphs/fgraph.php | 2 +- .../include/graphs/flot/pandora.flot.js | 2 +- .../include/graphs/functions_flot.php | 23 ++++++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/pandora_console/include/graphs/fgraph.php b/pandora_console/include/graphs/fgraph.php index 6787e8b31c..ea11435d8b 100644 --- a/pandora_console/include/graphs/fgraph.php +++ b/pandora_console/include/graphs/fgraph.php @@ -249,7 +249,7 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color, return ''; } - if ($dashboard || $vconsole) $menu = false; + if ($vconsole) $menu = false; if ($flash_chart) { return flot_area_simple_graph( diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index d4f21f65b3..5595b93f5b 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1476,7 +1476,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, // Adjust linked graph to the width and position of the main plot // Miniplot - if ( !dashboard && !vconsole) { + if (!vconsole) { var overview = $.plot($('#overview_'+graph_id),datas, { series: { stack: stacked, diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index fe8ceea41d..22a6de27b0 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -270,7 +270,28 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $return .= ""; $return .= ""; } + + if ($dashboard) { + $return .= ""; + } } + $return .= html_print_input_hidden('line_width_graph', $config['custom_graph_width'], true); $return .= ""; $return .= ""; if ($water_mark != '') {