Refactor: zabbix client

This commit is contained in:
Alexander Zobnin
2021-05-19 13:17:46 +03:00
parent 762ea252b2
commit badecc3aae
14 changed files with 705 additions and 371 deletions

View File

@@ -4,11 +4,12 @@ import (
"fmt"
"time"
"github.com/alexanderzobnin/grafana-zabbix/pkg/zabbix"
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/grafana/grafana-plugin-sdk-go/data"
)
func convertHistoryToDataFrame(history History, items Items) *data.Frame {
func convertHistoryToDataFrame(history History, items zabbix.Items) *data.Frame {
timeFileld := data.NewFieldFromFieldType(data.FieldTypeTime, 0)
timeFileld.Name = "time"
frame := data.NewFrame("History", timeFileld)