From ffccacb86907b1392134f1f41cf179a93a9315df Mon Sep 17 00:00:00 2001 From: breeg554 Date: Fri, 13 Dec 2024 15:01:22 +0100 Subject: [PATCH] update logs messages --- apps/web-remix/app/api/pipeline/pipeline.contracts.ts | 1 + .../build/BuilderSidebar/BuilderBottomSidebar.tsx | 11 +++++++++++ .../app/components/pages/pipelines/runLogs/page.tsx | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/web-remix/app/api/pipeline/pipeline.contracts.ts b/apps/web-remix/app/api/pipeline/pipeline.contracts.ts index a6f51aa1..2733cfbb 100644 --- a/apps/web-remix/app/api/pipeline/pipeline.contracts.ts +++ b/apps/web-remix/app/api/pipeline/pipeline.contracts.ts @@ -185,6 +185,7 @@ export const ExtendedPipeline = z.object({ organization_id: z.number(), runs_count: z.number(), interface_config: SafeInterfaceConfig, + logs_enabled: z.boolean().optional(), config: z.object({ version: z.string(), blocks: z.array(ExtendedBlockConfig), diff --git a/apps/web-remix/app/components/pages/pipelines/build/BuilderSidebar/BuilderBottomSidebar.tsx b/apps/web-remix/app/components/pages/pipelines/build/BuilderSidebar/BuilderBottomSidebar.tsx index dd0e8d21..76495bc3 100644 --- a/apps/web-remix/app/components/pages/pipelines/build/BuilderSidebar/BuilderBottomSidebar.tsx +++ b/apps/web-remix/app/components/pages/pipelines/build/BuilderSidebar/BuilderBottomSidebar.tsx @@ -12,6 +12,7 @@ import { LogBlockName, LogDate, LogMessage, + LogsEmptyMessage, LogsLoadMoreWrapper, LogsWrapper, LogTopic, @@ -237,6 +238,16 @@ function SidebarLogs({ } }, [selectedNode?.id]); + if (!pipeline.logs_enabled) { + return ( + + ); + } + if (isStarting) { return ( diff --git a/apps/web-remix/app/components/pages/pipelines/runLogs/page.tsx b/apps/web-remix/app/components/pages/pipelines/runLogs/page.tsx index 73db1476..137c8c1b 100644 --- a/apps/web-remix/app/components/pages/pipelines/runLogs/page.tsx +++ b/apps/web-remix/app/components/pages/pipelines/runLogs/page.tsx @@ -61,7 +61,7 @@ export function PipelineRunLogs() { })); }, [pipelineRun.config.blocks]); - if (pagination.total === 0 && !blockName) { + if (pagination.total === 0 && !blockName && !pipeline.logs_enabled) { return (