diff --git a/src/frontend/src/modals/flowLogsModal/index.tsx b/src/frontend/src/modals/flowLogsModal/index.tsx index 840de14ca..e19df6588 100644 --- a/src/frontend/src/modals/flowLogsModal/index.tsx +++ b/src/frontend/src/modals/flowLogsModal/index.tsx @@ -2,7 +2,6 @@ import { ColDef, ColGroupDef } from "ag-grid-community"; import { useEffect, useRef, useState } from "react"; import IconComponent from "../../components/genericIconComponent"; import TableComponent from "../../components/tableComponent"; -import { Tabs, TabsList, TabsTrigger } from "../../components/ui/tabs"; import { getMessagesTable, getTransactionTable } from "../../controllers/API"; import useAlertStore from "../../stores/alertStore"; import useFlowStore from "../../stores/flowStore"; @@ -21,49 +20,19 @@ export default function FlowLogsModal({ const [columns, setColumns] = useState>([]); const [rows, setRows] = useState([]); - const [activeTab, setActiveTab] = useState("Executions"); const noticed = useRef(false); useEffect(() => { - if (activeTab === "Executions") { - getTransactionTable(currentFlowId, "union").then((data) => { - const { columns, rows } = data; - setColumns(columns.map((col) => ({ ...col, editable: true }))); - setRows(rows); - }); - } else if (activeTab === "Messages") { - getMessagesTable("union", currentFlowId, ["index", "flow_id"]).then( - (data) => { - const { columns, rows } = data; - setColumns(columns.map((col) => ({ ...col, editable: true }))); - setRows(rows); - } - ); - } - - if (open && activeTab === "Messages" && !noticed.current) { - const haStream = nodes - .map((nodes) => (nodes.data as NodeDataType).node!.template) - .some((template) => template["stream"] && template["stream"].value); - console.log( - haStream, - nodes.map((nodes) => (nodes.data as NodeDataType).node!.template) - ); - if (haStream) { - setNoticeData({ - title: "Streamed messages will not appear in this table.", - }); - noticed.current = true; - } - } - if (!open) { - noticed.current = false; - } - }, [open, activeTab]); + getTransactionTable(currentFlowId, "union").then((data) => { + const { columns, rows } = data; + setColumns(columns.map((col) => ({ ...col, editable: true }))); + setRows(rows); + }); + }, [open]); return ( - +
Logs @@ -73,20 +42,8 @@ export default function FlowLogsModal({
- - - Executions - Messages - -