Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e766372a81 | ||
|
|
c5ee9f095a | ||
|
|
9734ed1cf8 | ||
|
|
548d122c64 | ||
|
|
c5205ef7a9 |
@@ -1,7 +1,7 @@
|
||||
package teaconst
|
||||
|
||||
const (
|
||||
Version = "0.2.6"
|
||||
Version = "0.2.8"
|
||||
|
||||
ProductName = "Edge Admin"
|
||||
ProcessName = "edge-admin"
|
||||
|
||||
@@ -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私钥")
|
||||
}
|
||||
|
||||
@@ -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私钥")
|
||||
}
|
||||
|
||||
@@ -67,6 +67,10 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
ParamAccessKeyId string
|
||||
ParamAccessKeySecret string
|
||||
|
||||
// HuaweiDNS
|
||||
ParamHuaweiAccessKeyId string
|
||||
ParamHuaweiAccessKeySecret string
|
||||
|
||||
// DNS.COM
|
||||
ParamApiKey string
|
||||
ParamApiSecret string
|
||||
@@ -111,6 +115,15 @@ func (this *CreatePopupAction) RunPost(params struct {
|
||||
|
||||
apiParams["accessKeyId"] = params.ParamAccessKeyId
|
||||
apiParams["accessKeySecret"] = params.ParamAccessKeySecret
|
||||
case "huaweiDNS":
|
||||
params.Must.
|
||||
Field("paramHuaweiAccessKeyId", params.ParamHuaweiAccessKeyId).
|
||||
Require("请输入AccessKeyId").
|
||||
Field("paramHuaweiAccessKeySecret", params.ParamHuaweiAccessKeySecret).
|
||||
Require("请输入AccessKeySecret")
|
||||
|
||||
apiParams["accessKeyId"] = params.ParamHuaweiAccessKeyId
|
||||
apiParams["accessKeySecret"] = params.ParamHuaweiAccessKeySecret
|
||||
case "dnscom":
|
||||
params.Must.
|
||||
Field("paramApiKey", params.ParamApiKey).
|
||||
|
||||
@@ -96,6 +96,10 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
ParamAccessKeyId string
|
||||
ParamAccessKeySecret string
|
||||
|
||||
// HuaweiDNS
|
||||
ParamHuaweiAccessKeyId string
|
||||
ParamHuaweiAccessKeySecret string
|
||||
|
||||
// DNS.COM
|
||||
ParamApiKey string
|
||||
ParamApiSecret string
|
||||
@@ -142,6 +146,15 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
|
||||
apiParams["accessKeyId"] = params.ParamAccessKeyId
|
||||
apiParams["accessKeySecret"] = params.ParamAccessKeySecret
|
||||
case "huaweiDNS":
|
||||
params.Must.
|
||||
Field("paramHuaweiAccessKeyId", params.ParamHuaweiAccessKeyId).
|
||||
Require("请输入AccessKeyId").
|
||||
Field("paramHuaweiAccessKeySecret", params.ParamHuaweiAccessKeySecret).
|
||||
Require("请输入AccessKeySecret")
|
||||
|
||||
apiParams["accessKeyId"] = params.ParamHuaweiAccessKeyId
|
||||
apiParams["accessKeySecret"] = params.ParamHuaweiAccessKeySecret
|
||||
case "dnscom":
|
||||
params.Must.
|
||||
Field("paramApiKey", params.ParamApiKey).
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
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":
|
||||
teaweb.warn("需要填写SSH登录信息", function () {
|
||||
teaweb.popup("/clusters/cluster/updateNodeSSH?nodeId=" + nodeId, {
|
||||
height: "30em",
|
||||
callback: function () {
|
||||
teaweb.reload()
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -61,6 +61,24 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- 华为云 -->
|
||||
<tbody v-if="type == 'huaweiDNS'">
|
||||
<tr>
|
||||
<td>AccessKeyId *</td>
|
||||
<td>
|
||||
<input type="text" name="paramHuaweiAccessKeyId" maxlength="100"/>
|
||||
<p class="comment">登录华为云控制台 -- 在"我的凭证 -- 访问密钥"中创建和获取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AccessKeySecret *</td>
|
||||
<td>
|
||||
<input type="text" name="paramHuaweiAccessKeySecret" maxlength="100"/>
|
||||
<p class="comment">登录华为云控制台 -- 在"我的凭证 -- 访问密钥"中创建和获取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- CloudFlare -->
|
||||
<tbody v-if="type == 'cloudFlare'">
|
||||
<tr>
|
||||
|
||||
@@ -43,6 +43,18 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- HuaweiDNS -->
|
||||
<tbody v-if="provider.type == 'huaweiDNS'">
|
||||
<tr>
|
||||
<td>AccessKeyId</td>
|
||||
<td>{{provider.apiParams.accessKeyId}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AccessKeySecret</td>
|
||||
<td>{{provider.apiParams.accessKeySecret}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- CloudFlare -->
|
||||
<tbody v-if="provider.type == 'cloudFlare'">
|
||||
<tr>
|
||||
|
||||
@@ -60,6 +60,24 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<!-- 华为云 -->
|
||||
<tbody v-if="provider.type == 'huaweiDNS'">
|
||||
<tr>
|
||||
<td>AccessKeyId *</td>
|
||||
<td>
|
||||
<input type="text" name="paramHuaweiAccessKeyId" maxlength="100" v-model="provider.params.accessKeyId"/>
|
||||
<p class="comment">登录华为云控制台 -- 在"我的凭证 -- 访问密钥"中创建和获取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>AccessKeySecret *</td>
|
||||
<td>
|
||||
<input type="text" name="paramHuaweiAccessKeySecret" maxlength="100" v-model="provider.params.accessKeySecret"/>
|
||||
<p class="comment">登录华为云控制台 -- 在"我的凭证 -- 访问密钥"中创建和获取。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
|
||||
<!-- CloudFlare -->
|
||||
<tbody v-if="provider.type == 'cloudFlare'">
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user