修改SSH时自动填入SSH主机地址/节点设置--SSH设置增加连接测试

This commit is contained in:
刘祥超
2022-04-09 21:44:34 +08:00
parent 2d8224fd12
commit 75b2b2bdb2
6 changed files with 114 additions and 7 deletions

View File

@@ -27,4 +27,27 @@ Tea.context(function () {
}
}
}
// 测试相关
this.resp = null
this.isTesting = false
if (this.grant != null && this.grant.id > 0 && this.sshHost.length > 0 && this.sshPort.toString().length > 0) {
this.isTesting = true
this.$delay(function () {
this.$post(".test")
.params({
grantId: this.grant.id,
host: this.sshHost,
port: this.sshPort
})
.success(function (resp) {
this.resp = resp.data
})
.done(function () {
this.isTesting = false
})
}, 1000)
}
})