You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by so...@apache.org on 2022/05/17 03:32:47 UTC
[dolphinscheduler] branch dev updated: [Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10056)
This is an automated email from the ASF dual-hosted git repository.
songjian 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 d8b56b8e9b [Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10056)
d8b56b8e9b is described below
commit d8b56b8e9bea5b9f01e8c6ba8b8e82605b1cfdc3
Author: songjianet <17...@qq.com>
AuthorDate: Tue May 17 11:32:41 2022 +0800
[Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10056)
---
dolphinscheduler-ui/src/locales/modules/en_US.ts | 15 ++-
.../task/components/node/fields/use-jupyter.ts | 108 ++++++++++-----------
.../task/components/node/fields/use-rules.ts | 2 +-
.../tenant-manage/components/use-modalData.ts | 9 +-
4 files changed, 73 insertions(+), 61 deletions(-)
diff --git a/dolphinscheduler-ui/src/locales/modules/en_US.ts b/dolphinscheduler-ui/src/locales/modules/en_US.ts
index 1f19d64e0d..5232ddc62c 100644
--- a/dolphinscheduler-ui/src/locales/modules/en_US.ts
+++ b/dolphinscheduler-ui/src/locales/modules/en_US.ts
@@ -934,23 +934,28 @@ const project = {
zeppelin_paragraph_id_tips:
'Please enter the paragraph id of your zeppelin paragraph',
jupyter_conda_env_name: 'condaEnvName',
- jupyter_conda_env_name_tips: 'Please enter the conda environment name of papermill',
+ jupyter_conda_env_name_tips:
+ 'Please enter the conda environment name of papermill',
jupyter_input_note_path: 'inputNotePath',
jupyter_input_note_path_tips: 'Please enter the input jupyter note path',
jupyter_output_note_path: 'outputNotePath',
jupyter_output_note_path_tips: 'Please enter the output jupyter note path',
jupyter_parameters: 'parameters',
- jupyter_parameters_tips: 'Please enter the parameters for jupyter parameterization',
+ jupyter_parameters_tips:
+ 'Please enter the parameters for jupyter parameterization',
jupyter_kernel: 'kernel',
jupyter_kernel_tips: 'Please enter the jupyter kernel name',
jupyter_engine: 'engine',
jupyter_engine_tips: 'Please enter the engine name',
jupyter_execution_timeout: 'executionTimeout',
- jupyter_execution_timeout_tips: 'Please enter the execution timeout for each jupyter note cell',
+ jupyter_execution_timeout_tips:
+ 'Please enter the execution timeout for each jupyter note cell',
jupyter_start_timeout: 'startTimeout',
- jupyter_start_timeout_tips: 'Please enter the start timeout for jupyter kernel',
+ jupyter_start_timeout_tips:
+ 'Please enter the start timeout for jupyter kernel',
jupyter_others: 'others',
- jupyter_others_tips: 'Please enter the other options you need for papermill',
+ jupyter_others_tips:
+ 'Please enter the other options you need for papermill',
send_email: 'Send Email',
log_display: 'Log display',
rows_of_result: 'rows of result',
diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-jupyter.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-jupyter.ts
index 191f3753de..1f37f6ba00 100644
--- a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-jupyter.ts
+++ b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-jupyter.ts
@@ -80,15 +80,15 @@ export function useJupyter(model: { [field: string]: any }): IJsonItem[] {
props: {
placeholder: t('project.node.jupyter_parameters_tips')
}
-// validate: {
-// trigger: ['input', 'blur'],
-// required: false,
-// validator(validate: any, value: string) {
-// if (!value) {
-// return new Error(t('project.node.jupyter_parameters_tips'))
-// }
-// }
-// }
+ // validate: {
+ // trigger: ['input', 'blur'],
+ // required: false,
+ // validator(validate: any, value: string) {
+ // if (!value) {
+ // return new Error(t('project.node.jupyter_parameters_tips'))
+ // }
+ // }
+ // }
},
{
type: 'input',
@@ -97,15 +97,15 @@ export function useJupyter(model: { [field: string]: any }): IJsonItem[] {
props: {
placeholder: t('project.node.jupyter_kernel_tips')
}
-// validate: {
-// trigger: ['input', 'blur'],
-// required: false,
-// validator(validate: any, value: string) {
-// if (!value) {
-// return new Error(t('project.node.jupyter_kernel_tips'))
-// }
-// }
-// }
+ // validate: {
+ // trigger: ['input', 'blur'],
+ // required: false,
+ // validator(validate: any, value: string) {
+ // if (!value) {
+ // return new Error(t('project.node.jupyter_kernel_tips'))
+ // }
+ // }
+ // }
},
{
type: 'input',
@@ -114,15 +114,15 @@ export function useJupyter(model: { [field: string]: any }): IJsonItem[] {
props: {
placeholder: t('project.node.jupyter_engine_tips')
}
-// validate: {
-// trigger: ['input', 'blur'],
-// required: false,
-// validator(validate: any, value: string) {
-// if (!value) {
-// return new Error(t('project.node.jupyter_engine_tips'))
-// }
-// }
-// }
+ // validate: {
+ // trigger: ['input', 'blur'],
+ // required: false,
+ // validator(validate: any, value: string) {
+ // if (!value) {
+ // return new Error(t('project.node.jupyter_engine_tips'))
+ // }
+ // }
+ // }
},
{
type: 'input',
@@ -131,15 +131,15 @@ export function useJupyter(model: { [field: string]: any }): IJsonItem[] {
props: {
placeholder: t('project.node.jupyter_execution_timeout_tips')
}
-// validate: {
-// trigger: ['input', 'blur'],
-// required: false,
-// validator(validate: any, value: string) {
-// if (!value) {
-// return new Error(t('project.node.jupyter_execution_timeout_tips'))
-// }
-// }
-// }
+ // validate: {
+ // trigger: ['input', 'blur'],
+ // required: false,
+ // validator(validate: any, value: string) {
+ // if (!value) {
+ // return new Error(t('project.node.jupyter_execution_timeout_tips'))
+ // }
+ // }
+ // }
},
{
type: 'input',
@@ -148,15 +148,15 @@ export function useJupyter(model: { [field: string]: any }): IJsonItem[] {
props: {
placeholder: t('project.node.zeppelin_note_id_tips')
}
-// validate: {
-// trigger: ['input', 'blur'],
-// required: false,
-// validator(validate: any, value: string) {
-// if (!value) {
-// return new Error(t('project.node.jupyter_start_timeout_tips'))
-// }
-// }
-// }
+ // validate: {
+ // trigger: ['input', 'blur'],
+ // required: false,
+ // validator(validate: any, value: string) {
+ // if (!value) {
+ // return new Error(t('project.node.jupyter_start_timeout_tips'))
+ // }
+ // }
+ // }
},
{
type: 'input',
@@ -165,15 +165,15 @@ export function useJupyter(model: { [field: string]: any }): IJsonItem[] {
props: {
placeholder: t('project.node.jupyter_others_tips')
}
-// validate: {
-// trigger: ['input', 'blur'],
-// required: false,
-// validator(validate: any, value: string) {
-// if (!value) {
-// return new Error(t('project.node.jupyter_others_tips'))
-// }
-// }
-// }
+ // validate: {
+ // trigger: ['input', 'blur'],
+ // required: false,
+ // validator(validate: any, value: string) {
+ // if (!value) {
+ // return new Error(t('project.node.jupyter_others_tips'))
+ // }
+ // }
+ // }
},
...useCustomParams({ model, field: 'localParams', isSimple: false })
]
diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-rules.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-rules.ts
index 607aaf4ba5..185e7fcdbc 100644
--- a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-rules.ts
+++ b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-rules.ts
@@ -42,7 +42,7 @@ export function useRules(
const targetTableColumnOptions = ref([] as { label: string; value: number }[])
const writerDatasourceOptions = ref([] as { label: string; value: number }[])
- const fixValueSpan = computed(() => model.comparison_type === 1 ? 24 : 0)
+ const fixValueSpan = computed(() => (model.comparison_type === 1 ? 24 : 0))
let preItemLen = 0
diff --git a/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts b/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts
index 331573c56a..bd3c00bfc8 100644
--- a/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts
+++ b/dolphinscheduler-ui/src/views/security/tenant-manage/components/use-modalData.ts
@@ -23,11 +23,13 @@ import {
createTenant,
updateTenant
} from '@/service/modules/tenants'
+import { useI18n } from 'vue-i18n'
export function useModalData(
props: any,
ctx: SetupContext<('cancelModal' | 'confirmModal')[]>
) {
+ const { t } = useI18n()
const variables = reactive({
tenantFormRef: ref(),
model: {
@@ -40,7 +42,12 @@ export function useModalData(
saving: false,
rules: {
tenantCode: {
- required: true
+ required: true,
+ validator() {
+ if (!variables.model.tenantCode) {
+ return new Error(t('security.tenant.tenant_code_tips'))
+ }
+ }
},
queueId: {
required: true