Merge branch 'ent-9035-Si-no-hay-inventario,-no-deberia-mostrar-la-solapa-de-inventario' into 'develop'
Hide inventory view if agent dont have inventory modules See merge request artica/pandorafms!4916
This commit is contained in:
commit
fc18c1a168
|
@ -1403,7 +1403,7 @@ if ($agent_interfaces_count > 0) {
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
|
||||||
if ($tab == 'interface') {
|
if ($tab === 'interface') {
|
||||||
$interfacetab['active'] = true;
|
$interfacetab['active'] = true;
|
||||||
} else {
|
} else {
|
||||||
$interfacetab['active'] = false;
|
$interfacetab['active'] = false;
|
||||||
|
@ -1420,19 +1420,19 @@ $alerttab['text'] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_ag
|
||||||
]
|
]
|
||||||
).'</a>';
|
).'</a>';
|
||||||
|
|
||||||
if ($tab == 'alert') {
|
if ($tab === 'alert') {
|
||||||
$alerttab['active'] = true;
|
$alerttab['active'] = true;
|
||||||
} else {
|
} else {
|
||||||
$alerttab['active'] = false;
|
$alerttab['active'] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inventory.
|
// 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');
|
$inventorytab = enterprise_hook('inventory_tab');
|
||||||
if ($inventorytab == -1) {
|
if ($inventorytab == -1 || $inventoryCount === 0) {
|
||||||
$inventorytab = '';
|
$inventorytab = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Collection.
|
// Collection.
|
||||||
$collectiontab = enterprise_hook('collection_tab');
|
$collectiontab = enterprise_hook('collection_tab');
|
||||||
if ($collectiontab == -1) {
|
if ($collectiontab == -1) {
|
||||||
|
|
Loading…
Reference in New Issue