Skip to content

Commit 51fb08b

Browse files
authored
Fix: Fixed the issue where dataset log avatars were displayed incorrectly #9869 (#10764)
### What problem does this PR solve? Fix: Fixed the issue where dataset log avatars were displayed incorrectly #9869 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
1 parent 501b7d4 commit 51fb08b

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

web/src/pages/agents/agent-templates.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default function AgentTemplates() {
5050
[showCreatingModal],
5151
);
5252

53-
const { navigateToAgent, navigateToDataflow } = useNavigatePage();
53+
const { navigateToAgent } = useNavigatePage();
5454

5555
const handleOk = useCallback(
5656
async (payload: any) => {
@@ -67,7 +67,7 @@ export default function AgentTemplates() {
6767
if (ret?.code === 0) {
6868
hideCreatingModal();
6969
if (canvasCategory === AgentCategory.DataflowCanvas) {
70-
navigateToDataflow(ret.data.id)();
70+
navigateToAgent(ret.data.id, AgentCategory.DataflowCanvas)();
7171
} else {
7272
navigateToAgent(ret.data.id)();
7373
}
@@ -76,7 +76,6 @@ export default function AgentTemplates() {
7676
[
7777
hideCreatingModal,
7878
navigateToAgent,
79-
navigateToDataflow,
8079
setAgent,
8180
template?.avatar,
8281
template?.canvas_category,

web/src/pages/dataset/dataset-overview/overview-table.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,20 @@ export const getFileLogsTableColumns = (
102102
{
103103
accessorKey: 'pipeline_title',
104104
header: t('dataPipeline'),
105-
cell: ({ row }) => (
106-
<div className="flex items-center gap-2 text-text-primary">
107-
<RAGFlowAvatar
108-
avatar={row.original.avatar}
109-
name={row.original.pipeline_title}
110-
className="size-4"
111-
/>
112-
{row.original.pipeline_title === 'naive'
113-
? 'general'
114-
: row.original.pipeline_title}
115-
</div>
116-
),
105+
cell: ({ row }) => {
106+
const title = row.original.pipeline_title;
107+
const pipelineTitle = title === 'naive' ? 'general' : title;
108+
return (
109+
<div className="flex items-center gap-2 text-text-primary">
110+
<RAGFlowAvatar
111+
avatar={row.original.avatar}
112+
name={pipelineTitle}
113+
className="size-4"
114+
/>
115+
{pipelineTitle}
116+
</div>
117+
);
118+
},
117119
},
118120
{
119121
accessorKey: 'process_begin_at',

0 commit comments

Comments
 (0)