实现基本的匹配条件管理

This commit is contained in:
GoEdgeLab
2020-09-29 11:28:39 +08:00
parent 43de7e4678
commit ba2bbaff0b
19 changed files with 613 additions and 23 deletions

View File

@@ -66,11 +66,12 @@ func (this *IndexAction) RunGet(params struct {
}
func (this *IndexAction) RunPost(params struct {
WebId int64
GzipId int64
Level int
MinLength string
MaxLength string
WebId int64
GzipId int64
Level int
MinLength string
MaxLength string
CondGroupsJSON []byte
Must *actions.Must
}) {
@@ -98,10 +99,11 @@ func (this *IndexAction) RunPost(params struct {
if params.GzipId > 0 {
_, err := this.RPC().HTTPGzipRPC().UpdateHTTPGzip(this.AdminContext(), &pb.UpdateHTTPGzipRequest{
GzipId: params.GzipId,
Level: types.Int32(params.Level),
MinLength: minLength,
MaxLength: maxLength,
GzipId: params.GzipId,
Level: types.Int32(params.Level),
MinLength: minLength,
MaxLength: maxLength,
CondGroupsJSON: params.CondGroupsJSON,
})
if err != nil {
this.ErrorPage(err)
@@ -109,9 +111,10 @@ func (this *IndexAction) RunPost(params struct {
}
} else {
resp, err := this.RPC().HTTPGzipRPC().CreateHTTPGzip(this.AdminContext(), &pb.CreateHTTPGzipRequest{
Level: types.Int32(params.Level),
MinLength: minLength,
MaxLength: maxLength,
Level: types.Int32(params.Level),
MinLength: minLength,
MaxLength: maxLength,
CondGroupsJSON: params.CondGroupsJSON,
})
if err != nil {
this.ErrorPage(err)