[fix]完善网关测试连接性

This commit is contained in:
OrangeM21 2020-06-08 10:50:57 +08:00
parent 91aa25aca3
commit c0ad1fdb32
3 changed files with 10 additions and 1 deletions

View File

@ -151,6 +151,7 @@
"DateLastWeek": "最近一周",
"DateLastMonth": "最近一月",
"DateLast3Months": "最近三月",
"TestSuccessMsg": "测试成功",
"MFAConfirm": "MFA 认证",
"Yes": "是",
"No": "否",

View File

@ -147,6 +147,7 @@
"CrontabHelpTips": "eg: Every Sunday 03:05 run <5 3 * * 0> <br>Tips:Using 5 digits linux crontab expressions<min hour day month week> (<a href='https://tool.lu/crontab/' target='_blank'>Online tools</a>) <br>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",

View File

@ -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'))
}
)
}
}
]