Init StatsSeries as nil

-Frontend now shows metric plots
This commit is contained in:
Christoph Kluge 2022-03-16 09:56:38 +01:00
parent 1044406225
commit a26f78929b

View File

@ -31,7 +31,7 @@ func (idb *InfluxDBv2DataRepository) Init(url string, token string, renamings ma
return nil 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", return fmt.Sprintf("%d-%02d-%02dT%02d:%02d:%02dZ",
t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), t.Second()) 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? Scope: mc.Scope, // was "node" hardcode, fixme?
Timestep: mc.Timestep, Timestep: mc.Timestep,
Series: make([]schema.Series, 0, len(job.Resources)), // One series per node / resource Series: make([]schema.Series, 0, len(job.Resources)), // One series per node / resource
StatisticsSeries: &schema.StatsSeries{}, StatisticsSeries: nil, // Should be: &schema.StatsSeries{},
}, },
} }
} }