diff --git a/internal/web/actions/default/servers/components/cache/index.go b/internal/web/actions/default/servers/components/cache/index.go index be7100f2..058bdee4 100644 --- a/internal/web/actions/default/servers/components/cache/index.go +++ b/internal/web/actions/default/servers/components/cache/index.go @@ -17,15 +17,18 @@ func (this *IndexAction) Init() { } func (this *IndexAction) RunGet(params struct { - ClusterId int64 - Keyword string + ClusterId int64 + Keyword string + StorageType string }) { this.Data["keyword"] = params.Keyword this.Data["clusterId"] = params.ClusterId + this.Data["storageType"] = params.StorageType countResp, err := this.RPC().HTTPCachePolicyRPC().CountAllEnabledHTTPCachePolicies(this.AdminContext(), &pb.CountAllEnabledHTTPCachePoliciesRequest{ NodeClusterId: params.ClusterId, Keyword: params.Keyword, + Type: params.StorageType, }) if err != nil { this.ErrorPage(err) @@ -38,6 +41,7 @@ func (this *IndexAction) RunGet(params struct { listResp, err := this.RPC().HTTPCachePolicyRPC().ListEnabledHTTPCachePolicies(this.AdminContext(), &pb.ListEnabledHTTPCachePoliciesRequest{ Keyword: params.Keyword, NodeClusterId: params.ClusterId, + Type: params.StorageType, Offset: page.Offset, Size: page.Size, }) @@ -70,5 +74,8 @@ func (this *IndexAction) RunGet(params struct { } this.Data["infos"] = infos + // 所有的存储类型 + this.Data["storageTypes"] = serverconfigs.AllCachePolicyStorageTypes + this.Show() } diff --git a/web/views/@default/servers/components/cache/createPopup.html b/web/views/@default/servers/components/cache/createPopup.html index ecb4170d..e39f30b6 100644 --- a/web/views/@default/servers/components/cache/createPopup.html +++ b/web/views/@default/servers/components/cache/createPopup.html @@ -35,7 +35,7 @@
作为一级缓存的内存最大容量,如果为0表示不使用内存作为一级缓存。