Browse Source

[Fix][UI] Fix the preTask options are unavailable when creating a task in the task definition page. (#11501)

3.1.0-release
Amy0104 2 years ago committed by GitHub
parent
commit
182455ced7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/index.ts
  2. 11
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-pre-tasks.ts
  3. 8
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-process-name.ts
  4. 46
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-task-definition.ts
  5. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-chunjun.ts
  6. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-conditions.ts
  7. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-data-quality.ts
  8. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-datax.ts
  9. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dependent.ts
  10. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dinky.ts
  11. 18
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dvc.ts
  12. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-emr.ts
  13. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-flink-stream.ts
  14. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-flink.ts
  15. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-http.ts
  16. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-jupyter.ts
  17. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-k8s.ts
  18. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mlflow.ts
  19. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mr.ts
  20. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-openmldb.ts
  21. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pigeon.ts
  22. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-procedure.ts
  23. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-python.ts
  24. 18
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sagemaker.ts
  25. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts
  26. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-shell.ts
  27. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-spark.ts
  28. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sql.ts
  29. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sqoop.ts
  30. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sub-process.ts
  31. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-switch.ts
  32. 16
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-zeppelin.ts

1
dolphinscheduler-ui/src/views/projects/task/components/node/fields/index.ts

@ -48,6 +48,7 @@ export { useExecutorMemory } from './use-executor-memory'
export { useExecutorCores } from './use-executor-cores' export { useExecutorCores } from './use-executor-cores'
export { useMainJar } from './use-main-jar' export { useMainJar } from './use-main-jar'
export { useResources } from './use-resources' export { useResources } from './use-resources'
export { useTaskDefinition } from './use-task-definition'
export { useShell } from './use-shell' export { useShell } from './use-shell'
export { useSpark } from './use-spark' export { useSpark } from './use-spark'

11
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-pre-tasks.ts

@ -15,6 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { useTaskNodeStore } from '@/store/project/task-node' import { useTaskNodeStore } from '@/store/project/task-node'
import type { IJsonItem } from '../types' import type { IJsonItem } from '../types'
@ -22,6 +23,14 @@ import type { IJsonItem } from '../types'
export function usePreTasks(): IJsonItem { export function usePreTasks(): IJsonItem {
const { t } = useI18n() const { t } = useI18n()
const taskStore = useTaskNodeStore() const taskStore = useTaskNodeStore()
const options = ref(taskStore.getPreTaskOptions)
watch(
() => taskStore.getPreTaskOptions,
(value) => {
options.value = value
}
)
return { return {
type: 'select', type: 'select',
@ -33,6 +42,6 @@ export function usePreTasks(): IJsonItem {
multiple: true, multiple: true,
filterable: true filterable: true
}, },
options: taskStore.getPreTaskOptions options
} }
} }

8
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-process-name.ts

