Skip to content

Commit

Permalink
update logs messages
Browse files Browse the repository at this point in the history
  • Loading branch information
breeg554 committed Dec 13, 2024
1 parent c96ffdb commit ffccacb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/web-remix/app/api/pipeline/pipeline.contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
LogBlockName,
LogDate,
LogMessage,
LogsEmptyMessage,
LogsLoadMoreWrapper,
LogsWrapper,
LogTopic,
Expand Down Expand Up @@ -237,6 +238,16 @@ function SidebarLogs({
}
}, [selectedNode?.id]);

if (!pipeline.logs_enabled) {
return (
<LogsEmptyMessage
organizationId={pipeline.organization_id}
pipelineId={pipeline.id}
className="text-xs mt-4"
/>
);
}

if (isStarting) {
return (
<EmptyMessage className="text-xs mx-auto block w-fit mt-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export function PipelineRunLogs() {
}));
}, [pipelineRun.config.blocks]);

if (pagination.total === 0 && !blockName) {
if (pagination.total === 0 && !blockName && !pipeline.logs_enabled) {
return (
<LogsEmptyMessage
organizationId={pipeline.organization_id}
Expand Down

0 comments on commit ffccacb

Please sign in to comment.