Compare commits

..

3 Commits

Author SHA1 Message Date
刘祥超
9734ed1cf8 调整版本号 2021-08-03 10:40:24 +08:00
刘祥超
548d122c64 修复在自动安装过程中不能填写SSH认证用户名的Bug 2021-08-03 06:29:01 +08:00
刘祥超
c5205ef7a9 优化界面 2021-08-02 14:51:15 +08:00
11 changed files with 35 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
package teaconst
const (
Version = "0.2.6"
Version = "0.2.7"
ProductName = "Edge Admin"
ProcessName = "edge-admin"

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私钥")
}

View File

@@ -23,7 +23,7 @@ Vue.component("grant-selector", {
// 创建授权
create: function () {
teaweb.popup("/clusters/grants/createPopup", {
height: "31em",
height: "26em",
callback: (resp) => {
this.grantId = resp.data.grant.id;
if (this.grantId > 0) {
@@ -40,7 +40,7 @@ Vue.component("grant-selector", {
return;
}
teaweb.popup("/clusters/grants/updatePopup?grantId=" + this.grant.id, {
height: "31em",
height: "26em",
callback: (resp) => {
this.grant = resp.data.grant;
}

View File

@@ -114,6 +114,7 @@ Tea.context(function () {
case "EMPTY_GRANT":
teaweb.warn("需要填写SSH登录信息", function () {
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
height: "30em",
callback: function () {
teaweb.reload()
}
@@ -123,6 +124,7 @@ Tea.context(function () {
case "SSH登录失败请检查设置":
teaweb.warn("需要填写SSH登录信息", function () {
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
height: "30em",
callback: function () {
teaweb.reload()
}

View File

@@ -60,6 +60,7 @@ Tea.context(function () {
case "EMPTY_GRANT":
teaweb.warn("需要填写SSH登录信息", function () {
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
height: "30em",
callback: function () {
that.install()
}
@@ -69,6 +70,7 @@ Tea.context(function () {
case "SSH_LOGIN_FAILED":
teaweb.warn("SSH登录失败请检查设置", function () {
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
height: "30em",
callback: function () {
that.install()
}

View File

@@ -0,0 +1,5 @@
Tea.context(function () {
if (this.params.port <= 0) {
this.params.port = 22
}
})

View File

@@ -114,6 +114,7 @@ Tea.context(function () {
case "EMPTY_GRANT":
teaweb.warn("需要填写SSH登录信息", function () {
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
height: "30em",
callback: function () {
teaweb.reload()
}

View File

@@ -37,6 +37,13 @@
<!-- 私钥 -->
<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>
<td>RSA私钥 *</td>
<td>

View File

@@ -39,6 +39,13 @@
<!-- 私钥 -->
<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>
<td>RSA私钥 *</td>
<td>

View File

@@ -60,6 +60,7 @@ Tea.context(function () {
case "EMPTY_GRANT":
teaweb.warn("需要填写SSH登录信息", function () {
teaweb.popup("/ns/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
height: "30em",
callback: function () {
that.install()
}
@@ -69,6 +70,7 @@ Tea.context(function () {
case "SSH_LOGIN_FAILED":
teaweb.warn("SSH登录失败请检查设置", function () {
teaweb.popup("/ns/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
height: "30em",
callback: function () {
that.install()
}