fix conflicts 2

This commit is contained in:
Jordi Enric committed 2024-10-29 12:08:40 +01:00
commit e3f99ecbcb
3 files changed
+18 -39

No files matched your search

@@ -235,30 +235,11 @@ export const BranchRow = ({
</Link>
</Button>
{branchingWorkflowLogsEnabled && (
<ButtonTooltip
type="default"
asChild
disabled={branch.status === 'CREATING_PROJECT'}
tooltip={{
content: {
side: 'bottom',
text:
branch.status === 'CREATING_PROJECT'
? 'Branch is still creating. Logs will be available once the branch is active'
: undefined,
},
}}
>
<Link
href={
branch.status === 'CREATING_PROJECT'
? '#'
: `/project/${branch.project_ref}/logs/workflow-run-logs`
}
>
<Button type="default" asChild>
<Link href={`/project/${branch.project_ref}/logs/workflow-run-logs`}>
View Logs
</Link>
</ButtonTooltip>
</Button>
)}
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
@@ -1,5 +1,4 @@
import { LOGS_TAILWIND_CLASSES } from '../Logs.constants'
import type { PreviewLogData } from '../Logs.types'
import {
IDFormatter,
jsonSyntaxHighlight,
@@ -7,35 +6,33 @@ import {
SelectionDetailedTimestampRow,
} from '../LogsFormatters'
const WorkflowRunSelectionRenderer = ({ log }: { log: PreviewLogData }) => {
console.log('log:', log)
const WorkflowRunSelectionRenderer = ({
log,
}: {
log: {
event_message: string
timestamp: number
id: string
workflow_run?: string
}
}) => {
return (
<div className={`${LOGS_TAILWIND_CLASSES.log_selection_x_padding} space-y-6`}>
<div className="flex flex-col gap-3">
<h3 className="text-foreground-lighter text-sm">Event Message</h3>
<div className="text-xs text-wrap font-mono text-foreground whitespace-pre-wrap overflow-x-auto">
{log.metadata?.msg || log.event_message}
{log.event_message}
</div>
</div>
<SelectionDetailedTimestampRow value={log.timestamp} />
{log.metadata?.workflow_run && (
{log.workflow_run && (
<SelectionDetailedRow
label="Workflow Run ID"
value={String(log.metadata?.workflow_run)}
valueRender={<IDFormatter value={log.metadata?.workflow_run} />}
value={String(log.workflow_run)}
valueRender={<IDFormatter value={log.workflow_run} />}
/>
)}
<div className="flex flex-col gap-3">
<h3 className="text-foreground-lighter text-sm">Metadata</h3>
<pre
className=" className={`text-foreground col-span-8 overflow-x-auto text-xs font-mono`}"
dangerouslySetInnerHTML={{
__html: jsonSyntaxHighlight(log.metadata!),
}}
/>
</div>
</div>
)
}
@@ -35,6 +35,7 @@ export interface PreviewLogData extends CustomLogData {
timestamp: number
event_message: string
metadata?: Metadata
workflow_run?: string
}
export type LogData = CustomLogData & PreviewLogData