feat(ui): workflow logs
This commit is contained in:
7
ui/src/domain/workflowLog.ts
Normal file
7
ui/src/domain/workflowLog.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface WorkflowLogModel extends Omit<BaseModel, "updated"> {
|
||||
nodeId: string;
|
||||
nodeName: string;
|
||||
level: "DEBUG" | "INFO" | "WARN" | "ERROR";
|
||||
message: string;
|
||||
data: Record<string, any>;
|
||||
}
|
||||
@@ -6,27 +6,12 @@ export interface WorkflowRunModel extends BaseModel {
|
||||
trigger: string;
|
||||
startedAt: ISO8601String;
|
||||
endedAt: ISO8601String;
|
||||
logs?: WorkflowRunLog[];
|
||||
error?: string;
|
||||
expand?: {
|
||||
workflowId?: WorkflowModel;
|
||||
workflowId?: WorkflowModel; // TODO: ugly, maybe to use an alias?
|
||||
};
|
||||
}
|
||||
|
||||
export type WorkflowRunLog = {
|
||||
nodeId: string;
|
||||
nodeName: string;
|
||||
records?: WorkflowRunLogRecord[];
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export type WorkflowRunLogRecord = {
|
||||
time: ISO8601String;
|
||||
level: string;
|
||||
content: string;
|
||||
error?: string;
|
||||
};
|
||||
|
||||
export const WORKFLOW_RUN_STATUSES = Object.freeze({
|
||||
PENDING: "pending",
|
||||
RUNNING: "running",
|
||||
|
||||
Reference in New Issue
Block a user