feat: add timeout and run_log
This commit is contained in:
@@ -16,7 +16,7 @@ export function LiveStatus({
|
||||
(state) =>
|
||||
state.data
|
||||
.filter((x) => x.id === run.id)
|
||||
.sort((a, b) => b.timestamp - a.timestamp)?.[0]
|
||||
.sort((a, b) => b.timestamp - a.timestamp)?.[0],
|
||||
);
|
||||
|
||||
let status = run.status;
|
||||
@@ -51,7 +51,9 @@ export function LiveStatus({
|
||||
<>
|
||||
<TableCell>
|
||||
{data && status != "success"
|
||||
? `${data.json.event} - ${data.json.data.node}`
|
||||
? `${data.json.event}${
|
||||
data.json.data.node ? " - " + data.json.data.node : ""
|
||||
}`
|
||||
: "-"}
|
||||
</TableCell>
|
||||
<TableCell className="truncate text-right">
|
||||
|
||||
@@ -19,6 +19,7 @@ import { getDuration, getRelativeTime } from "@/lib/getRelativeTime";
|
||||
import { type findAllRuns } from "@/server/findAllRuns";
|
||||
import { Suspense } from "react";
|
||||
import { LiveStatus } from "./LiveStatus";
|
||||
import { LogsType, LogsViewer } from "@/components/LogsViewer";
|
||||
|
||||
export async function RunDisplay({
|
||||
run,
|
||||
@@ -75,6 +76,9 @@ export async function RunDisplay({
|
||||
<RunInputs run={run} />
|
||||
<Suspense>
|
||||
<RunOutputs run_id={run.id} />
|
||||
{run.run_log && (
|
||||
<LogsViewer logs={JSON.parse(run.run_log) as LogsType} />
|
||||
)}
|
||||
</Suspense>
|
||||
</div>
|
||||
{/* <div className="max-h-96 overflow-y-scroll">{view}</div> */}
|
||||
|
||||
@@ -17,6 +17,8 @@ export function StatusBadge({
|
||||
);
|
||||
case "success":
|
||||
return <Badge variant="success">{status}</Badge>;
|
||||
case "timeout":
|
||||
return <Badge variant="amber">{status}</Badge>;
|
||||
case "failed":
|
||||
return <Badge variant="destructive">{status}</Badge>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user