Skip to content

Commit

Permalink
Added reference about rerun job
Browse files Browse the repository at this point in the history
  • Loading branch information
satr committed Oct 16, 2023
1 parent 52c9f29 commit b9d80da
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/job-overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,20 @@ export const JobOverview: FunctionComponent<JobOverviewProps> = ({
{getExecutionState(job.status)} pipeline{' '}
<strong>{job.pipeline}</strong>
</Typography>
{job.rerunFromJob && (
<Typography>
Rerun from job{' '}
<Link
to={routeWithParams(routes.appJob, {
appName: appName,
jobName: job.rerunFromJob,
})}
className="job-ref-link"
>
{smallJobName(job.rerunFromJob)}
</Link>
</Typography>
)}
{job.pipeline === 'promote' && (
<Typography>
Deployment{' '}
Expand Down
6 changes: 6 additions & 0 deletions src/components/job-overview/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@
padding-top: var(--eds_spacing_medium_small);
justify-self: right;
}

.job-ref-link,
.job-ref-link span {
color: var(--eds_interactive_primary__resting);
text-decoration: none;
}
2 changes: 2 additions & 0 deletions src/models/radix-api/jobs/job/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface JobModel {
steps?: Array<StepModel>;
deployments?: Array<DeploymentSummaryModel>;
components?: Array<ComponentSummaryModel>;
rerunFromJob?: string;
}

/* PropTypes validation map for JobModel */
Expand Down Expand Up @@ -56,4 +57,5 @@ export const JobModelValidationMap: PropTypes.ValidationMap<JobModel> = {
ComponentSummaryModelValidationMap
) as PropTypes.Validator<ComponentSummaryModel>
),
rerunFromJob: PropTypes.string,
};
2 changes: 2 additions & 0 deletions src/models/radix-api/jobs/job/test-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const testData: TestDependencyDataType<JobModel> = [
promotedDeploymentName: 'comp-abc123',
promotedFromEnvironment: 'dev',
promotedToEnvironment: 'qa',
rerunFromJob: 'job-abc',
},
{
__testDescription: 'Valid partial object',
Expand All @@ -55,6 +56,7 @@ export const testData: TestDependencyDataType<JobModel> = [
steps: [stepData[0]],
deployments: [deploymentSummaryData[0]],
components: [componentSummaryData[0]],
rerunFromJob: 'job-abc',
},
{
__testDescription: 'Invalid partial object',
Expand Down

0 comments on commit b9d80da

Please sign in to comment.