fleet/frontend/interfaces/query_report.ts
RachelElysia a85f399cac
Fleet UI: Query report (table, buttons, api calls, etc) (#14325)
## Issue
Cerra #13472 

## Description
- Surface query report on the `/queries/{id}` route
- Include table buttons to show query and export query
- Include results count
- Clientside sorting and filtering for columns
- Add mock data to frontend integration mocks and to API mocks for
concurrent development
- 331 + 351 + 2 = 684 lines of code is just mocking data and not actual
changes
- If modifying sorting/filter, modify the exported results
sorting/filter as well
- Last fetched column is sentence cased, sortable by chronological order
and not alpha order of the readable string (e.g., "a year ago" should be
sorted _after_ "over 1 month ago" if sorted most recent to oldest even
though a comes before o in the alphabet)

## Screen recordings (Uses mock data)


https://github.com/fleetdm/fleet/assets/71795832/22766f2b-3387-4a95-b505-b530dda582fa



https://github.com/fleetdm/fleet/assets/71795832/5c2cd8cc-d00e-4ead-b111-e3b33cb7c955



# Checklist for submitter

If some of the following don't apply, delete the relevant line.

- TODO for QA: Added/updated E2E tests (consider testing some of the
features mentioned in the description)
- [x] Manual QA for all new/changed functionality
2023-10-09 13:38:34 -07:00

13 lines
230 B
TypeScript

export interface IQueryReportResultRow {
host_id: number;
host_name: string;
last_fetched: string;
columns: any;
}
// Query report
export interface IQueryReport {
query_id: number;
results: IQueryReportResultRow[];
}