如何拓展或者重新定义节点的执行状态 目前的SUCCESS PROCESSING 不够用。。。 #478
Unanswered
Wangxinyu-developer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
enum StatusEnum {
SUCCESS = "success",
PROCESSING = "processing",
ERROR = "error",
DEFAULT = "default",
WARNING = "warning",
// RUNNING = "running",
// SKIPPED = "skipped",
// FAILED = "failed",
// CANCELING = "canceling",
// CANCELED = "canceled",
// PAUSED = "paused"
}
我希望加上我注释掉的这些装态 但是会报错。
export const AlgoIcon: React.FC = (props) => {
if (props.hide) {
return null;
}
console.log(props.status)
switch (props.status) {
case NsGraphStatusCommand.StatusEnum.PROCESSING:
return <RedoOutlined spin style={{ color: '#c1cdf7', fontSize: '16px' }} />;
case NsGraphStatusCommand.StatusEnum.ERROR:
return <CloseCircleOutlined style={{ color: '#ff4d4f', fontSize: '16px' }} />;
case NsGraphStatusCommand.StatusEnum.SUCCESS:
return <CheckCircleOutlined style={{ color: '#39ca74cc', fontSize: '16px' }} />;
case NsGraphStatusCommand.StatusEnum.WARNING:
return <ExclamationCircleOutlined style={{ color: '#faad14', fontSize: '16px' }} />;
case NsGraphStatusCommand.StatusEnum.RUNNING:
return <ExclamationCircleOutlined spin style={{ color: '#c1cdf7', fontSize: '16px' }} />;
// case NsGraphStatusCommand.StatusEnum.SKIPPED:
// return <CloseCircleOutlined style={{ color: '#ff4d4f', fontSize: '16px' }} />;
// case NsGraphStatusCommand.StatusEnum.FAILED:
// return <CheckCircleOutlined style={{ color: '#39ca74cc', fontSize: '16px' }} />;
// case NsGraphStatusCommand.StatusEnum.CANCELING:
// return <ExclamationCircleOutlined style={{ color: '#faad14', fontSize: '16px' }} />;
// case NsGraphStatusCommand.StatusEnum.CANCELED:
// return <InfoCircleOutlined style={{ color: '#d9d9d9', fontSize: '16px' }} />;
// case NsGraphStatusCommand.StatusEnum.PAUSED:
// return <InfoCircleOutlined style={{ color: '#faad14', fontSize: '16px' }} />;
};
错误如下:
mf-dep____vendor.89d7aa23.js:192990 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push')
at mf-dep____vendor.89d7aa23.js:192990:31
at Array.reduce ()
at push../node_modules/@antv/xflow-extension/es/canvas-dag-extension/contributions/command.js.NsGraphStatusCommand.groupByStatus (mf-dep____vendor.89d7aa23.js:192989:37)
at QueryGraphStatusCommand. (mf-dep____vendor.89d7aa23.js:193122:65)
at Generator.next ()
at fulfilled (mf-dep____vendor.89d7aa23.js:496652:56)
Beta Was this translation helpful? Give feedback.
All reactions