mirror of
https://github.com/fleetdm/fleet
synced 2026-05-03 21:38:24 +00:00
15 lines
339 B
JavaScript
15 lines
339 B
JavaScript
export const targetFilter = (targetType) => {
|
|
if (targetType === 'all') {
|
|
return { name: 'All Hosts' };
|
|
}
|
|
|
|
if (targetType === 'labels') {
|
|
return (option) => {
|
|
return option.target_type === targetType && option.name !== 'All Hosts';
|
|
};
|
|
}
|
|
|
|
return { target_type: targetType };
|
|
};
|
|
|
|
export default { targetFilter };
|