Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions web/src/components/core/code/MqCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ interface OwnProps {
}

const MqCode: React.FC<OwnProps> = ({ code, description, language }) => {
if (!code) {
return null
}
return (
<Box>
{description && (
Expand Down
13 changes: 13 additions & 0 deletions web/src/components/jobs/RunInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ export interface SqlFacet {
query: string
}

export interface SourceCodeFacet {
language: string
sourceCode: string
_producer: string
_schemaURL: string
}

type RunInfoProps = {
run: Run
} & JobFacetsProps &
Expand All @@ -52,6 +59,12 @@ const RunInfo: FunctionComponent<RunInfoProps> = (props) => {
return (
<Box>
{<MqCode code={(jobFacets?.sql as SqlFacet)?.query} language={'sql'} />}
{
<MqCode
code={(jobFacets.sourceCode as SourceCodeFacet)?.sourceCode}
language={(jobFacets.sourceCode as SourceCodeFacet)?.language}
/>
}
{run.facets && (
<Box mt={2}>
<Box mb={1}>
Expand Down