指标图表可以设置忽略空值和其他对象值

This commit is contained in:
GoEdgeLab
2021-07-26 16:44:22 +08:00
parent c50608d871
commit 7cb2b6cf15
6 changed files with 88 additions and 31 deletions

View File

@@ -27,11 +27,13 @@ func (this *CreatePopupAction) RunGet(params struct {
}
func (this *CreatePopupAction) RunPost(params struct {
ItemId int64
Name string
Type string
WidthDiv int32
MaxItems int32
ItemId int64
Name string
Type string
WidthDiv int32
MaxItems int32
IgnoreEmptyKeys bool
IgnoredKeys []string
Must *actions.Must
CSRF *actionutils.CSRF
@@ -48,12 +50,14 @@ func (this *CreatePopupAction) RunPost(params struct {
Require("请选择图表类型")
createResp, err := this.RPC().MetricChartRPC().CreateMetricChart(this.AdminContext(), &pb.CreateMetricChartRequest{
MetricItemId: params.ItemId,
Name: params.Name,
Type: params.Type,
WidthDiv: params.WidthDiv,
MaxItems: params.MaxItems,
ParamsJSON: nil,
MetricItemId: params.ItemId,
Name: params.Name,
Type: params.Type,
WidthDiv: params.WidthDiv,
MaxItems: params.MaxItems,
ParamsJSON: nil,
IgnoreEmptyKeys: params.IgnoreEmptyKeys,
IgnoredKeys: params.IgnoredKeys,
})
if err != nil {
this.ErrorPage(err)