fleet/frontend/pages/queries/edit/components/EditQueryForm
Scott Gress d0a47fb25e
Update save/edit query forms to be consistent with save/edit policy (#27821)
For #27601 

## Details

A couple of updates to the save/edit Query screens to bring them in line
with how save/edit Policy screens work, as described in [the
Figma](https://www.figma.com/design/LzGmucdJQgbQCuHMZhGKCM/-24097-Custom-targets--labels--for-policies?node-id=2-130&p=f&t=9iFB2FRnIkn98NSg-0):

* Moved platform selector out from under Advanced
* Use checkboxes for selecting platforms
* Disable Save button when no platforms are selected
* In the "Save new query" modal, pre-select the platforms that are
compatible with the query

## Testing

1. Add a new query with the SQL "SELECT * FROM privacy_preferences;".
Verify that only ChromeOS is checked in the modal when you click Save.
2. Verify that if you deselect ChromeOS (so that no platforms are
selected), the save button is disabled in the modal.
3. Select one or more platforms and save the query.
4. After saving the query, edit it and verify that the platforms you
selected are checked.
5. Verify that deselecting all platforms disables the edit button on the
Edit Query screen.
6. Select different platforms, save, and refresh to verify that the
platforms you selected were persisted.
2025-04-08 08:31:58 -05:00
..
_styles.scss UI - GitOps mode, part 2 (#26509) 2025-02-21 12:22:08 -08:00
EditQueryForm.tests.tsx Ability to add labels to queries (front end) (#26867) 2025-03-12 11:54:29 -07:00
EditQueryForm.tsx Update save/edit query forms to be consistent with save/edit policy (#27821) 2025-04-08 08:31:58 -05:00
index.ts UI – Componentize "Discard data" option and add it to Edit Query page (#14343) 2023-10-09 11:31:31 -07:00