You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by le...@apache.org on 2021/12/05 05:51:22 UTC

[dolphinscheduler] branch 2.0.1-prepare updated: [Fix][Warning instance manage] Expand the support of `i18n`. (#7186)

This is an automated email from the ASF dual-hosted git repository.

leonbao pushed a commit to branch 2.0.1-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/2.0.1-prepare by this push:
     new 52f610a  [Fix][Warning instance manage] Expand the support of `i18n`. (#7186)
52f610a is described below

commit 52f610ada1ff9c6eef6ecf2c8033091f5a5dbf93
Author: songjianet <17...@qq.com>
AuthorDate: Sun Dec 5 13:51:13 2021 +0800

    [Fix][Warning instance manage] Expand the support of `i18n`. (#7186)
---
 .../pages/warningInstance/_source/createWarningInstance.vue      | 9 +++------
 dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js           | 2 ++
 dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js           | 2 ++
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue
index 4abdf53..101b5ad 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue
@@ -122,15 +122,12 @@
         this.store.dispatch('security/getUiPluginById', {
           pluginId: this.pluginDefineId
         }).then(res => {
-          this.rule = JSON.parse(res.pluginParams)
-          this.rule.forEach(item => {
+          this.rule = JSON.parse(res.pluginParams).map(item => {
             if (item.title.indexOf('$t') !== -1) {
               item.title = this.$t(item.field)
             }
-            // fix null pointer exception
-            if (!item.props) {
-              item.props = {}
-            }
+            item.props = item.props || {}
+            return item
           })
         }).catch(e => {
           this.$message.error(e.msg || '')
diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
index 4f6b866..192d12e 100755
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
@@ -722,6 +722,7 @@ export default {
   'Recover serial wait': 'Recover serial wait',
   IsEnableProxy: 'Enable Proxy',
   WebHook: 'WebHook',
+  webHook: 'WebHook',
   Keyword: 'Keyword',
   Proxy: 'Proxy',
   receivers: 'Receivers',
@@ -747,6 +748,7 @@ export default {
   agentId: 'AgentId',
   users: 'Users',
   Username: 'Username',
+  username: 'Username',
   showType: 'Show Type',
   'Please select a task type (required)': 'Please select a task type (required)',
   layoutType: 'Layout Type',
diff --git a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
index 3339880..1b29794 100644
--- a/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
+++ b/dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js
@@ -721,6 +721,7 @@ export default {
   'Recover serial wait': '串行恢复',
   IsEnableProxy: '启用代理',
   WebHook: 'Web钩子',
+  webHook: 'Web钩子',
   Keyword: '密钥',
   Proxy: '代理',
   receivers: '收件人',
@@ -747,6 +748,7 @@ export default {
   agentId: '应用ID',
   users: '群员',
   Username: '用户名',
+  username: '用户名',
   showType: '内容展示类型',
   'Please select a task type (required)': '请选择任务类型(必选)',
   layoutType: '布局类型',