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表示不使用内存作为一级缓存。

diff --git a/web/views/@default/servers/components/cache/index.html b/web/views/@default/servers/components/cache/index.html index 2a102915..4a19029d 100644 --- a/web/views/@default/servers/components/cache/index.html +++ b/web/views/@default/servers/components/cache/index.html @@ -16,10 +16,16 @@
+
+ +
  - [清除条件] + [清除条件]
@@ -38,10 +44,20 @@ - {{policy.name}} + + {{policy.name}} +   + + + {{infos[index].typeName}} ({{policy.type}}) - {{policy.capacity.count}}{{policy.capacity.unit.toUpperCase()}} + + {{policy.capacity.count}}{{policy.capacity.unit.toUpperCase()}} + + (内存:{{policy.options.memoryPolicy.capacity.count}}{{policy.options.memoryPolicy.capacity.unit.toUpperCase()}}) + + 不限 {{infos[index].countClusters}}