mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Merge branch '2664-No_funcionan_Automatic_Combined_Graphs_en_Metaconsola' into 'develop'
fixed errors automatic combined graph report metaconsole See merge request artica/pandorafms!1703
This commit is contained in:
commit
c072ed1fdb
@ -6278,6 +6278,8 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
$modules = array();
|
||||||
|
|
||||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||||
|
|
||||||
if ($config['metaconsole']) {
|
if ($config['metaconsole']) {
|
||||||
@ -6293,6 +6295,19 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
|||||||
if (empty($content['name'])) {
|
if (empty($content['name'])) {
|
||||||
if ($type_report == "custom_graph") {
|
if ($type_report == "custom_graph") {
|
||||||
$content['name'] = __('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 {
|
else {
|
||||||
$content['name'] = __('Simple graph');
|
$content['name'] = __('Simple graph');
|
||||||
@ -6304,9 +6319,8 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
|||||||
$return["description"] = $content["description"];
|
$return["description"] = $content["description"];
|
||||||
$return["date"] = reporting_get_date_text(
|
$return["date"] = reporting_get_date_text(
|
||||||
$report,
|
$report,
|
||||||
$content);
|
$content
|
||||||
|
);
|
||||||
$graphs = db_get_all_rows_field_filter ("tgraph", "id_graph", $content['id_gs']);
|
|
||||||
|
|
||||||
$return['chart'] = '';
|
$return['chart'] = '';
|
||||||
|
|
||||||
@ -6329,13 +6343,12 @@ function reporting_custom_graph($report, $content, $type = 'dinamic',
|
|||||||
'fullscale' => $graphs[0]["fullscale"],
|
'fullscale' => $graphs[0]["fullscale"],
|
||||||
'server_id' => $id_meta
|
'server_id' => $id_meta
|
||||||
);
|
);
|
||||||
|
|
||||||
$params_combined = array(
|
$params_combined = array(
|
||||||
'stacked' => $graphs[0]["stacked"],
|
'stacked' => $graphs[0]["stacked"],
|
||||||
'summatory' => $graphs[0]["summatory_series"],
|
'summatory' => $graphs[0]["summatory_series"],
|
||||||
'average' => $graphs[0]["average_series"],
|
'average' => $graphs[0]["average_series"],
|
||||||
'modules_series' => $graphs[0]["modules_series"],
|
'modules_series' => $graphs[0]["modules_series"],
|
||||||
'id_graph' => $content['id_gs']
|
'id_graph' => $id_graph
|
||||||
);
|
);
|
||||||
|
|
||||||
$return['chart'] = graphic_combined_module(
|
$return['chart'] = graphic_combined_module(
|
||||||
|
@ -1636,7 +1636,7 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
mode: "time",
|
mode: "time",
|
||||||
timezone: "browser",
|
timezone: "browser",
|
||||||
localTimezone: true,
|
localTimezone: true,
|
||||||
tickSize: [maxticks, 'hour']
|
//tickSize: [maxticks, 'hour']
|
||||||
}],
|
}],
|
||||||
yaxis: {
|
yaxis: {
|
||||||
font: {
|
font: {
|
||||||
@ -1743,7 +1743,7 @@ function pandoraFlotArea( graph_id, values, legend,
|
|||||||
mode: "time",
|
mode: "time",
|
||||||
timezone: "browser",
|
timezone: "browser",
|
||||||
localTimezone: true,
|
localTimezone: true,
|
||||||
tickSize: [maxticks, 'hour']
|
//tickSize: [maxticks, 'hour']
|
||||||
}],
|
}],
|
||||||
yaxis: {
|
yaxis: {
|
||||||
font: {
|
font: {
|
||||||
|
@ -137,7 +137,7 @@ function flot_area_graph (
|
|||||||
$return = "<div class='parent_graph' style='width: " . ($params['width']) . ";" . $background_style . "'>";
|
$return = "<div class='parent_graph' style='width: " . ($params['width']) . ";" . $background_style . "'>";
|
||||||
// Set some containers to legend, graph, timestamp tooltip, etc.
|
// Set some containers to legend, graph, timestamp tooltip, etc.
|
||||||
if($params['show_legend']){
|
if($params['show_legend']){
|
||||||
$return .= "<p id='legend_$graph_id'></p>";
|
$return .= "<p id='legend_$graph_id' style='text-align:left;'></p>";
|
||||||
}
|
}
|
||||||
if(isset($params['graph_combined']) && $params['graph_combined'] &&
|
if(isset($params['graph_combined']) && $params['graph_combined'] &&
|
||||||
(!isset($params['from_interface']) || !$params['from_interface']) ){
|
(!isset($params['from_interface']) || !$params['from_interface']) ){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user