From ed42dcab9caa8a1296a743938d698c52226c75a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 17 Nov 2021 20:25:31 +0800 Subject: [PATCH] =?UTF-8?q?IP=E5=90=8D=E5=8D=95=E5=A2=9E=E5=8A=A0=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E5=8F=AA=E6=98=BE=E7=A4=BA=E8=87=AA=E5=8A=A8=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=E5=90=8D=E5=8D=95=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/actions/default/servers/iplists/index.go | 16 +++++++++++----- web/views/@default/servers/iplists/index.html | 8 +++++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/internal/web/actions/default/servers/iplists/index.go b/internal/web/actions/default/servers/iplists/index.go index aa0d1464..8b9eb388 100644 --- a/internal/web/actions/default/servers/iplists/index.go +++ b/internal/web/actions/default/servers/iplists/index.go @@ -19,12 +19,17 @@ func (this *IndexAction) Init() { } func (this *IndexAction) RunGet(params struct { - Ip string + Ip string + GlobalOnly bool }) { this.Data["type"] = "" this.Data["ip"] = params.Ip + this.Data["globalOnly"] = params.GlobalOnly - countResp, err := this.RPC().IPItemRPC().CountAllEnabledIPItems(this.AdminContext(), &pb.CountAllEnabledIPItemsRequest{Ip: params.Ip}) + countResp, err := this.RPC().IPItemRPC().CountAllEnabledIPItems(this.AdminContext(), &pb.CountAllEnabledIPItemsRequest{ + Ip: params.Ip, + GlobalOnly: params.GlobalOnly, + }) if err != nil { this.ErrorPage(err) return @@ -34,9 +39,10 @@ func (this *IndexAction) RunGet(params struct { this.Data["page"] = page.AsHTML() itemsResp, err := this.RPC().IPItemRPC().ListAllEnabledIPItems(this.AdminContext(), &pb.ListAllEnabledIPItemsRequest{ - Ip: params.Ip, - Offset: page.Offset, - Size: page.Size, + Ip: params.Ip, + GlobalOnly: params.GlobalOnly, + Offset: page.Offset, + Size: page.Size, }) if err != nil { this.ErrorPage(err) diff --git a/web/views/@default/servers/iplists/index.html b/web/views/@default/servers/iplists/index.html index 9aa18122..2d372b6b 100644 --- a/web/views/@default/servers/iplists/index.html +++ b/web/views/@default/servers/iplists/index.html @@ -7,10 +7,16 @@
+
+
+ + +
+
  - [清除条件] + [清除条件]