Files
model-platform/frontend/app/features/schedules/constants.ts
T
2026-08-05 15:58:18 +08:00

37 lines
877 B
TypeScript

// 调度页面常量
export const CANVAS_WIDTH = 1400;
export const CANVAS_HEIGHT = 860;
export const NODE_WIDTH = 218;
export const NODE_HEIGHT = 104;
export const ARTIFACT_MIME = "application/x-model-platform-version";
export const EMPTY_SCHEDULE_FORM = {
scheduleName: "",
description: "",
triggerType: "manual" as "manual" | "cron" | "api",
cronExpression: "0 9 * * *",
timezone: "Asia/Shanghai",
enabled: false,
maxConcurrency: "1",
failurePolicy: "stop" as "stop" | "continue",
};
export const EMPTY_NODE_FORM = {
nodeName: "",
timeoutSeconds: "600",
retryCount: "0",
retryIntervalSec: "5",
argumentsJson: "{}",
envRefsJson: "{}",
};
export const RUN_STATUS_LABELS: Record<string, string> = {
queued: "排队中",
running: "运行中",
succeeded: "成功",
failed: "失败",
cancelled: "已取消",
timed_out: "已超时",
};