Browse Source

[Improvement-12335][ui] Make the resources to be reactive in hivecli task (#12336)

3.2.0-release
rickchengx 2 years ago committed by GitHub
parent
commit
58721ba855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-hive-cli.ts

4
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-hive-cli.ts

@ -22,6 +22,8 @@ import type { IJsonItem } from '../types'
export function useHiveCli(model: { [field: string]: any }): IJsonItem[] {
const { t } = useI18n()
const hiveSqlScriptSpan = computed(() => (model.hiveCliTaskExecutionType === 'SCRIPT' ? 24 : 0))
const resourcesRequired = computed(() => (model.hiveCliTaskExecutionType === 'SCRIPT' ? false : true))
const resourcesLimit = computed(() => (model.hiveCliTaskExecutionType === 'SCRIPT' ? -1 : 1))
return [
{
@ -56,7 +58,7 @@ export function useHiveCli(model: { [field: string]: any }): IJsonItem[] {
placeholder: t('project.node.hive_cli_options_tips')
}
},
useResources(),
useResources(24, resourcesRequired, resourcesLimit),
...useCustomParams({ model, field: 'localParams', isSimple: false })
]
}

Loading…
Cancel
Save