mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed the 'alert_report_agent', 'alert_report_group' and 'alert_report_module' item in metaconsole reports. TICKET: #2249
This commit is contained in:
parent
d3277b5039
commit
d943fa5b78
@ -550,7 +550,7 @@ else
|
|||||||
html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', '');
|
html_print_select(reports_get_report_types(false, true), 'type', $type, 'chooseType();', '', '');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$report_type = reports_get_report_types($type);
|
$report_type = reports_get_report_types();
|
||||||
if (!empty($report_type) and isset($report_type[$type]['name']))
|
if (!empty($report_type) and isset($report_type[$type]['name']))
|
||||||
echo $report_type[$type]['name'];
|
echo $report_type[$type]['name'];
|
||||||
else
|
else
|
||||||
@ -2312,6 +2312,7 @@ function chooseType() {
|
|||||||
$("#row_period").show();
|
$("#row_period").show();
|
||||||
$("#row_show_in_two_columns").show();
|
$("#row_show_in_two_columns").show();
|
||||||
$("#row_group").show();
|
$("#row_group").show();
|
||||||
|
$("#row_servers").show();
|
||||||
break;
|
break;
|
||||||
case 'alert_report_agent':
|
case 'alert_report_agent':
|
||||||
$("#row_description").show();
|
$("#row_description").show();
|
||||||
|
@ -2412,6 +2412,14 @@ function reporting_alert_report_group($report, $content) {
|
|||||||
$content['name'] = __('Alert Report Group');
|
$content['name'] = __('Alert Report Group');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($config['metaconsole']) {
|
||||||
|
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||||
|
|
||||||
|
|
||||||
|
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||||
|
metaconsole_connect($server);
|
||||||
|
}
|
||||||
|
|
||||||
$group_name = groups_get_name($content['id_group'], true);
|
$group_name = groups_get_name($content['id_group'], true);
|
||||||
|
|
||||||
$return['title'] = $content['name'];
|
$return['title'] = $content['name'];
|
||||||
@ -2514,6 +2522,10 @@ function reporting_alert_report_group($report, $content) {
|
|||||||
|
|
||||||
$return['data'] = $data;
|
$return['data'] = $data;
|
||||||
|
|
||||||
|
if ($config['metaconsole']) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
|
||||||
return reporting_check_structure_content($return);
|
return reporting_check_structure_content($return);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2527,6 +2539,15 @@ function reporting_alert_report_agent($report, $content) {
|
|||||||
$content['name'] = __('Alert Report Agent');
|
$content['name'] = __('Alert Report Agent');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($config['metaconsole']) {
|
||||||
|
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||||
|
metaconsole_connect($server);
|
||||||
|
}
|
||||||
|
|
||||||
$agent_name = agents_get_name($content['id_agent']);
|
$agent_name = agents_get_name($content['id_agent']);
|
||||||
|
|
||||||
$return['title'] = $content['name'];
|
$return['title'] = $content['name'];
|
||||||
@ -2609,6 +2630,10 @@ function reporting_alert_report_agent($report, $content) {
|
|||||||
|
|
||||||
$return['data'] = $data;
|
$return['data'] = $data;
|
||||||
|
|
||||||
|
if ($config['metaconsole']) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
|
||||||
return reporting_check_structure_content($return);
|
return reporting_check_structure_content($return);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2622,6 +2647,14 @@ function reporting_alert_report_module($report, $content) {
|
|||||||
$content['name'] = __('Alert Report Module');
|
$content['name'] = __('Alert Report Module');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($config['metaconsole']) {
|
||||||
|
$id_meta = metaconsole_get_id_server($content["server_name"]);
|
||||||
|
|
||||||
|
|
||||||
|
$server = metaconsole_get_connection_by_id ($id_meta);
|
||||||
|
metaconsole_connect($server);
|
||||||
|
}
|
||||||
|
|
||||||
$module_name = io_safe_output(
|
$module_name = io_safe_output(
|
||||||
modules_get_agentmodule_name($content['id_agent_module']));
|
modules_get_agentmodule_name($content['id_agent_module']));
|
||||||
$agent_name = io_safe_output(
|
$agent_name = io_safe_output(
|
||||||
@ -2702,6 +2735,10 @@ function reporting_alert_report_module($report, $content) {
|
|||||||
|
|
||||||
$return['data'] = $data;
|
$return['data'] = $data;
|
||||||
|
|
||||||
|
if ($config['metaconsole']) {
|
||||||
|
metaconsole_restore_db();
|
||||||
|
}
|
||||||
|
|
||||||
return reporting_check_structure_content($return);
|
return reporting_check_structure_content($return);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user