fleet/frontend/components/TargetLabelSelector
Scott Gress 096a747739
Ability to add labels to queries (front end) (#26867)
For #26649 

# Checklist for submitter

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.

## Details

This PR adds the ability to select labels when saving or editing a query
in the UI, so that the query will only target hosts with those labels.
It follows the API design from
https://github.com/fleetdm/fleet/pull/26589, utilizing the
`labels_include_any` field. The expectation is that when creating or
updating a query, `labels_include_any` is an array of label names, and
when fetching a single query, `labels_include_any` is an array of
objects with a `name` and an `id` key.

As part of this work the `TargetLabelSelector` component is updated to
allow it to show a message in place of the dropdown when there are no
custom options (e.g. "include any", "include all", "exclude any") to
choose from.
2025-03-12 11:54:29 -07:00
..
_styles.scss UI - Update label chooser empty state (#27019) 2025-03-11 09:37:23 -07:00
index.ts Add UI for scoping software to fleet apps and custom packages via labels (#24793) 2024-12-17 10:41:57 -06:00
TargetLabelSelector.tests.tsx Ability to add labels to queries (front end) (#26867) 2025-03-12 11:54:29 -07:00
TargetLabelSelector.tsx Ability to add labels to queries (front end) (#26867) 2025-03-12 11:54:29 -07:00