You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by li...@apache.org on 2022/04/25 11:03:37 UTC
[dolphinscheduler] branch dev updated: [Fix][UI Next][V1.0.0-Beta] Remove the default values for node name and child node. (#9760)
This is an automated email from the ASF dual-hosted git repository.
liudongkai 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 83d9ea3ccb [Fix][UI Next][V1.0.0-Beta] Remove the default values for node name and child node. (#9760)
83d9ea3ccb is described below
commit 83d9ea3ccb98a9ae0ff5a15aa309747c04b9211c
Author: Amy0104 <97...@users.noreply.github.com>
AuthorDate: Mon Apr 25 19:03:30 2022 +0800
[Fix][UI Next][V1.0.0-Beta] Remove the default values for node name and child node. (#9760)
---
.../src/locales/modules/en_US.ts | 1 +
.../src/locales/modules/zh_CN.ts | 1 +
.../task/components/node/fields/use-child-node.ts | 22 +++++++++++-----------
.../task/components/node/tasks/use-sub-process.ts | 3 +--
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts
index 41d26035d6..1f605dae0c 100644
--- a/dolphinscheduler-ui-next/src/locales/modules/en_US.ts
+++ b/dolphinscheduler-ui-next/src/locales/modules/en_US.ts
@@ -631,6 +631,7 @@ const project = {
workflow_name: 'Workflow Name',
workflow_name_tips: 'Please select a workflow (required)',
child_node: 'Child Node',
+ child_node_tips: 'Please select a child node (required)',
run_flag: 'Run flag',
normal: 'Normal',
prohibition_execution: 'Prohibition execution',
diff --git a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
index 4525d65d2a..03ac1caf67 100644
--- a/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
+++ b/dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
@@ -627,6 +627,7 @@ const project = {
workflow_name: '工作流名称',
workflow_name_tips: '请选择工作流(必选)',
child_node: '子节点',
+ child_node_tips: '请选择子节点(必选)',
run_flag: '运行标志',
normal: '正常',
prohibition_execution: '禁止执行',
diff --git a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts
index 7dcee5d038..f9a1be2c0b 100644
--- a/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts
@@ -52,10 +52,6 @@ export function useChildNode({
value: option.code
}))
loading.value = false
- if (!model.processDefinitionCode) {
- model.processDefinitionCode = options.value[0].value
- if (!model.name) model.name = options.value[0].label
- }
}
const getProcessListByCode = async (processCode: number) => {
if (!processCode) return
@@ -63,10 +59,6 @@ export function useChildNode({
model.definition = res
}
- const onChange = (code: number, options: { label: string }) => {
- if (!model.name) model.name = options.label
- }
-
onMounted(() => {
if (from === 1 && processName) {
getProcessListByCode(processName)
@@ -80,10 +72,18 @@ export function useChildNode({
span: 24,
name: t('project.node.child_node'),
props: {
- loading: loading,
- 'on-update:value': onChange
+ loading: loading
},
options: options,
- class: 'select-child-node'
+ class: 'select-child-node',
+ validate: {
+ trigger: ['input', 'blur'],
+ required: true,
+ validator(unuse: any, value: number) {
+ if (!value) {
+ return Error(t('project.node.child_node_tips'))
+ }
+ }
+ }
}
}
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 2f8ed0dd02..7338da437b 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
@@ -45,8 +45,7 @@ export function useSubProcess({
failRetryTimes: 0,
workerGroup: 'default',
delayTime: 0,
- timeout: 30,
- processDefinitionCode: 0
+ timeout: 30
} as INodeData)
let extra: IJsonItem[] = []