Compare commits

..

5 Commits

Author SHA1 Message Date
刘祥超
e766372a81 域名解析支持华为云解析DNS 2021-08-04 22:14:35 +08:00
刘祥超
c5ee9f095a 调整版本号 2021-08-04 15:36:30 +08:00
刘祥超
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
16 changed files with 109 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
package teaconst
const (
Version = "0.2.6"
Version = "0.2.8"
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

@@ -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).

View File

@@ -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).

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

@@ -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>

View File

@@ -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>

View File

@@ -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'">

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()
}