fleet/frontend/interfaces/platform.ts
gillespi314 deeaf9d036
Add ability to detect compatibility and update which hosts are checked for a policy (#4703)
Add new usePlatformSelector custom hook
Add new usePlatformCompatibility custom hook
Add new PlatformSelector global component
Refactor PlatformCompatibility as global component
Refactor sql_tools to TypeScript
Improve type definitions for context/policy
Align PolicyPage and QueryPage with platform compatibility changes
2022-03-21 11:51:00 -05:00

30 lines
790 B
TypeScript

export type IOsqueryPlatform =
| "darwin"
| "macOS"
| "windows"
| "Windows"
| "linux"
| "Linux"
| "freebsd"
| "FreeBSD";
export type IPlatformString =
| ""
| "darwin"
| "windows"
| "linux"
| "darwin,windows,linux"
| "darwin,windows"
| "darwin,linux"
| "windows,linux";
export const SUPPORTED_PLATFORMS = ["darwin", "windows", "linux"] as const;
// TODO: How do we want to handle checking platform compatibility for extension tables? See template
// "MDM enrolled" policy for example of how this can be an issue where tables are not included in
// osquery_tables.json. One approach would be to maintain a separate constant that lists extension
// tables as below.
export const EXTENSION_TABLES: Record<string, IOsqueryPlatform[]> = {
mdm: ["darwin"],
};