@ -21,6 +21,7 @@ import {
querySimpleList, querySimpleList,
queryProcessDefinitionByCode queryProcessDefinitionByCode
} from '@/service/modules/process-definition' } from '@/service/modules/process-definition'
import { useTaskNodeStore } from '@/store/project/task-node'
import type { IJsonItem } from '../types' import type { IJsonItem } from '../types'
export function useProcessName({ export function useProcessName({
@ -28,16 +29,18 @@ export function useProcessName({
projectCode, projectCode,
isCreate, isCreate,
from, from,
processName processName,
taskCode
}: { }: {
model: { [field: string]: any } model: { [field: string]: any }
projectCode: number projectCode: number
isCreate: boolean isCreate: boolean
from?: number from?: number
processName?: number processName?: number
taskCode?: number
}): IJsonItem { }): IJsonItem {
const { t } = useI18n() const { t } = useI18n()
const taskStore = useTaskNodeStore()
const options = ref([] as { label: string; value: string }[]) const options = ref([] as { label: string; value: string }[])
const loading = ref(false) const loading = ref(false)
@ -55,6 +58,7 @@ export function useProcessName({
if (!processCode) return if (!processCode) return
const res = await queryProcessDefinitionByCode(processCode, projectCode) const res = await queryProcessDefinitionByCode(processCode, projectCode)
model.definition = res model.definition = res
taskStore.updateDefinition(res, taskCode)
} }
const onChange = (code: number) => { const onChange = (code: number) => {

46
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-task-definition.ts

@ -0,0 +1,46 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { useTaskType, useProcessName } from '.'
import type { IJsonItem, ITaskData } from '../types'
export const useTaskDefinition = ({
projectCode,
from = 0,
readonly,
data,
model
}: {
projectCode: number
from?: number
readonly?: boolean
data?: ITaskData
model: { [field: string]: any }
}): IJsonItem[] => {
if (from === 0) return []
return [
useTaskType(model, readonly),
useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName,
taskCode: data?.code
})
]
}

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-chunjun.ts

@ -51,24 +51,10 @@ export function useChunjun({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-conditions.ts

@ -50,24 +50,10 @@ export function useConditions({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-data-quality.ts

@ -60,24 +60,10 @@ export function useDataQuality({
others: '--conf spark.yarn.maxAppAttempts=1' others: '--conf spark.yarn.maxAppAttempts=1'
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-datax.ts

@ -54,24 +54,10 @@ export function useDataX({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dependent.ts

@ -51,24 +51,10 @@ export function useDependent({
...data ...data
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dinky.ts

@ -46,24 +46,10 @@ export function useDinky({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

18
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dvc.ts

@ -44,27 +44,13 @@ export function useDvc({
delayTime: 0, delayTime: 0,
timeout: 30, timeout: 30,
timeoutNotifyStrategy: ['WARN'], timeoutNotifyStrategy: ['WARN'],
dvcTaskType: 'Upload', dvcTaskType: 'Upload'
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-emr.ts

@ -48,24 +48,10 @@ export function useEmr({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-flink-stream.ts

@ -56,24 +56,10 @@ export function useFlinkStream({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
}) })
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-flink.ts

@ -56,24 +56,10 @@ export function useFlink({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
}) })
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-http.ts

@ -53,24 +53,10 @@ export function useHttp({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-jupyter.ts

@ -48,24 +48,10 @@ export function useJupyter({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-k8s.ts

@ -47,24 +47,10 @@ export function useK8s({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(), Fields.useName(),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mlflow.ts

@ -57,24 +57,10 @@ export function useMlflow({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mr.ts

@ -47,24 +47,10 @@ export function useMr({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-openmldb.ts

@ -50,24 +50,10 @@ export function useOpenmldb({
executeMode: 'offline' executeMode: 'offline'
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pigeon.ts

@ -46,24 +46,10 @@ export function usePigeon({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-procedure.ts

@ -50,24 +50,10 @@ export function useProcedure({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-python.ts

@ -50,24 +50,10 @@ export function usePython({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

18
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sagemaker.ts

@ -43,27 +43,13 @@ export function userSagemaker({
workerGroup: 'default', workerGroup: 'default',
delayTime: 0, delayTime: 0,
timeout: 30, timeout: 30,
timeoutNotifyStrategy: ['WARN'], timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts

@ -77,24 +77,10 @@ export function useSeaTunnel({
'}' '}'
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-shell.ts

@ -49,24 +49,10 @@ export function useShell({
rawScript: '' rawScript: ''
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-spark.ts

@ -55,24 +55,10 @@ export function useSpark({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sql.ts

@ -55,24 +55,10 @@ export function useSql({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sqoop.ts

@ -69,24 +69,10 @@ export function useSqoop({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sub-process.ts

@ -49,24 +49,10 @@ export function useSubProcess({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-switch.ts

@ -50,24 +50,10 @@ export function useSwitch({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

16
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-zeppelin.ts

@ -46,24 +46,10 @@ export function useZeppelin({
timeoutNotifyStrategy: ['WARN'] timeoutNotifyStrategy: ['WARN']
} as INodeData) } as INodeData)
let extra: IJsonItem[] = []
if (from === 1) {
extra = [
Fields.useTaskType(model, readonly),
Fields.useProcessName({
model,
projectCode,
isCreate: !data?.id,
from,
processName: data?.processName
})
]
}
return { return {
json: [ json: [
Fields.useName(from), Fields.useName(from),
...extra, ...Fields.useTaskDefinition({ projectCode, from, readonly, data, model }),
Fields.useRunFlag(), Fields.useRunFlag(),
Fields.useDescription(), Fields.useDescription(),
Fields.useTaskPriority(), Fields.useTaskPriority(),

Loading…
Cancel
Save