Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion agent-flow/src/common/Consts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const NODE_STATUS = {
RUNNING: 'RUNNING',
ERROR: 'ERROR',
SUCCESS: 'ARCHIVED',
SKIPPED: 'SKIPPED',
DEFAULT: 'DEFAULT',
UN_RUNNING: 'UN_RUNNING',
TERMINATED: 'TERMINATED',
Expand Down Expand Up @@ -287,4 +288,4 @@ export const DEFAULT_KNOWLEDGE_RETRIEVAL_NODE_EXTENSIONS = {
referenceNode: VIRTUAL_CONTEXT_NODE.id,
value: [VIRTUAL_CONTEXT_NODE_VARIABLES.APP_CREATE_BY],
}],
};
};
24 changes: 21 additions & 3 deletions agent-flow/src/components/flowRunComponent/RunningStatusPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,16 @@ SvgComponent.propTypes = {
};

const TimeComponent = ({shape, runStatus}) => {
const statusClassMap = {
[NODE_STATUS.SUCCESS]: 'success',
[NODE_STATUS.ERROR]: 'failed',
[NODE_STATUS.RUNNING]: 'running',
[NODE_STATUS.SKIPPED]: 'skipped',
};
const statusClass = statusClassMap[runStatus];
return (<>
<div className={`time-text-container time-text-container-${runStatus}`}>
<div className={`time-text time-text-${runStatus}`}>
<div className={`time-text-container${statusClass ? ` time-text-container-${statusClass}` : ''}`}>
<div className={`time-text${statusClass ? ` time-text-${statusClass}` : ''}`}>
{shape.cost ? (shape.cost / 1000) + "s" : "0.000s"}
</div>
</div>
Expand Down Expand Up @@ -182,6 +189,17 @@ const getStatus = (nodeStatus) => {
return <Icon component={(props) => <SvgComponent {...props} SvgCom={IconRunningFailed}/>}/>;
},
};
case NODE_STATUS.SKIPPED:
return {
title: t('skipped'),
enableReport: true,
getTime: (shape) => {
return <TimeComponent shape={shape} runStatus={nodeStatus}/>;
},
getIcon: () => {
return <Icon component={(props) => <SvgComponent {...props} SvgCom={IconRunningUnRunning}/>}/>;
},
};
case NODE_STATUS.RUNNING:
return {
title: t('running'),
Expand Down Expand Up @@ -222,4 +240,4 @@ const getStatus = (nodeStatus) => {
}
};

export default RunningStatusPanel;
export default RunningStatusPanel;
10 changes: 9 additions & 1 deletion agent-flow/src/components/flowRunComponent/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
background-color: rgb(198, 57, 57, 0.2);
}

.time-text-container-skipped {
background-color: rgba(107, 109, 117, 0.16);
}

.time-text {
font-family: SF Pro Display, -apple-system, BlinkMacSystemFont, Segoe Ul, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 12px;
Expand All @@ -52,6 +56,10 @@
color: rgb(198, 57, 57);
}

.time-text-skipped {
color: rgb(107, 109, 117);
}

.button-text {
color: rgb(77, 77, 77);
font-family: SF Pro Display, -apple-system, BlinkMacSystemFont, Segoe Ul, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Helvetica Neue, Helvetica, Arial, sans-serif;
Expand Down Expand Up @@ -213,4 +221,4 @@
position: absolute;
border-radius: 16px;
background: rgba(197, 197, 197, 0.13);
}
}
4 changes: 2 additions & 2 deletions agent-flow/src/flow/runners.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const standardRunner = (node) => {
return false;
}
const data = dataList.find(d => d.nodeId === preNode.id);
return data && data.status === NODE_STATUS.SUCCESS;
return data && (data.status === NODE_STATUS.SUCCESS || data.status === NODE_STATUS.SKIPPED);
};

return self;
Expand Down Expand Up @@ -174,4 +174,4 @@ export const inactiveNodeRunner = (node) => {
};

return self;
};
};
1 change: 1 addition & 0 deletions agent-flow/src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
"running": "Running",
"notRunning": "Not running",
"runFailed": "Failed",
"skipped": "Skipped",
"runResult": "Running Result",
"promptName": "Prompt Word",
"promptTextarea": "Use {{Variable name}} to add a variable",
Expand Down
1 change: 1 addition & 0 deletions agent-flow/src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@
"running": "运行中",
"notRunning": "未运行",
"runFailed": "运行失败",
"skipped": "已跳过",
"runResult": "运行结果",
"closeRunResult": "收起运行结果",
"invalidCategory": "存在不合法的类目,请先修改",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) 2025 Huawei Technologies Co., Ltd. All rights reserved.
* This file is a part of the ModelEngine Project.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

package modelengine.fit.jober.aipp.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;

/**
* END节点状态领域对象.
*
* @author 张越
* @since 2026-04-01
*/
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
public class EndNodeStatus extends BaseDomain {
private Long id;
private String traceId;
private String endNodeId;
private String status;
private long startTime;
private long endTime;
private String instanceId;
private String flowDefinitionId;

/**
* 获取节点执行时间.
*
* @return 执行时间(毫秒).
*/
public long getExecutionCost() {
return this.endTime - this.startTime;
}
}
Loading
Loading