mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Merge branch '1217-name-macros-in-pdf-view-dev' into 'develop'
Added fix to macros in pdf view See merge request !835
This commit is contained in:
commit
4df624a7c5
@ -103,6 +103,8 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||||||
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
enterprise_include_once('include/functions_metaconsole.php');
|
||||||
|
|
||||||
$return = array();
|
$return = array();
|
||||||
|
|
||||||
if (!empty($report)) {
|
if (!empty($report)) {
|
||||||
@ -127,6 +129,8 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||||||
$metaconsole_on = is_metaconsole();
|
$metaconsole_on = is_metaconsole();
|
||||||
|
|
||||||
foreach ($contents as $content) {
|
foreach ($contents as $content) {
|
||||||
|
$server_name = $content['server_name'];
|
||||||
|
|
||||||
if (!empty($period)) {
|
if (!empty($period)) {
|
||||||
$content['period'] = $period;
|
$content['period'] = $period;
|
||||||
}
|
}
|
||||||
@ -154,6 +158,7 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
array_push ($agents_to_macro, modules_get_agentmodule_agent($graph_item['id_agent_module']));
|
array_push ($agents_to_macro, modules_get_agentmodule_agent($graph_item['id_agent_module']));
|
||||||
if ($metaconsole_on) {
|
if ($metaconsole_on) {
|
||||||
//Restore db connection
|
//Restore db connection
|
||||||
@ -162,10 +167,6 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($report) && $from_template) {
|
|
||||||
$agents_to_macro = $content['id_agent'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$agents_to_macro_aux = array();
|
$agents_to_macro_aux = array();
|
||||||
foreach ($agents_to_macro as $ag) {
|
foreach ($agents_to_macro as $ag) {
|
||||||
@ -175,6 +176,10 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||||||
}
|
}
|
||||||
$agents_to_macro = $agents_to_macro_aux;
|
$agents_to_macro = $agents_to_macro_aux;
|
||||||
|
|
||||||
|
if (!empty($report) && $from_template) {
|
||||||
|
$agents_to_macro = $content['id_agent'];
|
||||||
|
}
|
||||||
|
|
||||||
if(isset($content['style']['name_label'])){
|
if(isset($content['style']['name_label'])){
|
||||||
//Add macros name
|
//Add macros name
|
||||||
$items_label = array();
|
$items_label = array();
|
||||||
@ -183,7 +188,6 @@ function reporting_make_reporting_data($report = null, $id_report,
|
|||||||
$items_label['id_agent_module'] = $content['id_agent_module'];
|
$items_label['id_agent_module'] = $content['id_agent_module'];
|
||||||
$items_label['modules'] = $modules_to_macro;
|
$items_label['modules'] = $modules_to_macro;
|
||||||
$items_label['agents'] = $agents_to_macro;
|
$items_label['agents'] = $agents_to_macro;
|
||||||
$server_name = $content['server_name'];
|
|
||||||
|
|
||||||
//Metaconsole connection
|
//Metaconsole connection
|
||||||
if ($metaconsole_on && $server_name != '') {
|
if ($metaconsole_on && $server_name != '') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user