diff --git a/pandora_console/operation/agentes/agent_inventory.php b/pandora_console/operation/agentes/agent_inventory.php index 71dfb3bebc..1d692bfd41 100644 --- a/pandora_console/operation/agentes/agent_inventory.php +++ b/pandora_console/operation/agentes/agent_inventory.php @@ -218,7 +218,8 @@ 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; $printedTables++; @@ -309,17 +310,16 @@ foreach ($rows as $row) { $rowTable++; } - if ($iterator1 > 5) { - // PRINT COUNT TOTAL. - $table->data[$rowTable][0] = ''.__('Total').': '.$iterator1; - $rowTable++; - } + // PRINT COUNT TOTAL. + $table->colspan[$rowTable][0] = 10; + $table->data[$rowTable][0] = ''.__('Total').': '.$iterator1; + $rowTable++; } $idModuleInventory = $row['id_module_inventory']; } -if (isset($table) === true && $rowTable >= 1) { +if (isset($table) === true && $rowTable > 1) { html_print_table($table); $printedTables++; } diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 2946f2ea70..19ac249753 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -1443,10 +1443,21 @@ $alerttab['active'] = ($tab === 'alert'); // Inventory. $inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']); -$inventorytab = enterprise_hook('inventory_tab'); +if ($inventoryCount > 0) { + $inventorytab['text'] = html_print_menu_button( + [ + 'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente, + 'image' => 'images/hardware-software-component@svg.svg', + 'title' => __('Inventory'), + ], + true + ); -if ($inventorytab === ENTERPRISE_NOT_HOOK || $inventoryCount === 0) { - $inventorytab = ''; + if ($tab === 'inventory') { + $inventorytab['active'] = true; + } else { + $inventorytab['active'] = false; + } } // Collection.