#13331 added status filter in datatables inventory
This commit is contained in:
parent
6a3c9024e1
commit
68a53b8a57
|
@ -712,6 +712,7 @@ function inventory_get_datatable(
|
||||||
$return_mode=false,
|
$return_mode=false,
|
||||||
$order_by_agent=false,
|
$order_by_agent=false,
|
||||||
$date_init=false,
|
$date_init=false,
|
||||||
|
$status_agent=-1,
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -738,6 +739,10 @@ function inventory_get_datatable(
|
||||||
array_push($where, 'tagent_module_inventory.id_agente IN ('.implode(',', $agents_ids).')');
|
array_push($where, 'tagent_module_inventory.id_agente IN ('.implode(',', $agents_ids).')');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($status_agent > -1) {
|
||||||
|
array_push($where, 'tagente.disabled ='.$status_agent);
|
||||||
|
}
|
||||||
|
|
||||||
if ($inventory_module_name[0] !== '0'
|
if ($inventory_module_name[0] !== '0'
|
||||||
&& $inventory_module_name !== ''
|
&& $inventory_module_name !== ''
|
||||||
&& $inventory_module_name !== 'all'
|
&& $inventory_module_name !== 'all'
|
||||||
|
|
|
@ -466,7 +466,8 @@ if ($is_metaconsole === true) {
|
||||||
$export,
|
$export,
|
||||||
false,
|
false,
|
||||||
$order_by_agent,
|
$order_by_agent,
|
||||||
$date_init
|
$date_init,
|
||||||
|
$status_agent
|
||||||
);
|
);
|
||||||
|
|
||||||
$data_tmp['server_name'] = $connection['server_name'];
|
$data_tmp['server_name'] = $connection['server_name'];
|
||||||
|
@ -515,7 +516,8 @@ if ($is_metaconsole === true) {
|
||||||
$export,
|
$export,
|
||||||
false,
|
false,
|
||||||
$order_by_agent,
|
$order_by_agent,
|
||||||
$date_init
|
$date_init,
|
||||||
|
$status_agent
|
||||||
);
|
);
|
||||||
|
|
||||||
$data_tmp['server_name'] = $server['server_name'];
|
$data_tmp['server_name'] = $server['server_name'];
|
||||||
|
@ -1095,7 +1097,8 @@ if ($inventory_module !== 'basic') {
|
||||||
$export,
|
$export,
|
||||||
false,
|
false,
|
||||||
$order_by_agent,
|
$order_by_agent,
|
||||||
$date_init
|
$date_init,
|
||||||
|
$status_agent
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue