fleet/frontend/components/TargetLabelSelector
Scott Gress d6eaa0913a
Add ability to target labels on policies (#27599)
For #27276 

# 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/27196, utilizing the
labels_include_any and labels_exclude_any fields. The expectation is
that when creating or updating a query, labels_include_any and
labels_exclude_any are arrays of label names, and when fetching a single
query, they are arrays of objects with a name and an id key.

Other updates in this PR:

* Removed colons from various headings on the Save Policy Modal and Edit
Policy form
* Updated the "Delete label" text
* Removed "Policy runs on all hosts with these platforms." subheading
underneath the platform selector
* TargetLabelSelector component now has `suppressTitle` flag to turn off
the "Target" title.
2025-04-02 16:31:03 -05:00
..
_styles.scss UI - make label chooser styling more flexible (#27054) 2025-03-12 16:07:10 -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 Add ability to target labels on policies (#27599) 2025-04-02 16:31:03 -05:00
TargetLabelSelector.tsx Add ability to target labels on policies (#27599) 2025-04-02 16:31:03 -05:00