load_tables(); } $id = get_parameter('id'); $id_node = get_parameter('id_node', 0); // Get the data if ($id_node > 0) { $connection = metaconsole_get_connection_by_id($id_node); if (metaconsole_load_external_db($connection) != NOERR) { ui_print_error_message(__('Cannot connect with node to display the module data.')); exit; } } $row_module = modules_get_agentmodule($id); // Retrieve data $utimestamp = get_parameter('timestamp', ''); if ($utimestamp == '') { // Retrieve last data $row_state = db_get_row('tagente_estado', 'id_agente_modulo', $id); $last_timestamp = date('Y-m-d H:i:s', $row_state['utimestamp']); } else { // Retrieve target data $state = db_get_row('tagente_estado', 'id_agente_modulo', $id, ['id_agente']); $row_state = db_get_row_filter('tagente_datos_string', ['id_agente_modulo' => $id, 'utimestamp' => $utimestamp], false, 'AND', 1); $row_state['id_agente'] = $state['id_agente']; $last_timestamp = date('Y-m-d H:i:s', $row_state['utimestamp']); } // Build the info $label = get_parameter('label', io_safe_output($row_module['module_name'])); $last_data = io_safe_output($row_state['datos']); $refresh = (int) get_parameter('refr', $row_state['current_interval']); // ACL check $all_groups = agents_get_all_groups_agent($row_state['id_agente']); if (!check_acl_one_of_groups($config['id_user'], $all_groups, 'AR')) { include $config['homedir'].'/general/noaccess.php'; exit; } ?>
0) { $query = ui_get_url_refresh(false); echo ''; if ($config['style'] === 'pandora_black' && !is_metaconsole()) { echo ''; } } ?>