' . __("Tag's information") . '';
echo "
";
foreach ($tags as $tag) {
echo "";
echo "";
if (tags_get_module_policy_tags($tag, $id_agente_modulo)) {
html_print_image('images/policies.png', false, array('style' => 'vertical-align: middle;'));
}
echo " | ";
echo "";
echo tags_get_name($tag);
echo " | ";
echo "
";
}
echo "
";
return;
}
if ($get_relations_tooltip) {
$id_agente_modulo = (int) get_parameter ('id_agente_modulo');
if ($id_agente_modulo == false)
return;
$id_agente = modules_get_agentmodule_agent($id_agente_modulo);
$params = array(
'id_agent' => $id_agente,
'id_module' => $id_agente_modulo
);
$relations = modules_get_relations($params);
if (empty($relations))
return;
$table_relations = new stdClass();
$table_relations->id = 'module_' . $id_agente_modulo . '_relations';
$table_relations->width = '100%';
$table_relations->class = 'databox filters';
$table_relations->style = array();
$table_relations->style[0] = 'font-weight: bold;';
$table_relations->style[2] = 'font-weight: bold;';
$table_relations->head = array();
$table_relations->head[0] = __("Relationship information");
$table_relations->head_colspan[0] = 4;
$table_relations->data = array();
foreach ($relations as $relation) {
if ($relation['module_a'] == $id_agente_modulo) {
$id_module = $relation['module_b'];
}
else {
$id_module = $relation['module_a'];
}
$id_agent = modules_get_agentmodule_agent($id_module);
$data = array();
$data[0] = __('Agent');
$data[1] = ui_print_agent_name ($id_agent, true);
$data[2] = __('Module');
$data[3] = "" .
ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_medium', true, true, true, '[…]') . "";
$table_relations->data[] = $data;
}
html_print_table($table_relations);
return;
}
return;
}
if (!isset ($id_agente)) {
//This page is included, $id_agente should be passed to it.
db_pandora_audit("HACK Attempt",
"Trying to get the monitor list without id_agent passed");
include ("general/noaccess.php");
exit;
}
$id_agent = (int)get_parameter('id_agente');
$status_filter_monitor = (int)get_parameter('status_filter_monitor', -1);
$status_text_monitor = get_parameter('status_text_monitor', '');
echo "";
echo ui_print_help_tip(__('To see the list of modules paginated, enable this option in the Styles Configuration.'), true) .
__('Full list of monitors') . ' ' .
reporting_tiny_stats ($agent, true, 'modules');
$modules_not_init = agents_monitor_notinit($id_agente);
if (!empty($modules_not_init)) {
echo clippy_context_help("modules_not_init");
}
echo "
";
ob_start();
print_form_filter_monitors($id_agente, $status_filter_monitor, $status_text_monitor);
echo "" .
html_print_image('images/spinner.gif', true) .
'
';
echo "" .
"
";
$html_toggle = ob_get_clean();
ui_toggle($html_toggle,
__('List of modules'),
'status_monitor_agent',
false);
?>
";
ui_include_time_picker();
ui_require_jquery_file("ui.datepicker-" . get_user_language(), "include/javascript/i18n/");
?>
class = "databox filters";
$table->width = "100%";
$table->style[0] = 'font-weight: bold;';
$table->style[2] = 'font-weight: bold;';
$table->style[4] = 'font-weight: bold;';
$table->data[0][0] = html_print_input_hidden('filter_monitors', 1, true);
$table->data[0][0] .= html_print_input_hidden('monitors_change_filter', 1, true);
$table->data[0][0] .= __('Status:');
$status_list = array(
-1 => __('All'),
AGENT_MODULE_STATUS_CRITICAL_BAD => __('Critical'),
AGENT_MODULE_STATUS_CRITICAL_ALERT => __('Alert'),
AGENT_MODULE_STATUS_NORMAL => __('Normal'),
AGENT_MODULE_STATUS_NOT_NORMAL => __('Not Normal'),
AGENT_MODULE_STATUS_WARNING => __('Warning'),
AGENT_MODULE_STATUS_UNKNOWN => __('Unknown'));
$table->data[0][1] = html_print_select ($status_list,
'status_filter_monitor', $status_filter_monitor, '', '', 0,
true);
$table->data[0][2] = __('Free text for search (*):') . ui_print_help_tip(
__('Search by module name, list matches.'),true);
$table->data[0][3] = html_print_input_text('status_text_monitor', $status_text_monitor, '', 30, 100, true);
$table->data[0][4] = __('Module group');
$rows = db_get_all_rows_sql("SELECT *
FROM tmodule_group where id_mg in (SELECT id_module_group from tagente_modulo where id_agente = $id_agent ) ORDER BY name");
if (!empty($rows)) {
$rows_select[-1] = __('All');
foreach ($rows as $module_group)
$rows_select[$module_group['id_mg']] = __($module_group['name']);
}
$table->data[0][5] = html_print_select ($rows_select,'status_module_group', $status_module_group, '', '',0, true);
$table->data[0][6] = html_print_button(__('Filter'), 'filter', false, 'filter_modules();', 'class="sub search"', true);
$table->data[0][7] = ' ' . html_print_button(__('Reset'), 'filter', false, 'reset_filter_modules();', 'class="sub upd" style="margin-top:0px;"', true);
$form_text .= html_print_table($table, true);
$filter_hidden = false;
if ($status_filter_monitor == -1 && $status_text_monitor == '' && $status_module_group == -1 ) {
$filter_hidden = true;
}
echo $form_text;
}
?>