Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onReexecuteStep &&
[IStepState.FAILED, IStepState.SUCCEEDED].includes(state)
)
) {
return null;
}
// if execution artifacts are not persisted, we can reexecute but we want to communicate
// that we could if configuration was changed
if (!executionArtifactsPersisted) {
return (
);
}
return (
onReexecuteStep(stepKey)}
>
);
}case GradingStatuses.grading:
iconName = IconNames.TIME;
intent = Intent.WARNING;
tooltip = 'Grading in progress';
break;
case GradingStatuses.none:
iconName = IconNames.CROSS;
intent = Intent.DANGER;
tooltip = 'Not graded yet';
break;
default:
// Shows default icon if this assessment is ungraded
iconName = IconNames.DISABLE;
intent = Intent.PRIMARY;
tooltip = `Not applicable`;
break;
}
return (
);
};private getWorkerActions(workerHost: string, disabled: boolean): BasicAction[] {
if (disabled) {
return [
{
icon: IconNames.TICK,
title: 'Enable',
onAction: () => this.setState({ middleManagerEnableWorkerHost: workerHost }),
},
];
} else {
return [
{
icon: IconNames.DISABLE,
title: 'Disable',
onAction: () => this.setState({ middleManagerDisableWorkerHost: workerHost }),
},
];
}
}intent = Intent.SUCCESS;
break;
case GradingStatuses.grading:
iconName = IconNames.TIME;
tooltip = `Partially graded: ${this.props.data.gradedCount} of
${this.props.data.questionCount}`;
intent = Intent.WARNING;
break;
case GradingStatuses.none:
iconName = IconNames.CROSS;
tooltip = `Not graded: ${this.props.data.gradedCount} of
${this.props.data.questionCount}`;
intent = Intent.DANGER;
break;
default:
iconName = IconNames.DISABLE;
tooltip = 'Not applicable';
intent = Intent.PRIMARY;
}
return (
<div>
</div>
);
}
}const isUnknown = run.pipeline.__typename === "UnknownPipeline";
if (run.status !== PipelineRunStatus.FAILURE) {
return null;
}
if (!run.executionPlan.artifactsPersisted) {
return (
null}
/>
);
}
return (