mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-17 22:30:25 +08:00
修改SSH时自动填入SSH主机地址/节点设置--SSH设置增加连接测试
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user