mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	节点设置中增加“通过IP名单”选项
This commit is contained in:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user