mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
## Addresses #21855 and all of its subtasks **Frontend:** - Update list queries API call to include pagination and filter-related query params, including new `platform` param for filtering queries by platforms they've been set to target - Convert all filtering, sorting, and pagination functionality of the Manage queries page from client-side to server-side - Remove unneeded variable declarations / logic - Various typing and naming improvements **Server:** - Add new `platform` `ListQueryOption` - Update service and datastore level list queries logic to handle filtering queries by targeted platform - Update service and datastore level list queries logic to include `meta` and `count` fields in addition to filtered/paginated queries - [x] Changes file added for user-visible changes in `changes/`, ` - [x] Added/updated tests - [x] update DB, integration - [x] add integration (pagination) - [x] add integration (platform filter) - [x] add DB (pagination) - [x] add DB (platform filter) - [x] Manual QA for all new/changed functionality --------- Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
38 lines
966 B
TypeScript
38 lines
966 B
TypeScript
import { IFormField } from "./form_field";
|
|
import { IPack } from "./pack";
|
|
import { ISchedulableQuery, ISchedulableQueryStats } from "./schedulable_query";
|
|
|
|
export interface IEditQueryFormData {
|
|
description?: string | number | boolean | undefined;
|
|
name?: string | number | boolean | undefined;
|
|
query?: string | number | boolean | undefined;
|
|
observer_can_run?: string | number | boolean | undefined;
|
|
automations_enabled?: boolean;
|
|
}
|
|
|
|
export interface IStoredQueryResponse {
|
|
query: ISchedulableQuery;
|
|
}
|
|
|
|
export interface IQuery {
|
|
created_at: string;
|
|
updated_at: string;
|
|
id: number;
|
|
name: string;
|
|
description: string;
|
|
query: string;
|
|
saved: boolean;
|
|
author_id: number;
|
|
author_name: string;
|
|
author_email: string;
|
|
observer_can_run: boolean;
|
|
packs: IPack[];
|
|
stats?: ISchedulableQueryStats;
|
|
}
|
|
|
|
export interface IEditQueryFormFields {
|
|
description: IFormField;
|
|
name: IFormField;
|
|
query: IFormField;
|
|
observer_can_run: IFormField;
|
|
}
|