From f4fad8d58d24102919c071d9f276ef384af4e4e6 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Wed, 16 Feb 2022 17:20:06 +0300 Subject: [PATCH] Fix alerting query error when query type has numeric type, fixes #1342 --- pkg/datasource/models.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/datasource/models.go b/pkg/datasource/models.go index b293102..493dce6 100644 --- a/pkg/datasource/models.go +++ b/pkg/datasource/models.go @@ -3,10 +3,11 @@ package datasource import ( "encoding/json" "fmt" - "github.com/alexanderzobnin/grafana-zabbix/pkg/timeseries" "strconv" "time" + "github.com/alexanderzobnin/grafana-zabbix/pkg/timeseries" + "github.com/bitly/go-simplejson" "github.com/grafana/grafana-plugin-sdk-go/backend" "github.com/grafana/grafana-plugin-sdk-go/backend/log" @@ -46,7 +47,7 @@ type ZabbixAPIResourceResponse struct { type QueryModel struct { // Deprecated `mode` field, use QueryType instead Mode int64 `json:"mode"` - QueryType string `json:"queryType"` + QueryType string `json:"-"` Group QueryFilter `json:"group"` Host QueryFilter `json:"host"`