Fix data alignment for db connection queries
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/alexanderzobnin/grafana-zabbix/pkg/zabbix"
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/resource/httpadapter"
|
||||
@@ -88,6 +89,9 @@ func (ds *ZabbixDatasource) DBConnectionPostProcessingHandler(rw http.ResponseWr
|
||||
return
|
||||
}
|
||||
|
||||
reqData.Query.TimeRange.From = time.Unix(reqData.TimeRange.From, 0)
|
||||
reqData.Query.TimeRange.To = time.Unix(reqData.TimeRange.To, 0)
|
||||
|
||||
frames, err := dsInstance.applyDataProcessing(req.Context(), &reqData.Query, reqData.Series)
|
||||
|
||||
resultJson, err := json.Marshal(frames)
|
||||
|
||||
Reference in New Issue
Block a user