Process inventory modules with correct xml and empty data
This commit is contained in:
parent
0cfe85770f
commit
e2297171cb
|
@ -756,10 +756,8 @@ function inventory_get_datatable(
|
|||
foreach ($rows as $row) {
|
||||
$data_rows = explode(PHP_EOL, $row['data']);
|
||||
foreach ($data_rows as $data_key => $data_value) {
|
||||
if (empty($data_value) === false) {
|
||||
$row['data'] = $data_value;
|
||||
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
|
||||
}
|
||||
$row['data'] = $data_value;
|
||||
$modules[$row['name']][$row['name_agent'].'-'.$data_key.'-'.$data_value] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ foreach ($rows as $row) {
|
|||
}
|
||||
|
||||
if ($idModuleInventory != $row['id_module_inventory']) {
|
||||
if (isset($table) === true && $rowTable > 1) {
|
||||
if (isset($table) === true && $rowTable >= 1) {
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
$rowTable = 1;
|
||||
|
@ -271,7 +271,7 @@ foreach ($rows as $row) {
|
|||
$idModuleInventory = $row['id_module_inventory'];
|
||||
}
|
||||
|
||||
if (isset($table) === true && $rowTable > 1) {
|
||||
if (isset($table) === true && $rowTable >= 1) {
|
||||
html_print_table($table);
|
||||
$printedTables++;
|
||||
}
|
||||
|
|
|
@ -1457,10 +1457,6 @@ if ($tab == 'inventory') {
|
|||
$inventorytab['active'] = false;
|
||||
}
|
||||
|
||||
$inventorytab = enterprise_hook('inventory_tab');
|
||||
if ($inventorytab === ENTERPRISE_NOT_HOOK || $inventoryCount === 0) {
|
||||
$inventorytab = '';
|
||||
}
|
||||
|
||||
// Collection.
|
||||
if ((int) $config['license_nms'] !== 1) {
|
||||
|
|
|
@ -7232,7 +7232,6 @@ sub process_inventory_data ($$$$$$$) {
|
|||
}
|
||||
}
|
||||
|
||||
next if ($data_list eq '');
|
||||
process_inventory_module_data ($pa_config, $data_list, $server_id, $agent_name, $module_name, $interval, $timestamp, $dbh);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue