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,
|
ExclamationOutlined,
|
||||||
HourglassOutlined,
|
HourglassOutlined,
|
||||||
LoadingOutlined,
|
LoadingOutlined,
|
||||||
|
RedoOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import { NAMESPACE } from './locale';
|
import { NAMESPACE } from './locale';
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ export const EXECUTION_STATUS = {
|
|||||||
ABORTED: -3,
|
ABORTED: -3,
|
||||||
CANCELED: -4,
|
CANCELED: -4,
|
||||||
REJECTED: -5,
|
REJECTED: -5,
|
||||||
|
RETRY_NEEDED: -6,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ExecutionStatusOptions = [
|
export const ExecutionStatusOptions = [
|
||||||
@ -78,6 +80,13 @@ export const ExecutionStatusOptions = [
|
|||||||
icon: <MinusOutlined />,
|
icon: <MinusOutlined />,
|
||||||
description: `{{t("Rejected from a manual node.", { ns: "${NAMESPACE}" })}}`,
|
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(
|
export const ExecutionStatusOptionsMap = ExecutionStatusOptions.reduce(
|
||||||
@ -93,6 +102,7 @@ export const JOB_STATUS = {
|
|||||||
ABORTED: -3,
|
ABORTED: -3,
|
||||||
CANCELED: -4,
|
CANCELED: -4,
|
||||||
REJECTED: -5,
|
REJECTED: -5,
|
||||||
|
RETRY_NEEDED: -6,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const JobStatusOptions = [
|
export const JobStatusOptions = [
|
||||||
@ -133,6 +143,12 @@ export const JobStatusOptions = [
|
|||||||
color: 'volcano',
|
color: 'volcano',
|
||||||
icon: <MinusOutlined />,
|
icon: <MinusOutlined />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value: JOB_STATUS.RETRY_NEEDED,
|
||||||
|
label: `{{t("Retry needed", { ns: "${NAMESPACE}" })}}`,
|
||||||
|
color: 'volcano',
|
||||||
|
icon: <RedoOutlined />,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const JobStatusOptionsMap = JobStatusOptions.reduce(
|
export const JobStatusOptionsMap = JobStatusOptions.reduce(
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
export * from './constants';
|
||||||
export * from './Branch';
|
export * from './Branch';
|
||||||
export * from './FlowContext';
|
export * from './FlowContext';
|
||||||
export * from './nodes';
|
export * from './nodes';
|
||||||
|
@ -20,6 +20,7 @@ export default class Processor {
|
|||||||
[JOB_STATUS.ABORTED]: EXECUTION_STATUS.ABORTED,
|
[JOB_STATUS.ABORTED]: EXECUTION_STATUS.ABORTED,
|
||||||
[JOB_STATUS.CANCELED]: EXECUTION_STATUS.CANCELED,
|
[JOB_STATUS.CANCELED]: EXECUTION_STATUS.CANCELED,
|
||||||
[JOB_STATUS.REJECTED]: EXECUTION_STATUS.REJECTED,
|
[JOB_STATUS.REJECTED]: EXECUTION_STATUS.REJECTED,
|
||||||
|
[JOB_STATUS.RETRY_NEEDED]: EXECUTION_STATUS.RETRY_NEEDED,
|
||||||
};
|
};
|
||||||
|
|
||||||
logger: Logger;
|
logger: Logger;
|
||||||
|
@ -7,6 +7,7 @@ export const EXECUTION_STATUS = {
|
|||||||
ABORTED: -3,
|
ABORTED: -3,
|
||||||
CANCELED: -4,
|
CANCELED: -4,
|
||||||
REJECTED: -5,
|
REJECTED: -5,
|
||||||
|
RETRY_NEEDED: -6,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const JOB_STATUS = {
|
export const JOB_STATUS = {
|
||||||
@ -17,6 +18,7 @@ export const JOB_STATUS = {
|
|||||||
ABORTED: -3,
|
ABORTED: -3,
|
||||||
CANCELED: -4,
|
CANCELED: -4,
|
||||||
REJECTED: -5,
|
REJECTED: -5,
|
||||||
|
RETRY_NEEDED: -6,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BRANCH_INDEX = {
|
export const BRANCH_INDEX = {
|
||||||
|
Loading…
Reference in New Issue
Block a user