2023-07-13 19:04:08 +00:00
|
|
|
// "SchedulableQuery" to be used in developing frontend for #7765
|
|
|
|
|
|
|
|
import { ISchedulableQuery } from "interfaces/schedulable_query";
|
|
|
|
|
|
|
|
const DEFAULT_SCHEDULABLE_QUERY_MOCK: ISchedulableQuery = {
|
|
|
|
created_at: "2022-11-03T17:22:14Z",
|
|
|
|
updated_at: "2022-11-03T17:22:14Z",
|
|
|
|
id: 1,
|
|
|
|
name: "Test Query",
|
|
|
|
description: "A test query",
|
|
|
|
query: "SELECT * FROM users",
|
|
|
|
team_id: null,
|
2023-07-18 21:10:45 +00:00
|
|
|
interval: 43200, // Every 12 hours
|
2023-07-13 19:04:08 +00:00
|
|
|
platform: "darwin,windows,linux",
|
|
|
|
min_osquery_version: "",
|
|
|
|
automations_enabled: true,
|
|
|
|
logging: "snapshot",
|
|
|
|
saved: true,
|
|
|
|
author_id: 1,
|
|
|
|
author_name: "Test User",
|
|
|
|
author_email: "test@example.com",
|
|
|
|
observer_can_run: false,
|
2023-10-04 22:19:26 +00:00
|
|
|
discard_data: false,
|
2023-07-13 19:04:08 +00:00
|
|
|
packs: [],
|
|
|
|
stats: {
|
2023-07-18 21:10:45 +00:00
|
|
|
system_time_p50: 28.1053,
|
|
|
|
system_time_p95: 397.6667,
|
|
|
|
user_time_p50: 29.9412,
|
|
|
|
user_time_p95: 251.4615,
|
|
|
|
total_executions: 5746,
|
2023-07-13 19:04:08 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
const createMockSchedulableQuery = (
|
|
|
|
overrides?: Partial<ISchedulableQuery>
|
|
|
|
): ISchedulableQuery => {
|
|
|
|
return { ...DEFAULT_SCHEDULABLE_QUERY_MOCK, ...overrides };
|
|
|
|
};
|
|
|
|
|
|
|
|
export default createMockSchedulableQuery;
|