Skip to content

Commit

Permalink
HPCC-30316 ECL Watch v9 TargetGroupField filter options by Kind
Browse files Browse the repository at this point in the history
should filter options the same as loadClusterGroups() in TargetSelectClass.js

Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Sep 20, 2023
1 parent 8f13dbf commit d6aef9f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions esp/src/src-react/components/forms/Fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,17 @@ export const TargetGroupTextField: React.FunctionComponent<TargetGroupTextFieldP

React.useEffect(() => {
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));
}, []);
Expand Down

0 comments on commit d6aef9f

Please sign in to comment.