Reworked assets table

This commit is contained in:
Matteo Biscosi 2024-12-30 12:37:05 +01:00
parent 24c3745810
commit a63dec0dcc
17 changed files with 544 additions and 486 deletions

View file

@ -19,7 +19,7 @@ end
local ifid = _GET["ifid"] or interface.getId()
local available_filters = asset_management_utils.get_filters(ifid)
local available_filters = asset_management_utils.getFilters(ifid)
local rsp = {}
local filters = {}

View file

@ -29,7 +29,7 @@ local rsp = {
host_info = {}
}
local serial_key = _GET["serial_key"]
local list = asset_management_utils.get_inactive_host_info(ifid, serial_key) or {}
local list = asset_management_utils.getInactiveHostInfo(ifid, serial_key) or {}
-- Check if at least an host is inactive
for _, host_details in pairs(list or {}) do

View file

@ -44,8 +44,8 @@ for key, value in pairs(filters) do
end
end
local tot_inactive_hosts = asset_management_utils.get_total_inactive_hosts(ifid, filters)[1].count
local inactive_hosts = asset_management_utils.get_inactive_hosts(ifid, order, gui_to_db_columns[sort], start, length, filters)
local tot_inactive_hosts = asset_management_utils.getNumInactiveHosts(ifid, filters)[1].count
local inactive_hosts = asset_management_utils.getInactiveHosts(ifid, order, gui_to_db_columns[sort], start, length, filters)
for _, value in pairs(inactive_hosts or {}) do
local record = {}