mirror of
https://github.com/fleetdm/fleet
synced 2026-05-21 16:08:47 +00:00
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. |
||
|---|---|---|
| .. | ||
| _styles.scss | ||
| EditQueryForm.tests.tsx | ||
| EditQueryForm.tsx | ||
| index.ts | ||