#11474 Fix data position

This commit is contained in:
miguel angel rasteu 2023-06-08 09:25:36 +02:00
parent 0ca464846d
commit 115b77d7df
1 changed files with 67 additions and 66 deletions

View File

@ -362,7 +362,6 @@ if ($is_metaconsole === true) {
if ($is_metaconsole === true) {
$nodo_image_url = $config['homeurl'].'/images/node.png';
if ($id_server > 0) {
// $agent_selected = io_safe_output($inventory_agent), true);
$connection = metaconsole_get_connection_by_id($id_server);
$agents_node = metaconsole_get_agents_servers($connection['server_name'], $inventory_id_group);
$node = metaconsole_get_servers($id_server);
@ -769,14 +768,14 @@ if ($inventory_module !== 'basic') {
foreach ($nodos as $nodo) {
$agents = '';
$data = [];
foreach ($nodo['data'] as $agent_rows) {
$modules = '';
foreach ($agent_rows['row'] as $key => $row) {
$columns = explode(';', io_safe_output($row['data_format']));
array_push($columns, 'Timestamp');
$data = [];
$data_rows = explode(PHP_EOL, $row['data']);
foreach ($data_rows as $data_row) {
// Exclude results don't match filter.
@ -796,7 +795,6 @@ if ($inventory_module !== 'basic') {
array_push($data, (object) $row_tmp);
}
}
}
$id_table = 'id_'.$row['id_module_inventory'].'_'.$nodo['server_uid'];
$table = ui_print_datatable(
@ -857,6 +855,7 @@ if ($inventory_module !== 'basic') {
'white-box-content w100p',
'box-shadow white_table_graph w100p',
);
}
$node_name = $nodo['server_name'];
if ($count[$nodo['server_name']] > 1) {
@ -882,9 +881,10 @@ if ($inventory_module !== 'basic') {
foreach ($nodos as $nodo_key => $nodo) {
$agents = '';
$data = [];
foreach ($nodo['data'] as $module_key => $module_rows) {
$agent = '';
$data = [];
foreach ($module_rows as $row) {
$columns = explode(';', io_safe_output($row['data_format']));
array_push($columns, 'Timestamp');
@ -957,7 +957,7 @@ if ($inventory_module !== 'basic') {
false,
$id_table
);
}
$agents .= ui_toggle(
$agent,
@ -970,6 +970,7 @@ if ($inventory_module !== 'basic') {
'white-box-content w100p',
'box-shadow white_table_graph w100p',
);
}
$node_name = $nodo['server_name'];
if ($count[$nodo['server_name']] > 1) {