mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
348bcd4263
Added tooltip to Policies page stating when policy counts were last updated. #15323 # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [x] Manual QA for all new/changed functionality
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { IPolicyStats } from "interfaces/policy";
|
|
|
|
const DEFAULT_POLICY_MOCK: IPolicyStats = {
|
|
id: 1,
|
|
name: "Antivirus healthy (Linux)",
|
|
query:
|
|
"SELECT score FROM (SELECT case when COUNT(*) = 2 then 1 ELSE 0 END AS score FROM processes WHERE (name = 'clamd') OR (name = 'freshclam')) WHERE score == 1;",
|
|
critical: false,
|
|
description:
|
|
"Checks that both ClamAV's daemon and its updater service (freshclam) are running.",
|
|
author_id: 1,
|
|
author_name: "Test User",
|
|
author_email: "test@user.com",
|
|
team_id: undefined,
|
|
resolution: "Ensure ClamAV and Freshclam are installed and running.",
|
|
platform: "linux" as const,
|
|
created_at: "2023-03-24T22:13:59Z",
|
|
updated_at: "2023-03-31T19:05:13Z",
|
|
passing_host_count: 0,
|
|
failing_host_count: 8,
|
|
host_count_updated_at: "2023-11-30T19:05:13Z",
|
|
webhook: "Off",
|
|
has_run: true,
|
|
next_update_ms: 3600000,
|
|
};
|
|
|
|
const createMockPolicy = (overrides?: Partial<IPolicyStats>): IPolicyStats => {
|
|
return { ...DEFAULT_POLICY_MOCK, ...overrides };
|
|
};
|
|
|
|
export default createMockPolicy;
|