mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-25 14:34:46 +00:00
feat: 支持CMPPv2.0协议短信网关
This commit is contained in:
committed by
Jiangjie.Bai
parent
a8867dee83
commit
0639b139d7
@@ -918,10 +918,11 @@
|
||||
"EnableKoKoSSHHelpText": "Enabled, connect assets to display SSH Client pull-up method",
|
||||
"SettingInEndpointHelpText": "Configure the service address and port in System Settings / Terminal Settings / Service Endpoints",
|
||||
"Feature": "Feature",
|
||||
"SMSProvider": "SMS provider",
|
||||
"SMSProvider": "SMS provider / Protocol",
|
||||
"SMS": "SMS",
|
||||
"AlibabaCloud": "Alibaba cloud",
|
||||
"TencentCloud": "Tencent cloud",
|
||||
"CMPP2": "CMPP v2.0",
|
||||
"VerifySignTmpl": "Verification code template",
|
||||
"Radius": "Radius",
|
||||
"Enable": "Enable",
|
||||
|
||||
@@ -941,6 +941,7 @@
|
||||
"Feature": "機能",
|
||||
"AlibabaCloud": "Alibaba cloud",
|
||||
"TencentCloud": "テンセント雲",
|
||||
"CMPP2": "CMPP v2.0",
|
||||
"Radius": "Radius",
|
||||
"VerifySignTmpl": "認証コードメールテンプレート",
|
||||
"Enable": "有効化",
|
||||
@@ -1129,7 +1130,7 @@
|
||||
"SMS": "SMS設定",
|
||||
"feiShuTest": "テスト",
|
||||
"setting": "設定",
|
||||
"SMSProvider": "メールサービス業者"
|
||||
"SMSProvider": "メールサービス業者 / プロトコル"
|
||||
},
|
||||
"tickets": {
|
||||
"OneAssigneeType": "一次受付者タイプ",
|
||||
|
||||
@@ -943,6 +943,7 @@
|
||||
"Feature": "功能",
|
||||
"AlibabaCloud": "阿里云",
|
||||
"TencentCloud": "腾讯云",
|
||||
"CMPP2": "CMPP v2.0",
|
||||
"Radius": "Radius",
|
||||
"VerifySignTmpl": "验证码短信模板",
|
||||
"Enable": "启用",
|
||||
@@ -1130,7 +1131,7 @@
|
||||
"SMS": "短信设置",
|
||||
"feiShuTest": "测试",
|
||||
"setting": "设置",
|
||||
"SMSProvider": "短信服务商"
|
||||
"SMSProvider": "短信服务商 / 协议"
|
||||
},
|
||||
"tickets": {
|
||||
"OneAssigneeType": "一级受理人类型",
|
||||
|
||||
69
src/views/settings/SMS/CMPP2.vue
Normal file
69
src/views/settings/SMS/CMPP2.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<BaseSMS :title="$t('setting.CMPP2')" :config="$data" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BaseSMS from './Base'
|
||||
import { UpdateToken } from '@/components/FormFields'
|
||||
|
||||
export default {
|
||||
name: 'CMPP2',
|
||||
components: {
|
||||
BaseSMS
|
||||
},
|
||||
data() {
|
||||
const vm = this
|
||||
return {
|
||||
url: `/api/v1/settings/setting/?category=cmpp2`,
|
||||
hasDetailInMsg: false,
|
||||
visible: false,
|
||||
moreButtons: [
|
||||
{
|
||||
title: this.$t('common.Test'),
|
||||
callback: function(value, form) {
|
||||
vm.$axios.post(
|
||||
`/api/v1/settings/sms/cmpp2/testing/`,
|
||||
value
|
||||
).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
}).catch(() => {
|
||||
vm.$log.error('err occur')
|
||||
})
|
||||
}
|
||||
}
|
||||
],
|
||||
fields: [
|
||||
[
|
||||
this.$t('common.BasicInfo'),
|
||||
[
|
||||
'CMPP2_HOST', 'CMPP2_PORT', 'CMPP2_SP_ID', 'CMPP2_SP_SECRET', 'CMPP2_SRC_ID', 'CMPP2_SERVICE_ID',
|
||||
'CMPP2_VERIFY_SIGN_NAME', 'CMPP2_VERIFY_TEMPLATE_CODE'
|
||||
]
|
||||
],
|
||||
[
|
||||
this.$t('common.Other'),
|
||||
[
|
||||
'SMS_TEST_PHONE'
|
||||
]
|
||||
]
|
||||
],
|
||||
fieldsMeta: {
|
||||
CMPP2_SP_SECRET: {
|
||||
component: UpdateToken
|
||||
}
|
||||
},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
callback: function(value, form, btn) {
|
||||
btn.loading = true
|
||||
vm.$axios.post(
|
||||
`/api/v1/settings/alibaba/testing/`,
|
||||
`/api/v1/settings/sms/alibaba/testing/`,
|
||||
value
|
||||
).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
callback: function(value, form, btn) {
|
||||
btn.loading = true
|
||||
vm.$axios.post(
|
||||
`/api/v1/settings/tencent/testing/`,
|
||||
`/api/v1/settings/sms/tencent/testing/`,
|
||||
value
|
||||
).then(res => {
|
||||
vm.$message.success(res['msg'])
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import GenericCreateUpdatePage from '@/layout/components/GenericCreateUpdatePage'
|
||||
import SMSAlibaba from './SMSAlibaba'
|
||||
import SMSTencent from './SMSTencent'
|
||||
import CMPP2 from './CMPP2'
|
||||
|
||||
export default {
|
||||
name: 'Auth',
|
||||
@@ -23,7 +24,7 @@ export default {
|
||||
],
|
||||
[
|
||||
this.$t('setting.SMSProvider'), [
|
||||
'ALIYUN', 'QCLOUD'
|
||||
'ALIYUN', 'QCLOUD', 'CMPP2'
|
||||
]
|
||||
]
|
||||
],
|
||||
@@ -41,6 +42,13 @@ export default {
|
||||
hidden: (form) => {
|
||||
return form['SMS_BACKEND'] !== 'tencent'
|
||||
}
|
||||
},
|
||||
CMPP2: {
|
||||
label: this.$t('setting.CMPP2'),
|
||||
component: CMPP2,
|
||||
hidden: (form) => {
|
||||
return form['SMS_BACKEND'] !== 'cmpp2'
|
||||
}
|
||||
}
|
||||
},
|
||||
submitMethod() {
|
||||
|
||||
Reference in New Issue
Block a user