From c176f6a8e630447c1ed45fff2fb3745005da2640 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Fri, 10 Mar 2023 12:37:47 -0500 Subject: [PATCH] fix(ESSNTL-4404): global filters and tags Before, if you applied a global filter (workloads, sids, tags), the inventory table did not reflect the filter. Now global filters are applied to the table and work together with table filters. --- src/api/api.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/api.js b/src/api/api.js index 63c97f217..64ff7f9b0 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -182,8 +182,8 @@ export async function getEntities(items, { orderDirection, filters.staleFilter, [ - ...constructTags(filters.tagFilters), - ...options.tags || [] + ...constructTags(filters?.tagFilters), + ...options?.globalFilter?.tags || [] ], filters?.registeredWithFilter, undefined, @@ -191,6 +191,7 @@ export async function getEntities(items, { { cancelToken: controller && controller.token, query: { + ...(options?.globalFilter?.filter && generateFilter(options.globalFilter.filter)), ...(options.filter && Object.keys(options.filter).length && generateFilter(options.filter)), ...(calculateSystemProfile(filters)), ...(fields && Object.keys(fields).length && generateFilter(fields, 'fields')),