Report macros now apply on showing report
This commit is contained in:
parent
410d517a92
commit
fae8070e29
|
@ -1419,10 +1419,7 @@ switch ($action) {
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
$values['name'] = reporting_label_macro(
|
||||
$items_label,
|
||||
$name_it
|
||||
);
|
||||
$values['name'] = $name_it;
|
||||
|
||||
$values['landscape'] = get_parameter('landscape');
|
||||
$values['pagebreak'] = get_parameter('pagebreak');
|
||||
|
@ -2115,10 +2112,7 @@ switch ($action) {
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
$values['name'] = reporting_label_macro(
|
||||
$items_label,
|
||||
$name_it
|
||||
);
|
||||
$values['name'] = $name_it;
|
||||
|
||||
$values['landscape'] = get_parameter('landscape');
|
||||
$values['pagebreak'] = get_parameter('pagebreak');
|
||||
|
|
|
@ -1840,10 +1840,23 @@ function reporting_event_report_group(
|
|||
$history = true;
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$group_name = groups_get_name($content['id_group'], true);
|
||||
|
||||
$items_label = ['agent_group' => $group_name];
|
||||
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = groups_get_name($content['id_group'], true);
|
||||
$return['subtitle'] = $group_name;
|
||||
if (!empty($content['style']['event_filter_search'])) {
|
||||
$return['subtitle'] .= ' ('.$content['style']['event_filter_search'].')';
|
||||
}
|
||||
|
@ -2122,7 +2135,16 @@ function reporting_event_report_module(
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.io_safe_output($module_name);
|
||||
|
@ -2230,18 +2252,44 @@ function reporting_inventory_changes($report, $content, $type)
|
|||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$es = json_decode($content['external_source'], true);
|
||||
|
||||
$id_agent = $es['id_agents'];
|
||||
$module_name = $es['inventory_modules'];
|
||||
$id_agent_module = modules_get_agentmodule_id($module_name, $id_agent);
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$items_label = [
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
];
|
||||
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = agents_get_alias($content['id_agent']);
|
||||
$return['description'] = $content['description'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
|
||||
$es = json_decode($content['external_source'], true);
|
||||
|
||||
$id_agent = $es['id_agents'];
|
||||
$module_name = $es['inventory_modules'];
|
||||
|
||||
switch ($type) {
|
||||
case 'data':
|
||||
$inventory_changes = inventory_get_changes(
|
||||
|
@ -2299,12 +2347,6 @@ function reporting_inventory($report, $content, $type)
|
|||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['description'] = $content['description'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
|
||||
$es = json_decode($content['external_source'], true);
|
||||
|
||||
$id_agent = $es['id_agents'];
|
||||
|
@ -2313,6 +2355,35 @@ function reporting_inventory($report, $content, $type)
|
|||
$module_name = [0 => 0];
|
||||
}
|
||||
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
];
|
||||
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['description'] = $content['description'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
|
||||
$date = $es['date'];
|
||||
$description = $content['description'];
|
||||
|
||||
|
@ -2942,8 +3013,21 @@ function reporting_group_report($report, $content)
|
|||
$connection = metaconsole_get_connection($server);
|
||||
}
|
||||
|
||||
$items_label = [
|
||||
'agent_group' => groups_get_name($content['id_group'], true),
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['server_name'] = $server[0];
|
||||
$return['title'] = io_safe_output($content['name']);
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = groups_get_name($content['id_group'], true);
|
||||
|
@ -3034,6 +3118,15 @@ function reporting_event_report_agent(
|
|||
'agent_alias' => $agent_alias,
|
||||
];
|
||||
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
if ($config['metaconsole']) {
|
||||
metaconsole_restore_db();
|
||||
}
|
||||
|
@ -3047,7 +3140,7 @@ function reporting_event_report_agent(
|
|||
}
|
||||
|
||||
$return['label'] = $label;
|
||||
$return['title'] = io_safe_output($content['name']);
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = io_safe_output($agent_alias);
|
||||
|
@ -3258,7 +3351,16 @@ function reporting_historical_data($report, $content)
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.$module_name;
|
||||
|
@ -3383,7 +3485,16 @@ function reporting_database_serialized($report, $content)
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.$module_name;
|
||||
|
@ -3537,7 +3648,37 @@ function reporting_last_value($report, $content)
|
|||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$id_agent_module = $content['id_agent_module'];
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
'module_name' => $module_name,
|
||||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.$module_name;
|
||||
|
@ -3592,7 +3733,18 @@ function reporting_group_configuration($report, $content)
|
|||
|
||||
$group_name = groups_get_name($content['id_group'], true);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$items_label = ['agent_group' => $group_name];
|
||||
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $group_name;
|
||||
|
@ -3667,7 +3819,18 @@ function reporting_network_interfaces_report($report, $content, $type='dinamic',
|
|||
|
||||
$group_name = groups_get_name($content['id_group']);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$items_label = ['_agentgroup_' => $group_name];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $group_name;
|
||||
|
@ -3886,7 +4049,18 @@ function reporting_alert_report_group($report, $content)
|
|||
|
||||
$group_name = groups_get_name($content['id_group'], true);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$items_label = ['agent_group' => $group_name];
|
||||
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $group_name;
|
||||
|
@ -4089,7 +4263,16 @@ function reporting_alert_report_agent($report, $content)
|
|||
'agent_alias' => $agent_alias,
|
||||
];
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias;
|
||||
|
@ -4259,7 +4442,16 @@ function reporting_alert_report_module($report, $content)
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.$module_name;
|
||||
|
@ -4520,7 +4712,16 @@ function reporting_monitor_report($report, $content)
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.$module_name;
|
||||
|
@ -4712,11 +4913,57 @@ function reporting_prediction_date($report, $content)
|
|||
);
|
||||
$agent_name_db = io_safe_output(modules_get_agentmodule_agent_name($content['id_agent_module']));
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$id_agent = agents_get_module_id(
|
||||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$id_agent_module = $content['id_agent_module'];
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
$module_name = modules_get_agentmodule_name(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
'module_name' => $module_name,
|
||||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$description = (isset($content['description'])) ? $content['description'] : '';
|
||||
if ($description != '') {
|
||||
$description = reporting_label_macro(
|
||||
$items_label,
|
||||
$description
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_name.' - '.$module_name;
|
||||
$return['description'] = $content['description'];
|
||||
$return['description'] = $description;
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
||||
|
||||
|
@ -4767,7 +5014,45 @@ function reporting_projection_graph(
|
|||
$agent_name = io_safe_output(modules_get_agentmodule_agent_alias($content['id_agent_module']));
|
||||
$agent_name_db = io_safe_output(modules_get_agentmodule_agent_name($content['id_agent_module']));
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$id_agent = agents_get_module_id(
|
||||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$id_agent_module = $content['id_agent_module'];
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
$module_name = modules_get_agentmodule_name(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
'module_name' => $module_name,
|
||||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['subtitle'] = $agent_name.' - '.$module_name;
|
||||
$return['description'] = $content['description'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
|
@ -4846,7 +5131,36 @@ function reporting_agent_configuration($report, $content)
|
|||
$content['name'] = __('Agent configuration');
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$sql = '
|
||||
SELECT *
|
||||
FROM tagente
|
||||
WHERE id_agente='.$content['id_agent'];
|
||||
$agent_data = db_get_row_sql($sql);
|
||||
|
||||
$id_agent = $content['id_agent'];
|
||||
$agent_alias = $agent_data['alias'];
|
||||
$agent_group = groups_get_name($agent_data['id_grupo']);
|
||||
$agent_description = $agent_data['comentarios'];
|
||||
$agent_address = $agent_data['direccion'];
|
||||
|
||||
$items_label = [
|
||||
'id_agent' => $id_agent,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
];
|
||||
|
||||
// Apply macros.
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['description'] = $content['description'];
|
||||
|
@ -4860,20 +5174,14 @@ function reporting_agent_configuration($report, $content)
|
|||
metaconsole_connect($server);
|
||||
}
|
||||
|
||||
$sql = '
|
||||
SELECT *
|
||||
FROM tagente
|
||||
WHERE id_agente='.$content['id_agent'];
|
||||
$agent_data = db_get_row_sql($sql);
|
||||
|
||||
$agent_configuration = [];
|
||||
$agent_configuration['name'] = $agent_data['alias'];
|
||||
$agent_configuration['group'] = groups_get_name($agent_data['id_grupo']);
|
||||
$agent_configuration['name'] = $agent_alias;
|
||||
$agent_configuration['group'] = $agent_group;
|
||||
$agent_configuration['group_icon'] = ui_print_group_icon($agent_data['id_grupo'], true, '', '', false);
|
||||
$agent_configuration['os'] = os_get_name($agent_data['id_os']);
|
||||
$agent_configuration['os_icon'] = ui_print_os_icon($agent_data['id_os'], true, true);
|
||||
$agent_configuration['address'] = $agent_data['direccion'];
|
||||
$agent_configuration['description'] = $agent_data['comentarios'];
|
||||
$agent_configuration['address'] = $agent_address;
|
||||
$agent_configuration['description'] = $agent_description;
|
||||
$agent_configuration['enabled'] = (int) !$agent_data['disabled'];
|
||||
$agent_configuration['group'] = $report['group'];
|
||||
$modules = agents_get_modules($content['id_agent']);
|
||||
|
@ -5026,13 +5334,59 @@ function reporting_value($report, $content, $type, $pdf=false)
|
|||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$id_agent = agents_get_module_id(
|
||||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$id_agent_module = $content['id_agent_module'];
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
$module_name = modules_get_agentmodule_name(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
'module_name' => $module_name,
|
||||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$label = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($label != '') {
|
||||
$label = reporting_label_macro(
|
||||
$items_label,
|
||||
$label
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_name.' - '.$module_name;
|
||||
$return['description'] = $content['description'];
|
||||
$return['date'] = reporting_get_date_text($report, $content);
|
||||
$return['label'] = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
||||
$return['label'] = $label;
|
||||
$return['agents'] = [$content['id_agent']];
|
||||
$return['id_agent'] = $content['id_agent'];
|
||||
$return['id_agent_module'] = $content['id_agent_module'];
|
||||
|
@ -7573,7 +7927,42 @@ function reporting_increment($report, $content)
|
|||
$content['name'] = __('Increment');
|
||||
}
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$id_agent = $content['id_agent'];
|
||||
$id_agent_module = $content['id_agent_module'];
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
$module_name = modules_get_agentmodule_name(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
'module_name' => $module_name,
|
||||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['description'] = $content['description'];
|
||||
|
@ -8197,6 +8586,10 @@ function reporting_custom_graph(
|
|||
$content['name'] = __('Simple graph');
|
||||
}
|
||||
|
||||
$id_agent = agents_get_module_id(
|
||||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
|
@ -8209,13 +8602,42 @@ function reporting_custom_graph(
|
|||
$id_agent_module
|
||||
);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
'module_name' => $module_name,
|
||||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$description = (isset($content['description'])) ? $content['description'] : '';
|
||||
if ($description != '') {
|
||||
$description = reporting_label_macro(
|
||||
$items_label,
|
||||
$description
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $graphs[0]['name'];
|
||||
$return['agent_name'] = $agent_alias;
|
||||
$return['module_name'] = $module_name;
|
||||
$return['description'] = $content['description'];
|
||||
$return['description'] = $description;
|
||||
$return['date'] = reporting_get_date_text(
|
||||
$report,
|
||||
$content
|
||||
|
@ -8358,6 +8780,23 @@ function reporting_simple_graph(
|
|||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$description = (isset($content['description'])) ? $content['description'] : '';
|
||||
if ($description != '') {
|
||||
$description = reporting_label_macro(
|
||||
$items_label,
|
||||
$description
|
||||
);
|
||||
}
|
||||
|
||||
$label = (isset($content['style']['label'])) ? $content['style']['label'] : '';
|
||||
if ($label != '') {
|
||||
$label = reporting_label_macro(
|
||||
|
@ -8366,14 +8805,14 @@ function reporting_simple_graph(
|
|||
);
|
||||
}
|
||||
|
||||
$return['title'] = io_safe_output($content['name']);
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_alias.' - '.$module_name;
|
||||
$return['agent_name_db'] = agents_get_name($id_agent);
|
||||
$return['agent_name'] = $agent_alias;
|
||||
$return['module_name'] = $module_name;
|
||||
$return['description'] = io_safe_output($content['description']);
|
||||
$return['description'] = $description;
|
||||
$return['date'] = reporting_get_date_text(
|
||||
$report,
|
||||
$content
|
||||
|
@ -12858,11 +13297,57 @@ function reporting_module_histogram_graph($report, $content, $pdf=0)
|
|||
)
|
||||
);
|
||||
|
||||
$return['title'] = $content['name'];
|
||||
$id_agent = agents_get_module_id(
|
||||
$content['id_agent_module']
|
||||
);
|
||||
|
||||
$id_agent_module = $content['id_agent_module'];
|
||||
$agent_description = agents_get_description($id_agent);
|
||||
$agent_group = agents_get_agent_group($id_agent);
|
||||
$agent_address = agents_get_address($id_agent);
|
||||
$agent_alias = agents_get_alias($id_agent);
|
||||
$module_name = modules_get_agentmodule_name(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$module_description = modules_get_agentmodule_descripcion(
|
||||
$id_agent_module
|
||||
);
|
||||
|
||||
$items_label = [
|
||||
'type' => $return['type'],
|
||||
'id_agent' => $id_agent,
|
||||
'id_agent_module' => $id_agent_module,
|
||||
'agent_description' => $agent_description,
|
||||
'agent_group' => $agent_group,
|
||||
'agent_address' => $agent_address,
|
||||
'agent_alias' => $agent_alias,
|
||||
'module_name' => $module_name,
|
||||
'module_description' => $module_description,
|
||||
];
|
||||
|
||||
// Apply macros
|
||||
$title = (isset($content['name'])) ? $content['name'] : '';
|
||||
if ($title != '') {
|
||||
$title = reporting_label_macro(
|
||||
$items_label,
|
||||
$title
|
||||
);
|
||||
}
|
||||
|
||||
$description = (isset($content['description'])) ? $content['description'] : '';
|
||||
if ($description != '') {
|
||||
$description = reporting_label_macro(
|
||||
$items_label,
|
||||
$description
|
||||
);
|
||||
}
|
||||
|
||||
$return['title'] = $title;
|
||||
$return['landscape'] = $content['landscape'];
|
||||
$return['pagebreak'] = $content['pagebreak'];
|
||||
$return['subtitle'] = $agent_name.' - '.$module_name;
|
||||
$return['description'] = $content['description'];
|
||||
$return['description'] = $description;
|
||||
$return['date'] = reporting_get_date_text(
|
||||
$report,
|
||||
$content
|
||||
|
|
Loading…
Reference in New Issue