This is an automated email from the ASF dual-hosted git repository.
wanggenhua 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 58721ba855 [Improvement-12335][ui] Make the resources to be reactive
in hivecli task (#12336)
58721ba855 is described below
commit 58721ba855be07f77d0499d1aa0dcaff68bedc97
Author: rickchengx <[email protected]>
AuthorDate: Mon Nov 7 18:05:51 2022 +0800
[Improvement-12335][ui] Make the resources to be reactive in hivecli task
(#12336)
---
.../src/views/projects/task/components/node/fields/use-hive-cli.ts | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-hive-cli.ts
b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-hive-cli.ts
index 2a605328d6..1ae178bfb2 100644
---
a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-hive-cli.ts
+++
b/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 })
]
}