mirror of
https://github.com/fleetdm/fleet
synced 2026-04-22 14:07:19 +00:00
* Renders targets by team * Conditional rendering for no hosts available * Update styling to match figma
15 lines
365 B
JavaScript
15 lines
365 B
JavaScript
export const targetFilter = (targetType) => {
|
|
if (targetType === "all") {
|
|
return { name: "All Hosts" };
|
|
}
|
|
|
|
if (targetType === "labels" || targetType === "teams") {
|
|
return (option) => {
|
|
return option.target_type === targetType && option.name !== "All Hosts";
|
|
};
|
|
}
|
|
|
|
return { target_type: targetType };
|
|
};
|
|
|
|
export default { targetFilter };
|