diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 81938d66c9..9c0a8d2a8c 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -6278,6 +6278,8 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', global $config; + $modules = array(); + require_once ($config["homedir"] . '/include/functions_graph.php'); if ($config['metaconsole']) { @@ -6293,6 +6295,19 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', if (empty($content['name'])) { if ($type_report == "custom_graph") { $content['name'] = __('Custom graph'); + $graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']); + $id_graph = $content['id_gs']; + } + else if($type_report == "automatic_graph"){ + $content['name'] = __('Automatic combined graph'); + $graphs[0]["stacked"] = ''; + $graphs[0]["summatory_series"] = ''; + $graphs[0]["average_series"] = ''; + $graphs[0]["modules_series"] = ''; + foreach ($content['id_agent_module'] as $key => $value) { + $modules[] = $value['module']; + } + $id_graph = 0; } else { $content['name'] = __('Simple graph'); @@ -6304,9 +6319,8 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', $return["description"] = $content["description"]; $return["date"] = reporting_get_date_text( $report, - $content); - - $graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']); + $content + ); $return['chart'] = ''; @@ -6329,13 +6343,12 @@ function reporting_custom_graph($report, $content, $type = 'dinamic', 'fullscale' => $graphs[0]["fullscale"], 'server_id' => $id_meta ); - $params_combined = array( 'stacked' => $graphs[0]["stacked"], 'summatory' => $graphs[0]["summatory_series"], 'average' => $graphs[0]["average_series"], 'modules_series' => $graphs[0]["modules_series"], - 'id_graph' => $content['id_gs'] + 'id_graph' => $id_graph ); $return['chart'] = graphic_combined_module( diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index f6634c6479..7af352cd69 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1636,7 +1636,7 @@ function pandoraFlotArea( graph_id, values, legend, mode: "time", timezone: "browser", localTimezone: true, - tickSize: [maxticks, 'hour'] + //tickSize: [maxticks, 'hour'] }], yaxis: { font: { @@ -1743,7 +1743,7 @@ function pandoraFlotArea( graph_id, values, legend, mode: "time", timezone: "browser", localTimezone: true, - tickSize: [maxticks, 'hour'] + //tickSize: [maxticks, 'hour'] }], yaxis: { font: { diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 22f6aba2ed..27b64fdde0 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -137,7 +137,7 @@ function flot_area_graph ( $return = "