mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-04 05:00:25 +08:00
缓存策略可以使用存储类型筛选
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user