mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-17 22:30:25 +08:00
修复在自动安装过程中不能填写SSH认证用户名的Bug
This commit is contained in:
@@ -43,6 +43,9 @@ func (this *CreatePopupAction) RunPost(params struct {
|
|||||||
this.FailField("username", "请输入SSH登录用户名")
|
this.FailField("username", "请输入SSH登录用户名")
|
||||||
}
|
}
|
||||||
case "privateKey":
|
case "privateKey":
|
||||||
|
if len(params.Username) == 0 {
|
||||||
|
this.FailField("username", "请输入SSH登录用户名")
|
||||||
|
}
|
||||||
if len(params.PrivateKey) == 0 {
|
if len(params.PrivateKey) == 0 {
|
||||||
this.FailField("privateKey", "请输入RSA私钥")
|
this.FailField("privateKey", "请输入RSA私钥")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,9 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
|||||||
this.FailField("username", "请输入SSH登录用户名")
|
this.FailField("username", "请输入SSH登录用户名")
|
||||||
}
|
}
|
||||||
case "privateKey":
|
case "privateKey":
|
||||||
|
if len(params.Username) == 0 {
|
||||||
|
this.FailField("username", "请输入SSH登录用户名")
|
||||||
|
}
|
||||||
if len(params.PrivateKey) == 0 {
|
if len(params.PrivateKey) == 0 {
|
||||||
this.FailField("privateKey", "请输入RSA私钥")
|
this.FailField("privateKey", "请输入RSA私钥")
|
||||||
}
|
}
|
||||||
|
|||||||
5
web/views/@default/clusters/cluster/updateNodeSSH.js
Normal file
5
web/views/@default/clusters/cluster/updateNodeSSH.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Tea.context(function () {
|
||||||
|
if (this.params.port <= 0) {
|
||||||
|
this.params.port = 22
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -37,6 +37,13 @@
|
|||||||
|
|
||||||
<!-- 私钥 -->
|
<!-- 私钥 -->
|
||||||
<tbody v-if="method == 'privateKey'">
|
<tbody v-if="method == 'privateKey'">
|
||||||
|
<tr>
|
||||||
|
<td>SSH用户名 *</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="username" maxlength="100"/>
|
||||||
|
<p class="comment">SSH登录用户名。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>RSA私钥 *</td>
|
<td>RSA私钥 *</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -39,6 +39,13 @@
|
|||||||
|
|
||||||
<!-- 私钥 -->
|
<!-- 私钥 -->
|
||||||
<tbody v-if="method == 'privateKey'">
|
<tbody v-if="method == 'privateKey'">
|
||||||
|
<tr>
|
||||||
|
<td>SSH用户名 *</td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="username" maxlength="100" v-model="grant.username"/>
|
||||||
|
<p class="comment">SSH登录用户名。</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>RSA私钥 *</td>
|
<td>RSA私钥 *</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
Reference in New Issue
Block a user