From c2bf5ff927bc7e0c04662abd5636d93c11221748 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Wed, 5 Jun 2024 16:38:38 -0300 Subject: [PATCH] update to new backend format --- .../recordsOutputComponent/index.tsx | 4 +-- .../components/switchOutputView/index.tsx | 27 ++++++++++++++++++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/components/recordsOutputComponent/index.tsx b/src/frontend/src/components/recordsOutputComponent/index.tsx index fb4bec505..8f6b9973f 100644 --- a/src/frontend/src/components/recordsOutputComponent/index.tsx +++ b/src/frontend/src/components/recordsOutputComponent/index.tsx @@ -8,14 +8,12 @@ function RecordsOutputComponent({ pagination, rows, columnMode = "union", - columnDefsRow, }: { pagination: boolean; rows: any; columnMode?: "intersection" | "union"; - columnDefsRow?: Array; }) { - const columns = extractColumnsFromRows(columnDefsRow ?? rows, columnMode); + const columns = extractColumnsFromRows(rows, columnMode); const columnDefs = columns.map((col, idx) => ({ ...col, diff --git a/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx b/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx index 90f7df225..21004dbc4 100644 --- a/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx +++ b/src/frontend/src/customNodes/genericNode/components/outputModal/components/switchOutputView/index.tsx @@ -1,4 +1,10 @@ +import ForwardedIconComponent from "../../../../../../components/genericIconComponent"; import RecordsOutputComponent from "../../../../../../components/recordsOutputComponent"; +import { + Alert, + AlertDescription, + AlertTitle, +} from "../../../../../../components/ui/alert"; import { Case } from "../../../../../../shared/components/caseComponent"; import TextOutputView from "../../../../../../shared/components/textOutputView"; import useFlowStore from "../../../../../../stores/flowStore"; @@ -17,7 +23,10 @@ export default function SwitchOutputView(nodeId): JSX.Element { const results = flowPoolNode?.data?.logs[0] ?? ""; const resultType = results?.type; - const resultMessage = results?.message; + let resultMessage = results?.message; + if (resultMessage.raw) { + resultMessage = resultMessage.raw; + } console.log("resultType", results); return ( <> @@ -60,6 +69,22 @@ export default function SwitchOutputView(nodeId): JSX.Element { /> )} + +
+ + + {"Streaming is not supported"} + + { + "Use the playground to interact with components that stream data" + } + + +
+
); }