From d6aef9f7511083bcc131e91ef0e3a1a835cdd83d Mon Sep 17 00:00:00 2001 From: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:28:59 -0400 Subject: [PATCH] HPCC-30316 ECL Watch v9 TargetGroupField filter options by Kind should filter options the same as loadClusterGroups() in TargetSelectClass.js Signed-off-by: Jeremy Clements <79224539+jeclrsg@users.noreply.github.com> --- esp/src/src-react/components/forms/Fields.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/esp/src/src-react/components/forms/Fields.tsx b/esp/src/src-react/components/forms/Fields.tsx index 3d191882b36..352c73ea87a 100644 --- a/esp/src/src-react/components/forms/Fields.tsx +++ b/esp/src/src-react/components/forms/Fields.tsx @@ -490,11 +490,17 @@ export const TargetGroupTextField: React.FunctionComponent { TpGroupQuery({}).then(({ TpGroupQueryResponse }) => { - setTargetGroups(TpGroupQueryResponse.TpGroups.TpGroup.map(n => { - return { - key: n.Name, - text: n.Name + (n.Name !== n.Kind ? ` (${n.Kind})` : "") - }; + setTargetGroups(TpGroupQueryResponse.TpGroups.TpGroup.map(group => { + switch (group?.Kind) { + case "Thor": + case "hthor": + case "Roxie": + case "Plane": + return { + key: group.Name, + text: group.Name + (group.Name !== group.Kind ? ` (${group.Kind})` : "") + }; + } })); }).catch(err => logger.error(err)); }, []);