From 8cdc2a3ae9b6e2ae60c9ba637828c06c7bd3f078 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Tue, 9 Mar 2021 12:50:14 +0300 Subject: [PATCH] rename convertHistory --- pkg/datasource/response_handler.go | 2 +- pkg/datasource/zabbix.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/datasource/response_handler.go b/pkg/datasource/response_handler.go index 8f8220b..cb5bf3f 100644 --- a/pkg/datasource/response_handler.go +++ b/pkg/datasource/response_handler.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/grafana-plugin-sdk-go/data" ) -func convertHistory(history History, items Items) *data.Frame { +func convertHistoryToDataFrame(history History, items Items) *data.Frame { timeFileld := data.NewFieldFromFieldType(data.FieldTypeTime, 0) timeFileld.Name = "time" frame := data.NewFrame("History", timeFileld) diff --git a/pkg/datasource/zabbix.go b/pkg/datasource/zabbix.go index 7ac18a1..58a8aaa 100644 --- a/pkg/datasource/zabbix.go +++ b/pkg/datasource/zabbix.go @@ -374,7 +374,7 @@ func (ds *ZabbixDatasourceInstance) queryNumericDataForItems(ctx context.Context return nil, err } - frame := convertHistory(history, items) + frame := convertHistoryToDataFrame(history, items) return frame, nil }