节点设置中增加“通过IP名单”选项

This commit is contained in:
刘祥超
2022-10-26 10:41:42 +08:00
parent 35028d1310
commit 3ec875d49d
4 changed files with 27 additions and 9 deletions

View File

@@ -318,6 +318,7 @@ func (this *DetailAction) RunGet(params struct {
"level": node.Level,
"levelInfo": nodeconfigs.FindNodeLevel(int(node.Level)),
"lnAddrs": lnAddrs,
"enableIPLists": node.EnableIPLists,
"status": maps.Map{
"isActive": status.IsActive,

View File

@@ -100,14 +100,15 @@ func (this *UpdateAction) RunGet(params struct {
}
var nodeMap = maps.Map{
"id": node.Id,
"name": node.Name,
"ipAddresses": ipAddressMaps,
"cluster": clusterMap,
"isOn": node.IsOn,
"group": groupMap,
"region": regionMap,
"level": node.Level,
"id": node.Id,
"name": node.Name,
"ipAddresses": ipAddressMaps,
"cluster": clusterMap,
"isOn": node.IsOn,
"group": groupMap,
"region": regionMap,
"level": node.Level,
"enableIPLists": node.EnableIPLists,
}
if node.LnAddrs == nil {
@@ -157,6 +158,7 @@ func (this *UpdateAction) RunPost(params struct {
IsOn bool
Level int32
LnAddrs []string
EnableIPLists bool
Must *actions.Must
}) {
@@ -234,6 +236,7 @@ func (this *UpdateAction) RunPost(params struct {
IsOn: params.IsOn,
Level: params.Level,
LnAddrs: lnAddrs,
EnableIPLists: params.EnableIPLists,
})
if err != nil {
this.ErrorPage(err)

View File

@@ -8,7 +8,7 @@
<td>{{node.name}}</td>
</tr>
<tr>
<td>状态</td>
<td>启用状态</td>
<td><label-on :v-is-on="node.isOn"></label-on></td>
</tr>
<tr>
@@ -101,6 +101,13 @@
<td colspan="2"><more-options-indicator>更多选项</more-options-indicator></td>
</tr>
<tbody v-show="moreOptionsVisible">
<tr>
<td>同步IP名单</td>
<td>
<span v-if="node.enableIPLists" class="green">Y</span>
<span v-else class="disabled">N</span>
</td>
</tr>
<tr>
<td>SSH主机地址</td>
<td>

View File

@@ -61,6 +61,13 @@
<p class="comment">如果不为空边缘节点访问当前L2节点时将会使用这些IP地址如果没有设置将会使用当前节点已经填写的IP地址。</p>
</td>
</tr>
<tr>
<td>同步IP名单</td>
<td>
<checkbox name="enableIPLists" v-model="node.enableIPLists"></checkbox>
<p class="comment">选中后表示启用IP名单同步包括来自管理员、用户添加的IP名单以及其他节点系统自动拦截的IP名单。</p>
</td>
</tr>
<tr>
<td>启用节点</td>
<td>