diff --git a/src/app/Shared/Redux/Filters/TopologyFilterSlice.tsx b/src/app/Shared/Redux/Filters/TopologyFilterSlice.tsx index f6907a4ed..0ce046b37 100644 --- a/src/app/Shared/Redux/Filters/TopologyFilterSlice.tsx +++ b/src/app/Shared/Redux/Filters/TopologyFilterSlice.tsx @@ -104,6 +104,7 @@ export interface TopologyFilters { targetFilters: { category: string; filters: { + Agent: string[]; Alias: string[]; ConnectionUrl: string[]; JvmId: string[]; @@ -119,6 +120,8 @@ export const categoryToNodeField = (filterCategory: string): keyof EnvironmentNo return 'name'; case 'Label': return 'labels'; + case 'Agent': + return 'agent'; case 'Annotation': return 'annotations'; case 'JvmId': @@ -139,6 +142,7 @@ export const defaultEmptyGroupFilters = { export const defaultEmptyTargetFilters = { // Below will be taken from node.target + Agent: [], Alias: [], ConnectionUrl: [], JvmId: [], diff --git a/src/app/Topology/Shared/utils.tsx b/src/app/Topology/Shared/utils.tsx index 9a8dc9b5f..5901670bb 100644 --- a/src/app/Topology/Shared/utils.tsx +++ b/src/app/Topology/Shared/utils.tsx @@ -120,6 +120,9 @@ export const isTargetNodeFiltered = ({ target }: TargetNode, filters?: TopologyF return true; } let matched = true; + if (filters.Agent && filters.Agent.length) { + matched = matched && filters.Agent.includes(target.agent.toString()); + } if (filters.Alias && filters.Alias.length) { matched = matched && filters.Alias.includes(target.alias); }