From a26f78929bf0b9e1cde10b9c3513ca1d0cccf80c Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Wed, 16 Mar 2022 09:56:38 +0100 Subject: [PATCH] Init StatsSeries as nil -Frontend now shows metric plots --- metricdata/influxdb-v2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metricdata/influxdb-v2.go b/metricdata/influxdb-v2.go index 8748161..ebb284e 100644 --- a/metricdata/influxdb-v2.go +++ b/metricdata/influxdb-v2.go @@ -31,7 +31,7 @@ func (idb *InfluxDBv2DataRepository) Init(url string, token string, renamings ma return nil } -func (idb *InfluxDBv2DataRepository) formatTime(t time.Time) string { +func (idb *InfluxDBv2DataRepository) formatTime(t time.Time) string { // TODO: Verwend lieber https://pkg.go.dev/time#Time.Format mit dem Format time.RFC3339 return fmt.Sprintf("%d-%02d-%02dT%02d:%02d:%02dZ", t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()) } @@ -118,7 +118,7 @@ func (idb *InfluxDBv2DataRepository) LoadData(job *schema.Job, metrics []string, Scope: mc.Scope, // was "node" hardcode, fixme? Timestep: mc.Timestep, Series: make([]schema.Series, 0, len(job.Resources)), // One series per node / resource - StatisticsSeries: &schema.StatsSeries{}, + StatisticsSeries: nil, // Should be: &schema.StatsSeries{}, }, } }