This is an automated email from the ASF dual-hosted git repository.
wanggenhua pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 856083d591 fix ml group (#12172)
856083d591 is described below
commit 856083d5912dc53891c191cff0ca4ad2073814f0
Author: JieguangZhou <[email protected]>
AuthorDate: Wed Sep 28 18:30:52 2022 +0800
fix ml group (#12172)
---
dolphinscheduler-ui/src/locales/en_US/project.ts | 1 +
dolphinscheduler-ui/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({
}}
></NCollapseItem>
)}
+ {variables.ml.length > 0 && (
+ <NCollapseItem
+ title={t('project.menu.ml')}
+ name='5'
+ class='task-cate-ml'
+ v-slots={{
+ default: () => {
+ return variables.ml.map((task: any) => (
+ <div
+ class={[styles.draggable, `task-item-${task.type}`]}
+ draggable='true'
+ onDragstart={(e) => {
+ context.emit('dragStart', e, task.type as TaskType)
+ }}
+ >
+ <em
+ class={[
+ styles['sidebar-icon'],
+ styles['icon-' + task.type.toLocaleLowerCase()]
+ ]}
+ />
+ <span>{task.taskName}</span>
+ <div
+ class={styles.stars}
+ onMouseenter={() => {
+ task.starHover = true
+ }}
+ onMouseleave={() => {
+ task.starHover = false
+ }}
+ onClick={() => handleCollection(task)}
+ >
+ <NIcon
+ size='20'
+ color={
+ task.collection || task.starHover
+ ? '#288FFF'
+ : '#ccc'
+ }
+ >
+ {task.collection ? (
+ <StarFilled />
+ ) : (
+ <StarOutlined />
+ )}
+ </NIcon>
+ </div>
+ </div>
+ ))
+ }
+ }}
+ ></NCollapseItem>
+ )}
{variables.other.length > 0 && (
<NCollapseItem
title={t('project.menu.other')}