Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9734ed1cf8 | ||
|
|
548d122c64 | ||
|
|
c5205ef7a9 |
@@ -1,7 +1,7 @@
|
|||||||
package teaconst
|
package teaconst
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Version = "0.2.6"
|
Version = "0.2.7"
|
||||||
|
|
||||||
ProductName = "Edge Admin"
|
ProductName = "Edge Admin"
|
||||||
ProcessName = "edge-admin"
|
ProcessName = "edge-admin"
|
||||||
|
|||||||
@@ -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私钥")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Vue.component("grant-selector", {
|
|||||||
// 创建授权
|
// 创建授权
|
||||||
create: function () {
|
create: function () {
|
||||||
teaweb.popup("/clusters/grants/createPopup", {
|
teaweb.popup("/clusters/grants/createPopup", {
|
||||||
height: "31em",
|
height: "26em",
|
||||||
callback: (resp) => {
|
callback: (resp) => {
|
||||||
this.grantId = resp.data.grant.id;
|
this.grantId = resp.data.grant.id;
|
||||||
if (this.grantId > 0) {
|
if (this.grantId > 0) {
|
||||||
@@ -40,7 +40,7 @@ Vue.component("grant-selector", {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
teaweb.popup("/clusters/grants/updatePopup?grantId=" + this.grant.id, {
|
teaweb.popup("/clusters/grants/updatePopup?grantId=" + this.grant.id, {
|
||||||
height: "31em",
|
height: "26em",
|
||||||
callback: (resp) => {
|
callback: (resp) => {
|
||||||
this.grant = resp.data.grant;
|
this.grant = resp.data.grant;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ Tea.context(function () {
|
|||||||
case "EMPTY_GRANT":
|
case "EMPTY_GRANT":
|
||||||
teaweb.warn("需要填写SSH登录信息", function () {
|
teaweb.warn("需要填写SSH登录信息", function () {
|
||||||
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||||
|
height: "30em",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
teaweb.reload()
|
teaweb.reload()
|
||||||
}
|
}
|
||||||
@@ -123,6 +124,7 @@ Tea.context(function () {
|
|||||||
case "SSH登录失败,请检查设置":
|
case "SSH登录失败,请检查设置":
|
||||||
teaweb.warn("需要填写SSH登录信息", function () {
|
teaweb.warn("需要填写SSH登录信息", function () {
|
||||||
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||||
|
height: "30em",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
teaweb.reload()
|
teaweb.reload()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ Tea.context(function () {
|
|||||||
case "EMPTY_GRANT":
|
case "EMPTY_GRANT":
|
||||||
teaweb.warn("需要填写SSH登录信息", function () {
|
teaweb.warn("需要填写SSH登录信息", function () {
|
||||||
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||||
|
height: "30em",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
that.install()
|
that.install()
|
||||||
}
|
}
|
||||||
@@ -69,6 +70,7 @@ Tea.context(function () {
|
|||||||
case "SSH_LOGIN_FAILED":
|
case "SSH_LOGIN_FAILED":
|
||||||
teaweb.warn("SSH登录失败,请检查设置", function () {
|
teaweb.warn("SSH登录失败,请检查设置", function () {
|
||||||
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||||
|
height: "30em",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
that.install()
|
that.install()
|
||||||
}
|
}
|
||||||
|
|||||||
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
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -114,6 +114,7 @@ Tea.context(function () {
|
|||||||
case "EMPTY_GRANT":
|
case "EMPTY_GRANT":
|
||||||
teaweb.warn("需要填写SSH登录信息", function () {
|
teaweb.warn("需要填写SSH登录信息", function () {
|
||||||
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||||
|
height: "30em",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
teaweb.reload()
|
teaweb.reload()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ Tea.context(function () {
|
|||||||
case "EMPTY_GRANT":
|
case "EMPTY_GRANT":
|
||||||
teaweb.warn("需要填写SSH登录信息", function () {
|
teaweb.warn("需要填写SSH登录信息", function () {
|
||||||
teaweb.popup("/ns/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
teaweb.popup("/ns/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||||
|
height: "30em",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
that.install()
|
that.install()
|
||||||
}
|
}
|
||||||
@@ -69,6 +70,7 @@ Tea.context(function () {
|
|||||||
case "SSH_LOGIN_FAILED":
|
case "SSH_LOGIN_FAILED":
|
||||||
teaweb.warn("SSH登录失败,请检查设置", function () {
|
teaweb.warn("SSH登录失败,请检查设置", function () {
|
||||||
teaweb.popup("/ns/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
teaweb.popup("/ns/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||||
|
height: "30em",
|
||||||
callback: function () {
|
callback: function () {
|
||||||
that.install()
|
that.install()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user