';
} else {
$data[9] = '';
}
$data[9] .= ui_print_timestamp($module['utimestamp'], true, ['style' => 'font-size: 7pt']);
$data[9] .= '';
array_push($table->data, $data);
$rowIndex++;
}
ui_require_javascript_file('pandora.js');
?>
data)) {
if ($filter_monitors) {
ui_print_info_message([ 'no_close' => true, 'message' => __('Any monitors aren\'t with this filter.') ]);
} else {
ui_print_info_message([ 'no_close' => true, 'message' => __('This agent doesn\'t have any active monitors.') ]);
}
} else {
$url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$id_agente.'&refr=&filter_monitors=1&status_filter_monitor='.$status_filter_monitor.'&status_text_monitor='.$status_text_monitor.'&status_module_group='.$status_module_group;
if ($paginate_module) {
ui_pagination(
$count_modules,
false,
0,
0,
false,
'offset',
true,
'',
'pagination_list_modules(offset_param)',
[
'count' => '',
'offset' => 'offset_param',
]
);
}
html_print_table($table);
if ($paginate_module) {
ui_pagination(
$count_modules,
false,
0,
0,
false,
'offset',
true,
'pagination-bottom',
'pagination_list_modules(offset_param)',
[
'count' => '',
'offset' => 'offset_param',
]
);
}
}
unset($table);
unset($table_data);
}
if ($get_type) {
$id_module = (int) get_parameter('id_module');
$module = modules_get_agentmodule($id_module);
$graph_type = return_graphtype($module['id_tipo_modulo']);
echo $graph_type;
return;
}
if ($get_graph_module === true) {
global $config;
$output = '';
$graph_data = get_parameter('graph_data', '');
$params = json_decode(base64_decode($graph_data), true);
$server_id = (int) get_parameter('server_id', 0);
include_once $config['homedir'].'/include/functions_graph.php';
// Metaconsole connection to the node.
if (is_metaconsole() === true && empty($server_id) === false) {
$server = metaconsole_get_connection_by_id($server_id);
metaconsole_connect($server);
}
if ($params['histogram'] === true) {
$params['id_agent_module'] = $params['agent_module_id'];
$params['dinamic_proc'] = 1;
$output .= '';
if ($params['compare'] === 'separated') {
$graph = \reporting_module_histogram_graph(
['datetime' => ($params['begin_date'] - $params['period'])],
$params
);
$output .= $graph['chart'];
}
$graph = \reporting_module_histogram_graph(
['datetime' => $params['begin_date']],
$params
);
$output .= $graph['chart'];
$output .= '
';
} else {
$output .= grafico_modulo_sparse($params);
}
if (is_metaconsole() === true && empty($server_id) === false) {
metaconsole_restore_db();
}
echo $output;
return;
}
if ($get_graph_module_interfaces === true) {
global $config;
include_once $config['homedir'].'/include/functions_graph.php';
$output = '';
$graph_data = get_parameter('graph_data', '');
$params = json_decode(base64_decode($graph_data), true);
$modules = get_parameter('modules', '');
$modules = json_decode(base64_decode($modules), true);
$graph_data_combined = get_parameter('graph_data_combined', '');
$params_combined = json_decode(
base64_decode($graph_data_combined),
true
);
$output .= graphic_combined_module(
$modules,
$params,
$params_combined
);
echo $output;
return;
}
}