Skip to content

Commit

Permalink
fix(frontend): 历史任务详情失败节点跳转日志问题修复 #8117
Browse files Browse the repository at this point in the history
  • Loading branch information
jinquantianxia committed Nov 22, 2024
1 parent d6d3474 commit 53bed8b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
];
fetchData();
};
console.log('asdasdasdasd')
</script>
<style lang="less">
.partition-execute-log {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,6 @@
const deviceClassList = ref<DeviceClassListItem[]>([]);
const scrollLoading = ref(false);
const searchParams = {
offset: 0,
limit: 12,
device_type: '',
};
const deviceListMap = ref<
Record<
string,
Expand All @@ -134,6 +127,12 @@
>
>({});
const searchParams = {
offset: 0,
limit: 12,
device_type: '',
};
const selectedCpuMem = {
cpu: {
min: Number.MAX_SAFE_INTEGER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@
import { getTaskflowDetails } from '@services/source/taskflow';
type NodeType = ServiceReturnType<typeof getTaskflowDetails>['activities'][string];
interface Props {
nodesCount: number;
nodesTreeData: ServiceReturnType<typeof getTaskflowDetails>['activities'][string][];
nodesTreeData: Array<NodeType & { failedChildren?: NodeType[] }>;
statusKeypath: string;
titleKeypath: string;
tooltips: string;
Expand All @@ -83,7 +85,7 @@
}
interface Emits {
(e: 'node-click', value: Props['nodesTreeData'][number], refValue: typeof treeRef): void;
(e: 'node-click', value: Props['nodesTreeData'][number], refValue: typeof treeRef, isShowLog: boolean): void;
(e: 'after-show', value: typeof treeRef): void;
}
Expand Down Expand Up @@ -112,7 +114,8 @@
};
const handleNodeClick = (node: Props['nodesTreeData'][number]) => {
emits('node-click', node, treeRef);
const iShowLog = !node.failedChildren;
emits('node-click', node, treeRef, iShowLog);
};
const handleNodePanelSwich = () => {
Expand Down
8 changes: 4 additions & 4 deletions dbm-ui/frontend/src/views/task-history/pages/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
title-keypath="人工确认节点(n)"
:tooltips="t('人工确认节点列表')"
@after-show="(treeRef: Ref) => handleToolNodeTreeAfterShow(treeRef, false)"
@node-click="(node: TaskflowList[number], treeRef: Ref) => handleTreeNodeClick(node, treeRef, false)" />
@node-click="handleTreeNodeClick" />
<PreviewNodeTree
v-if="flowState.details.flow_info?.status === 'FAILED'"
ref="failedToolPreviewNodeTreeRef"
Expand All @@ -140,7 +140,7 @@
title-keypath="失败节点(n)"
:tooltips="t('失败节点列表')"
@after-show="(treeRef: Ref) => handleToolNodeTreeAfterShow(treeRef)"
@node-click="(node: TaskflowList[number], treeRef: Ref) => handleTreeNodeClick(node, treeRef)" />
@node-click="handleTreeNodeClick" />
<i
v-bk-tooltips="t('放大')"
class="flow-tools-icon db-icon-plus-circle"
Expand Down Expand Up @@ -276,7 +276,7 @@
title-keypath="失败节点(n)"
:tooltips="t('失败节点列表')"
@after-show="(treeRef: Ref) => handleNodeTreeAfterShow(treeRef)"
@node-click="(node: TaskflowList[number], treeRef: Ref) => handleTreeNodeClick(node, treeRef)" />
@node-click="handleTreeNodeClick" />
<PreviewNodeTree
v-else-if="todoNodesCount > 0"
ref="failedTopPreviewNodeTreeRef"
Expand All @@ -288,7 +288,7 @@
title-keypath="人工确认节点(n)"
:tooltips="t('人工确认节点列表')"
@after-show="(treeRef: Ref) => handleNodeTreeAfterShow(treeRef, false)"
@node-click="(node: TaskflowList[number], treeRef: Ref) => handleTreeNodeClick(node, treeRef, false)" />
@node-click="handleTreeNodeClick" />
<BkTag
v-else
:theme="getStatusTheme(true)">
Expand Down

0 comments on commit 53bed8b

Please sign in to comment.