diff --git a/web/src/components/RunDisplay.tsx b/web/src/components/RunDisplay.tsx index d9b035d..b44815b 100644 --- a/web/src/components/RunDisplay.tsx +++ b/web/src/components/RunDisplay.tsx @@ -1,7 +1,5 @@ -"use client"; - import { LiveStatus } from "./LiveStatus"; -import { callServerPromise } from "./callServerPromise"; +import { RunOutputs } from "@/components/RunOutputs"; import { Dialog, DialogContent, @@ -13,25 +11,24 @@ import { import { TableCell, TableRow } from "@/components/ui/table"; import { getRelativeTime } from "@/lib/getRelativeTime"; import { type findAllRuns } from "@/server/findAllRuns"; -import { getRunsOutputDisplay } from "@/server/getRunsOutput"; -import { useState } from "react"; +import { Suspense } from "react"; -export function RunDisplay({ +export async function RunDisplay({ run, }: { run: Awaited>[0]; }) { - const [view, setView] = useState(); + // const [view, setView] = useState(); return ( { - if (view) return; - const _view = await callServerPromise(getRunsOutputDisplay(run.id)); - setView(_view); - }} + // onClick={async () => { + // if (view) return; + // const _view = await callServerPromise(getRunsOutputDisplay(run.id)); + // setView(_view); + // }} > {run.version?.version} @@ -47,10 +44,12 @@ export function RunDisplay({ You can view your run's outputs here - {/* - - */} -
{view}
+
+ + + +
+ {/*
{view}
*/}
); diff --git a/web/src/components/RunOutputs.tsx b/web/src/components/RunOutputs.tsx index 87e69ce..7b9418a 100644 --- a/web/src/components/RunOutputs.tsx +++ b/web/src/components/RunOutputs.tsx @@ -12,7 +12,7 @@ import { getRunsOutput } from "@/server/getRunsOutput"; export async function RunOutputs({ run_id }: { run_id: string }) { const outputs = await getRunsOutput(run_id); - console.log("Getting runs out put"); + // console.log("Getting runs out put"); // const [outputs, setOutputs] = // useState>>(); diff --git a/web/src/server/findAllRuns.tsx b/web/src/server/findAllRuns.tsx index af2da80..912ef9b 100644 --- a/web/src/server/findAllRuns.tsx +++ b/web/src/server/findAllRuns.tsx @@ -6,6 +6,7 @@ export async function findAllRuns(workflow_id: string) { return await db.query.workflowRunsTable.findMany({ where: eq(workflowRunsTable.workflow_id, workflow_id), orderBy: desc(workflowRunsTable.created_at), + limit: 10, with: { machine: { columns: {