From db9db944a6030bc4c8bd4366a5f2b6a13404ebae Mon Sep 17 00:00:00 2001 From: rickchengx <38122586+rickchengx@users.noreply.github.com> Date: Fri, 30 Sep 2022 09:56:35 +0800 Subject: [PATCH] [Improvement-11880][Hivecli] Improve the UI of HiveCli (#11882) --- .../task/components/node/fields/use-hive-cli.ts | 15 +++++++++++++-- .../task/components/node/tasks/use-hive-cli.ts | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) 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 491a82cf0d..2a605328d6 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 @@ -14,12 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { computed } from 'vue' import { useI18n } from 'vue-i18n' import { useCustomParams, useResources } from '.' import type { IJsonItem } from '../types' export function useHiveCli(model: { [field: string]: any }): IJsonItem[] { const { t } = useI18n() + const hiveSqlScriptSpan = computed(() => (model.hiveCliTaskExecutionType === 'SCRIPT' ? 24 : 0)) return [ { @@ -27,7 +29,11 @@ export function useHiveCli(model: { [field: string]: any }): IJsonItem[] { field: 'hiveCliTaskExecutionType', span: 12, name: t('project.node.hive_cli_task_execution_type'), - options: HIVE_CLI_TASK_EXECUTION_TYPES + options: HIVE_CLI_TASK_EXECUTION_TYPES, + validate: { + trigger: ['input', 'blur'], + required: true + } }, { type: 'editor', @@ -35,7 +41,12 @@ export function useHiveCli(model: { [field: string]: any }): IJsonItem[] { name: t('project.node.hive_sql_script'), props: { language: 'sql' - } + }, + validate: { + trigger: ['input', 'blur'], + required: true + }, + span: hiveSqlScriptSpan }, { type: 'input', diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts index c740384bc3..9c3184bf83 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts @@ -42,7 +42,8 @@ export function useHiveCli({ failRetryTimes: 0, workerGroup: 'default', delayTime: 0, - timeout: 30 + timeout: 30, + hiveCliTaskExecutionType: 'SCRIPT' } as INodeData) let extra: IJsonItem[] = []