Browse Source

[Fix][UI Next][V1.0.0-Beta] Remove the default values for node name and child node. (#9760)

3.0.0/version-upgrade
Amy0104 3 years ago committed by GitHub
parent
commit
83d9ea3ccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-ui-next/src/locales/modules/en_US.ts
  2. 1
      dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
  3. 22
      dolphinscheduler-ui-next/src/views/projects/task/components/node/fields/use-child-node.ts
  4. 3
      dolphinscheduler-ui-next/src/views/projects/task/components/node/tasks/use-sub-process.ts

1
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',

1
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: '禁止执行',

22
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'))
}
}
}
}
}

3
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[] = []

Loading…
Cancel
Save