diff --git a/src/i18n/langs/cn.json b/src/i18n/langs/cn.json index 272201818..dac6c730d 100644 --- a/src/i18n/langs/cn.json +++ b/src/i18n/langs/cn.json @@ -151,6 +151,7 @@ "DateLastWeek": "最近一周", "DateLastMonth": "最近一月", "DateLast3Months": "最近三月", + "TestSuccessMsg": "测试成功", "MFAConfirm": "MFA 认证", "Yes": "是", "No": "否", diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index d87e3c1e9..f921de8c6 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -147,6 +147,7 @@ "CrontabHelpTips": "eg: Every Sunday 03:05 run <5 3 * * 0>
Tips:Using 5 digits linux crontab expressions (Online tools)
Note:If both Regularly perform and Cycle perform are set,give priority to Regularly perform", "BadRequestErrorMsg" : "Bad request, please check again", "DateLast24Hours": "Last 24 hours", + "TestSuccessMsg": "Test Success", "DateLastWeek": "Last week", "DateLastMonth": "Last month", "DateLast3Months": "Last 3 months", diff --git a/src/views/assets/Domain/DomainDetail/GatewayList.vue b/src/views/assets/Domain/DomainDetail/GatewayList.vue index b9a4dd035..2d2a45171 100644 --- a/src/views/assets/Domain/DomainDetail/GatewayList.vue +++ b/src/views/assets/Domain/DomainDetail/GatewayList.vue @@ -66,7 +66,14 @@ export default { name: 'TestConnection', title: this.$t('assets.TestConnection'), callback: function(val) { - console.log(val) + if (!val.row.port) { + return this.$message.error(this.$t('common.BadRequestErrorMsg')) + } + this.$axios.post(`/api/v1/assets/gateways/${val.cellValue}/test-connective/`, { port: val.row.port }).then( + res => { + return this.$message.success(this.$t('common.TestSuccessMsg')) + } + ) } } ]