修复在自动安装过程中不能填写SSH认证用户名的Bug

This commit is contained in:
GoEdgeLab
2021-08-03 06:29:01 +08:00
parent ad4b1c9d95
commit f758a2a487
5 changed files with 25 additions and 0 deletions

View File

@@ -43,6 +43,9 @@ func (this *CreatePopupAction) RunPost(params struct {
this.FailField("username", "请输入SSH登录用户名")
}
case "privateKey":
if len(params.Username) == 0 {
this.FailField("username", "请输入SSH登录用户名")
}
if len(params.PrivateKey) == 0 {
this.FailField("privateKey", "请输入RSA私钥")
}

View File

@@ -73,6 +73,9 @@ func (this *UpdatePopupAction) RunPost(params struct {
this.FailField("username", "请输入SSH登录用户名")
}
case "privateKey":
if len(params.Username) == 0 {
this.FailField("username", "请输入SSH登录用户名")
}
if len(params.PrivateKey) == 0 {
this.FailField("privateKey", "请输入RSA私钥")
}