diff --git a/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx b/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx index 0c4c4258bdd..3e916ca1f04 100644 --- a/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx +++ b/app/scripts/modules/core/src/pipeline/config/stages/script/ScriptExecutionDetails.tsx @@ -1,3 +1,4 @@ +import { RenderOutputFile } from 'core/presentation/RenderOutputFile'; import * as React from 'react'; import { get } from 'lodash'; @@ -32,12 +33,7 @@ export function ScriptExecutionDetails(props: IExecutionDetailsSectionProps) {
{segments.map(renderSegment)}; +}); diff --git a/app/scripts/modules/core/src/presentation/index.ts b/app/scripts/modules/core/src/presentation/index.ts index eea10c632ae..baf8e34bc9a 100644 --- a/app/scripts/modules/core/src/presentation/index.ts +++ b/app/scripts/modules/core/src/presentation/index.ts @@ -5,6 +5,7 @@ export * from './LabelComponent'; export * from './Markdown'; export * from './Placement'; export * from './ReactModal'; +export * from './RenderOutputFile'; export * from './SpanDropdownTrigger'; export * from './TetheredSelect'; export * from './Tooltip'; diff --git a/app/scripts/modules/titus/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx b/app/scripts/modules/titus/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx index 878cd6a2df9..4a6b540b941 100644 --- a/app/scripts/modules/titus/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx +++ b/app/scripts/modules/titus/src/pipeline/stages/runJob/RunJobExecutionDetails.tsx @@ -6,6 +6,7 @@ import { AccountTag, ExecutionDetailsSection, IExecutionDetailsSectionProps, + RenderOutputFile, StageFailureMessage, } from '@spinnaker/core'; @@ -55,20 +56,6 @@ export class RunJobExecutionDetails extends React.Component< const jobId = cluster ? get(context['deploy.jobs'], cluster.region, [])[0] : null; const taskId = get(context, 'jobStatus.completionDetails.taskId'); - const renderProperty = (entry: any) => { - if (typeof entry === 'object' && !Array.isArray(entry)) { - return
{JSON.stringify(entry, null, 2)}; - } - const linkPattern = /^https?:\/\/([^\s])*$/; - return linkPattern.test(entry) ? ( - - {entry} - - ) : ( - {entry} - ); - }; - return (