From 93ee2e45c8753d91ff19e435e52d228454da1526 Mon Sep 17 00:00:00 2001 From: Amy0104 <97265214+Amy0104@users.noreply.github.com> Date: Wed, 20 Apr 2022 16:30:53 +0800 Subject: [PATCH] [Fix][UI][V1.0.0-Beta] Change node name to task name in the task modal on the task definition page. (#9620) --- dolphinscheduler-ui-next/src/locales/modules/en_US.ts | 3 ++- dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts | 1 + .../views/projects/task/components/node/fields/use-name.ts | 4 ++-- .../projects/task/components/node/tasks/use-conditions.ts | 2 +- .../projects/task/components/node/tasks/use-data-quality.ts | 2 +- .../views/projects/task/components/node/tasks/use-datax.ts | 2 +- .../projects/task/components/node/tasks/use-dependent.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-emr.ts | 2 +- .../views/projects/task/components/node/tasks/use-flink.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-http.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-mr.ts | 2 +- .../views/projects/task/components/node/tasks/use-pigeon.ts | 2 +- .../projects/task/components/node/tasks/use-procedure.ts | 2 +- .../views/projects/task/components/node/tasks/use-python.ts | 2 +- .../projects/task/components/node/tasks/use-sea-tunnel.ts | 2 +- .../views/projects/task/components/node/tasks/use-shell.ts | 2 +- .../views/projects/task/components/node/tasks/use-spark.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-sql.ts | 2 +- .../views/projects/task/components/node/tasks/use-sqoop.ts | 2 +- .../projects/task/components/node/tasks/use-sub-process.ts | 2 +- .../views/projects/task/components/node/tasks/use-switch.ts | 2 +- 21 files changed, 23 insertions(+), 21 deletions(-) diff --git a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts index 4d2dd871ce..1f00751a79 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts @@ -623,7 +623,8 @@ const project = { view_history: 'View history', view_log: 'View log', enter_this_child_node: 'Enter this child node', - name: 'Name', + name: 'Node Name', + task_name: 'Task Name', name_tips: 'Please enter name (required)', task_type: 'Task Type', task_type_tips: 'Please select a task type (required)', diff --git a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts index a03aba3bc9..e590d67524 100644 --- a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts +++ b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts @@ -620,6 +620,7 @@ const project = { view_log: '查看日志', enter_this_child_node: '进入该子节点', name: '节点名称', + task_name: '任务名称', name_tips: '请输入名称(必填)', task_type: '任务类型', task_type_tips: '请选择任务类型(必选)', diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-name.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-name.ts index 3b97631fd7..8133e6a81e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-name.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-name.ts @@ -18,13 +18,13 @@ import { useI18n } from 'vue-i18n' import type { IJsonItem } from '../types' -export function useName(): IJsonItem { +export function useName(from?: number): IJsonItem { const { t } = useI18n() return { type: 'input', field: 'name', class: 'input-node-name', - name: t('project.node.name'), + name: from === 1 ? t('project.node.task_name') : t('project.node.name'), props: { placeholder: t('project.node.name_tips'), maxLength: 100 diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-conditions.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-conditions.ts index 2dfdb03efc..69f8adaf19 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-conditions.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-conditions.ts @@ -65,7 +65,7 @@ export function useConditions({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts index d9d2b490f4..91e667dd1b 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-data-quality.ts @@ -76,7 +76,7 @@ export function useDataQuality({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-datax.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-datax.ts index c102f11063..4b69960b51 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-datax.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-datax.ts @@ -67,7 +67,7 @@ export function useDataX({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-dependent.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-dependent.ts index c0694cb33f..5bb2e0e470 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-dependent.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-dependent.ts @@ -67,7 +67,7 @@ export function useDependent({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-emr.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-emr.ts index 24de66d106..3ce2fead6c 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-emr.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-emr.ts @@ -62,7 +62,7 @@ export function useEmr({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-flink.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-flink.ts index c62f1db756..1d3d8daf94 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-flink.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-flink.ts @@ -69,7 +69,7 @@ export function useFlink({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-http.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-http.ts index 6d8d1e7e7d..89dd2394e6 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-http.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-http.ts @@ -68,7 +68,7 @@ export function useHttp({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-mr.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-mr.ts index 496a88ecec..f5bbdeca59 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-mr.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-mr.ts @@ -62,7 +62,7 @@ export function useMr({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-pigeon.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-pigeon.ts index cad4d31195..4bd9eedd42 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-pigeon.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-pigeon.ts @@ -61,7 +61,7 @@ export function usePigeon({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-procedure.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-procedure.ts index a5a6519f71..1ace30e0e9 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-procedure.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-procedure.ts @@ -65,7 +65,7 @@ export function useProcedure({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-python.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-python.ts index c9cb89b3d8..2f58a13257 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-python.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-python.ts @@ -63,7 +63,7 @@ export function usePython({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts index e14d4349d9..85fedf8d3b 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts @@ -67,7 +67,7 @@ export function useSeaTunnel({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-shell.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-shell.ts index 86812baddf..d0c38cd8e6 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-shell.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-shell.ts @@ -63,7 +63,7 @@ export function useShell({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-spark.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-spark.ts index 6ca7a05ecc..520a5481dc 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-spark.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-spark.ts @@ -69,7 +69,7 @@ export function useSpark({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sql.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sql.ts index 7bba537ec1..de02be448e 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sql.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sql.ts @@ -69,7 +69,7 @@ export function useSql({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sqoop.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sqoop.ts index 6d272f29a8..fc385372b1 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sqoop.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sqoop.ts @@ -81,7 +81,7 @@ export function useSqoop({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts index f2b85987e8..2f8ed0dd02 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts @@ -65,7 +65,7 @@ export function useSubProcess({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(), diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-switch.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-switch.ts index 1408f369ad..20412242c0 100644 --- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-switch.ts +++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-switch.ts @@ -65,7 +65,7 @@ export function useSwitch({ return { json: [ - Fields.useName(), + Fields.useName(from), ...extra, Fields.useRunFlag(), Fields.useDescription(),