From a2bf5d5a3e16cbb71b8243822ddd39347c3ddf1b Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 25 Aug 2021 18:39:35 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E7=BE=A4=E6=94=AF=E6=8C=81=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=9F=9F=E5=90=8D=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/actions/default/dns/index.go | 15 +++++++++++---- web/views/@default/dns/index.html | 19 +++++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/internal/web/actions/default/dns/index.go b/internal/web/actions/default/dns/index.go index c59a32bc..b66d2fca 100644 --- a/internal/web/actions/default/dns/index.go +++ b/internal/web/actions/default/dns/index.go @@ -14,8 +14,14 @@ func (this *IndexAction) Init() { this.Nav("dns", "dns", "") } -func (this *IndexAction) RunGet(params struct{}) { - countResp, err := this.RPC().NodeClusterRPC().CountAllEnabledNodeClusters(this.AdminContext(), &pb.CountAllEnabledNodeClustersRequest{}) +func (this *IndexAction) RunGet(params struct { + Keyword string +}) { + this.Data["keyword"] = params.Keyword + + countResp, err := this.RPC().NodeClusterRPC().CountAllEnabledNodeClusters(this.AdminContext(), &pb.CountAllEnabledNodeClustersRequest{ + Keyword: params.Keyword, + }) if err != nil { this.ErrorPage(err) return @@ -24,8 +30,9 @@ func (this *IndexAction) RunGet(params struct{}) { this.Data["page"] = page.AsHTML() clustersResp, err := this.RPC().NodeClusterRPC().ListEnabledNodeClusters(this.AdminContext(), &pb.ListEnabledNodeClustersRequest{ - Offset: page.Offset, - Size: page.Size, + Keyword: params.Keyword, + Offset: page.Offset, + Size: page.Size, }) if err != nil { this.ErrorPage(err) diff --git a/web/views/@default/dns/index.html b/web/views/@default/dns/index.html index fb009bd7..a064d8b4 100644 --- a/web/views/@default/dns/index.html +++ b/web/views/@default/dns/index.html @@ -2,7 +2,18 @@
-

暂时还没有集群。

+
+
+
+ +
+
+ +
+
+
+ +

暂时还没有集群。

@@ -15,10 +26,10 @@
- {{cluster.name}} + {{cluster.name}} - {{cluster.dnsName}}.{{cluster.domainName}} + {{cluster.dnsName}}.{{cluster.domainName}} - @@ -34,6 +45,6 @@
-

这里列出了所有集群对应的域名设置。

+

这里列出了所有集群对应的域名设置。

\ No newline at end of file