mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
For #24601 - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - Click pencil - Edit script - Save - Check script was saved - Check activities - [x] Manual QA for all new/changed functionality
28 lines
803 B
TypeScript
28 lines
803 B
TypeScript
import { HOST_LINUX_PLATFORMS } from "./platform";
|
|
|
|
export interface IScript {
|
|
id: number;
|
|
team_id: number | null;
|
|
name: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export const isScriptSupportedPlatform = (hostPlatform: string) =>
|
|
["darwin", "windows", ...HOST_LINUX_PLATFORMS].includes(hostPlatform); // excludes chrome, ios, ipados see also https://github.com/fleetdm/fleet/blob/5a21e2cfb029053ddad0508869eb9f1f23997bf2/server/fleet/hosts.go#L775
|
|
|
|
export type IScriptExecutionStatus = "ran" | "pending" | "error";
|
|
|
|
export interface ILastExecution {
|
|
execution_id: string;
|
|
executed_at: string;
|
|
status: IScriptExecutionStatus;
|
|
}
|
|
|
|
export type ScriptContent = string;
|
|
|
|
export interface IHostScript {
|
|
script_id: number;
|
|
name: string;
|
|
last_execution: ILastExecution | null;
|
|
}
|