fleet/frontend/interfaces/query_stats.ts
Jacob Shandling bb56e288e5
UI – 14415 frontend - host details (#15437)
## Addresses the first major part of #15011 (item 2) – Host Details >
Queries tab

<img width="1274" alt="Screenshot 2023-12-04 at 1 09 31 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/47075ebb-eb98-48f5-82ab-af4022932376">
<img width="678" alt="Screenshot 2023-12-04 at 1 09 57 PM"
src="https://github.com/fleetdm/fleet/assets/61553566/db48ca6d-e73b-4a90-b782-f9ee265927f1">

- [x] Added/updated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-12-05 13:58:02 -08:00

47 lines
1.2 KiB
TypeScript

import PropTypes, { number } from "prop-types";
import scheduledQueryStatsInterface, {
IScheduledQueryStats,
} from "./scheduled_query_stats";
export default PropTypes.shape({
scheduled_query_name: PropTypes.string,
scheduled_query_id: PropTypes.number,
query_name: PropTypes.string,
description: PropTypes.string,
pack_name: PropTypes.string,
pack_id: PropTypes.number,
average_memory: number,
denylisted: PropTypes.bool,
executions: PropTypes.number,
interval: PropTypes.number,
last_executed: PropTypes.string,
output_size: PropTypes.number,
system_time: PropTypes.number,
user_time: PropTypes.number,
wall_time: PropTypes.number,
stats: scheduledQueryStatsInterface,
});
export interface IQueryStats {
scheduled_query_name: string;
scheduled_query_id: number;
query_name: string;
discard_data: boolean;
last_fetched: string | null; // timestamp
automations_enabled: boolean;
description: string;
pack_name: string;
pack_id: number;
average_memory: number;
denylisted: boolean;
executions: number;
interval: number;
last_executed: string;
output_size?: number;
system_time: number;
user_time: number;
wall_time?: number;
stats?: IScheduledQueryStats;
}