refactor(plugin-workflow): add new status for 'retry needed' scenarios (#2765)
This commit is contained in:
parent
67f01db779
commit
9bac4f54f4
@ -7,6 +7,7 @@ import {
|
||||
ExclamationOutlined,
|
||||
HourglassOutlined,
|
||||
LoadingOutlined,
|
||||
RedoOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { NAMESPACE } from './locale';
|
||||
|
||||
@ -19,6 +20,7 @@ export const EXECUTION_STATUS = {
|
||||
ABORTED: -3,
|
||||
CANCELED: -4,
|
||||
REJECTED: -5,
|
||||
RETRY_NEEDED: -6,
|
||||
};
|
||||
|
||||
export const ExecutionStatusOptions = [
|
||||
@ -78,6 +80,13 @@ export const ExecutionStatusOptions = [
|
||||
icon: <MinusOutlined />,
|
||||
description: `{{t("Rejected from a manual node.", { ns: "${NAMESPACE}" })}}`,
|
||||
},
|
||||
{
|
||||
value: EXECUTION_STATUS.RETRY_NEEDED,
|
||||
label: `{{t("Retry needed", { ns: "${NAMESPACE}" })}}`,
|
||||
color: 'volcano',
|
||||
icon: <RedoOutlined />,
|
||||
description: `{{t("General failed but should do another try.", { ns: "${NAMESPACE}" })}}`,
|
||||
},
|
||||
];
|
||||
|
||||
export const ExecutionStatusOptionsMap = ExecutionStatusOptions.reduce(
|
||||
@ -93,6 +102,7 @@ export const JOB_STATUS = {
|
||||
ABORTED: -3,
|
||||
CANCELED: -4,
|
||||
REJECTED: -5,
|
||||
RETRY_NEEDED: -6,
|
||||
};
|
||||
|
||||
export const JobStatusOptions = [
|
||||
@ -133,6 +143,12 @@ export const JobStatusOptions = [
|
||||
color: 'volcano',
|
||||
icon: <MinusOutlined />,
|
||||
},
|
||||
{
|
||||
value: JOB_STATUS.RETRY_NEEDED,
|
||||
label: `{{t("Retry needed", { ns: "${NAMESPACE}" })}}`,
|
||||
color: 'volcano',
|
||||
icon: <RedoOutlined />,
|
||||
},
|
||||
];
|
||||
|
||||
export const JobStatusOptionsMap = JobStatusOptions.reduce(
|
||||
|
@ -1,3 +1,4 @@
|
||||
export * from './constants';
|
||||
export * from './Branch';
|
||||
export * from './FlowContext';
|
||||
export * from './nodes';
|
||||
|
@ -20,6 +20,7 @@ export default class Processor {
|
||||
[JOB_STATUS.ABORTED]: EXECUTION_STATUS.ABORTED,
|
||||
[JOB_STATUS.CANCELED]: EXECUTION_STATUS.CANCELED,
|
||||
[JOB_STATUS.REJECTED]: EXECUTION_STATUS.REJECTED,
|
||||
[JOB_STATUS.RETRY_NEEDED]: EXECUTION_STATUS.RETRY_NEEDED,
|
||||
};
|
||||
|
||||
logger: Logger;
|
||||
|
@ -7,6 +7,7 @@ export const EXECUTION_STATUS = {
|
||||
ABORTED: -3,
|
||||
CANCELED: -4,
|
||||
REJECTED: -5,
|
||||
RETRY_NEEDED: -6,
|
||||
};
|
||||
|
||||
export const JOB_STATUS = {
|
||||
@ -17,6 +18,7 @@ export const JOB_STATUS = {
|
||||
ABORTED: -3,
|
||||
CANCELED: -4,
|
||||
REJECTED: -5,
|
||||
RETRY_NEEDED: -6,
|
||||
};
|
||||
|
||||
export const BRANCH_INDEX = {
|
||||
|
Loading…
Reference in New Issue
Block a user