mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 06:48:54 +00:00
Query UI Bug: Query checkbox now reset on delete (#3203)
This commit is contained in:
parent
c5375263b6
commit
10dbfaad86
5 changed files with 14 additions and 10 deletions
3
changes/issue-3196-fix-query-checkbox-bug
Normal file
3
changes/issue-3196-fix-query-checkbox-bug
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
* Policies now have proprietary queries and are managed independently from the saved queries.
|
||||
* Amended policy creation API to support proprietary queries.
|
||||
* Bug fix: Query checkboxes now reset upon deleting a query
|
||||
|
|
@ -30,7 +30,7 @@ const RemovePackQueryModal = ({
|
|||
<Button
|
||||
className={`${baseClass}__btn`}
|
||||
onClick={onCancel}
|
||||
variant="inverse"
|
||||
variant="inverse-alert"
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -144,7 +144,8 @@ const ManageQueriesPage = (): JSX.Element => {
|
|||
const queryOrQueries = selectedQueryIds.length === 1 ? "query" : "queries";
|
||||
|
||||
const promises = selectedQueryIds.map((id: number) => {
|
||||
return fleetQueriesAPI.destroy(id);
|
||||
fleetQueriesAPI.destroy(id);
|
||||
return null;
|
||||
});
|
||||
|
||||
return Promise.all(promises)
|
||||
|
|
|
|||
|
|
@ -19,13 +19,6 @@ const RemoveQueryModal = ({
|
|||
<div className={baseClass}>
|
||||
Are you sure you want to delete the selected queries?
|
||||
<div className={`${baseClass}__btn-wrap`}>
|
||||
<Button
|
||||
className={`${baseClass}__btn`}
|
||||
onClick={onCancel}
|
||||
variant="inverse-alert"
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
className={`${baseClass}__btn`}
|
||||
type="button"
|
||||
|
|
@ -34,6 +27,13 @@ const RemoveQueryModal = ({
|
|||
>
|
||||
Delete
|
||||
</Button>
|
||||
<Button
|
||||
className={`${baseClass}__btn`}
|
||||
onClick={onCancel}
|
||||
variant="inverse-alert"
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
&__btn-wrap {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
justify-content: row-reverse;
|
||||
margin-top: $pad-xxlarge;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue