From 856083d5912dc53891c191cff0ca4ad2073814f0 Mon Sep 17 00:00:00 2001 From: JieguangZhou Date: Wed, 28 Sep 2022 18:30:52 +0800 Subject: [PATCH] fix ml group (#12172) --- .../src/locales/en_US/project.ts | 1 + .../src/locales/zh_CN/project.ts | 1 + .../workflow/components/dag/dag-sidebar.tsx | 57 +++++++++++++++++++ 3 files changed, 59 insertions(+) diff --git a/dolphinscheduler-ui/src/locales/en_US/project.ts b/dolphinscheduler-ui/src/locales/en_US/project.ts index 74218748a6..1d2416b7d7 100644 --- a/dolphinscheduler-ui/src/locales/en_US/project.ts +++ b/dolphinscheduler-ui/src/locales/en_US/project.ts @@ -791,6 +791,7 @@ export default { logic: 'Logic', di: 'Data Integration', dq: 'Data Quality', + ml: 'Machine Learning', other: 'Other', } } diff --git a/dolphinscheduler-ui/src/locales/zh_CN/project.ts b/dolphinscheduler-ui/src/locales/zh_CN/project.ts index 6ea2c23a96..6476e06d67 100644 --- a/dolphinscheduler-ui/src/locales/zh_CN/project.ts +++ b/dolphinscheduler-ui/src/locales/zh_CN/project.ts @@ -771,6 +771,7 @@ export default { logic: '逻辑节点', di: '数据集成', dq: '数据质量', + ml: '机器学习', other: '其他', } } diff --git a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-sidebar.tsx b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-sidebar.tsx index 5fd704f1a0..5c50131d6b 100644 --- a/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-sidebar.tsx +++ b/dolphinscheduler-ui/src/views/projects/workflow/components/dag/dag-sidebar.tsx @@ -38,6 +38,7 @@ export default defineComponent({ logic: [], di: [], dq: [], + ml: [], other: [], fav: [] }) @@ -68,6 +69,9 @@ export default defineComponent({ variables.dq = variables.dataList.filter( (item: any) => item.taskType === 'DataQuality' ) + variables.ml = variables.dataList.filter( + (item: any) => item.taskType === 'MachineLearning' + ) variables.other = variables.dataList.filter( (item: any) => item.taskType === 'Other' ) @@ -413,6 +417,59 @@ export default defineComponent({ }} > )} + {variables.ml.length > 0 && ( + { + return variables.ml.map((task: any) => ( +
{ + context.emit('dragStart', e, task.type as TaskType) + }} + > + + {task.taskName} +
{ + task.starHover = true + }} + onMouseleave={() => { + task.starHover = false + }} + onClick={() => handleCollection(task)} + > + + {task.collection ? ( + + ) : ( + + )} + +
+
+ )) + } + }} + >
+ )} {variables.other.length > 0 && (