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 06:05:00 UTC

[dolphinscheduler] branch dev updated: Revert "[Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10056)" (#10060)

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 514d26e03f Revert "[Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10056)" (#10060)
514d26e03f is described below

commit 514d26e03f597f0b4f8a77d00e203b377d29d0a6
Author: songjianet <17...@qq.com>
AuthorDate: Tue May 17 14:04:55 2022 +0800

    Revert "[Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10056)" (#10060)
    
    This reverts commit d8b56b8e9bea5b9f01e8c6ba8b8e82605b1cfdc3.
---
 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, 61 insertions(+), 73 deletions(-)

diff --git a/dolphinscheduler-ui/src/locales/modules/en_US.ts b/dolphinscheduler-ui/src/locales/modules/en_US.ts
index 5232ddc62c..1f19d64e0d 100644
--- a/dolphinscheduler-ui/src/locales/modules/en_US.ts
+++ b/dolphinscheduler-ui/src/locales/modules/en_US.ts
@@ -934,28 +934,23 @@ 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 1f37f6ba00..191f3753de 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 185e7fcdbc..607aaf4ba5 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 bd3c00bfc8..331573c56a 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,13 +23,11 @@ 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: {
@@ -42,12 +40,7 @@ export function useModalData(
     saving: false,
     rules: {
       tenantCode: {
-        required: true,
-        validator() {
-          if (!variables.model.tenantCode) {
-            return new Error(t('security.tenant.tenant_code_tips'))
-          }
-        }
+        required: true
       },
       queueId: {
         required: true