From 7ea195c9c7889b4df9fa2b80a604904c0032f00e Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 22 Dec 2021 11:06:11 +0100 Subject: [PATCH] WIP: Setted graph_image_height --- .../godmode/reporting/reporting_builder.item_editor.php | 4 ++-- pandora_console/include/constants.php | 2 ++ pandora_console/include/functions_reporting.php | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pandora_console/godmode/reporting/reporting_builder.item_editor.php b/pandora_console/godmode/reporting/reporting_builder.item_editor.php index 9d5925b7e6..62d8aa92a0 100755 --- a/pandora_console/godmode/reporting/reporting_builder.item_editor.php +++ b/pandora_console/godmode/reporting/reporting_builder.item_editor.php @@ -211,7 +211,7 @@ switch ($action) { $failover_type = REPORT_FAILOVER_TYPE_NORMAL; $server_name = ''; $server_id = 0; - $dyn_height = 230; + $dyn_height = (empty($config['graph_image_height']) === false) ? $config['graph_image_height'] : REPORT_ITEM_DYNAMIC_HEIGHT; $landscape = false; $pagebreak = false; $summary = 0; @@ -252,7 +252,7 @@ switch ($action) { $server_name = ''; $server_id = 0; $get_data_editor = false; - $dyn_height = 230; + $dyn_height = (empty($config['graph_image_height']) === false) ? $config['graph_image_height'] : REPORT_ITEM_DYNAMIC_HEIGHT; break; } diff --git a/pandora_console/include/constants.php b/pandora_console/include/constants.php index 0b05df89fb..b0bedf04aa 100644 --- a/pandora_console/include/constants.php +++ b/pandora_console/include/constants.php @@ -456,6 +456,8 @@ define('REPORT_ITEM_ORDER_BY_ASCENDING', 2); define('REPORT_ITEM_ORDER_BY_DESCENDING', 1); define('REPORT_ITEM_ORDER_BY_UNSORT', 0); +define('REPORT_ITEM_DYNAMIC_HEIGHT', 230); + define('REPORT_OLD_TYPE_SIMPLE_GRAPH', 1); define('REPORT_OLD_TYPE_CUSTOM_GRAPH', 2); define('REPORT_OLD_TYPE_SLA', 3); diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index a65e62932d..7866aba04d 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -9817,19 +9817,21 @@ function reporting_set_conf_charts( $content, &$ttl ) { + global $config; + switch ($type) { case 'dinamic': default: $only_image = false; $width = 900; - $height = isset($content['style']['dyn_height']) ? $content['style']['dyn_height'] : 230; + $height = isset($content['style']['dyn_height']) ? $content['style']['dyn_height'] : $config['graph_image_height']; $ttl = 1; break; case 'static': $ttl = 2; $only_image = true; - $height = isset($content['style']['dyn_height']) ? $content['style']['dyn_height'] : 230; + $height = isset($content['style']['dyn_height']) ? $content['style']['dyn_height'] : $config['graph_image_height']; $width = 650; break;