Browse Source

fix ui warningInstance title support internationalization.

pull/3/MERGE
zhuangchong 3 years ago
parent
commit
e05d93aa33
  1. 10
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue
  2. 6
      dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue
  3. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js
  4. 2
      dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

10
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/_source/createWarningInstance.vue

@ -39,7 +39,7 @@
<template slot="content">
<el-select v-model="pluginDefineId" size="small" style="width: 100%" @change="changePlugin" disabled="true" v-if="item.id">
<el-option
v-for="items in pulginInstance"
v-for="items in pluginInstance"
:key="items.id"
:value="items.id"
:label="items.pluginName">
@ -47,7 +47,7 @@
</el-select>
<el-select v-model="pluginDefineId" size="small" style="width: 100%" @change="changePlugin" v-else>
<el-option
v-for="items in pulginInstance"
v-for="items in pluginInstance"
:key="items.id"
:value="items.id"
:label="items.pluginName">
@ -83,7 +83,7 @@
},
props: {
item: Object,
pulginInstance: Array
pluginInstance: Array
},
methods: {
_ok () {
@ -121,7 +121,7 @@
this.rule = JSON.parse(res.pluginParams)
this.rule.forEach(item => {
if (item.title.indexOf('$t') !== -1) {
item.title = $t(item.field)
item.title = this.$t(item.field)
}
})
}).catch(e => {
@ -163,7 +163,7 @@
this.pluginDefineId = this.item.pluginDefineId
JSON.parse(this.item.pluginInstanceParams).forEach(item => {
if (item.title.indexOf('$t') !== -1) {
item.title = $t(item.field)
item.title = this.$t(item.field)
}
pluginInstanceParams.push(item)
})

6
dolphinscheduler-ui/src/js/conf/home/pages/security/pages/warningInstance/index.vue

@ -25,7 +25,7 @@
v-if="createWarningDialog"
:visible.sync="createWarningDialog"
width="auto">
<m-create-warning-instance :item="item" :pulginInstance="pulginInstance" @onUpdate="onUpdate" @close="close"></m-create-warning-instance>
<m-create-warning-instance :item="item" :pluginInstance="pluginInstance" @onUpdate="onUpdate" @close="close"></m-create-warning-instance>
</el-dialog>
</template>
</m-conditions>
@ -86,7 +86,7 @@
isADMIN: store.state.user.userInfo.userType === 'ADMIN_USER',
createWarningDialog: false,
item: {},
pulginInstance: []
pluginInstance: []
}
},
mixins: [listUrlParamHandle],
@ -114,7 +114,7 @@
},
_create (item) {
this.getPlugins({ pluginType: 'ALERT' }).then(res => {
this.pulginInstance = res
this.pluginInstance = res
}).catch(e => {
this.$message.error(e.msg)
})

2
dolphinscheduler-ui/src/js/module/i18n/locale/en_US.js

@ -400,6 +400,8 @@ export default {
'Please select a notification group': 'Please select a notification group',
Recipient: 'Recipient',
Cc: 'Cc',
receivers: 'receivers',
receiverCcs: 'receiverCcs',
'Whether it is a complement process?': 'Whether it is a complement process?',
'Schedule date': 'Schedule date',
'Mode of execution': 'Mode of execution',

2
dolphinscheduler-ui/src/js/module/i18n/locale/zh_CN.js

@ -400,6 +400,8 @@ export default {
'Please select a notification group': '请选择通知组',
Recipient: '收件人',
Cc: '抄送人',
receivers: '收件人',
receiverCcs: '抄送人',
'Whether it is a complement process?': '是否补数',
'Schedule date': '调度日期',
'Mode of execution': '执行方式',

Loading…
Cancel
Save