Commit cef3800c by Carl Bergquist

fixes invalid valud/timestamp order

parent 7977d6b6
......@@ -77,9 +77,11 @@ func (tw *TsdbWrapper) Query(ctx context.Context, ds *models.DataSource, query *
points := tsdb.TimeSeriesPoints{}
for _, p := range s.Points {
po := tsdb.NewTimePoint(null.FloatFrom(float64(p.Timestamp.Nanos)), p.Value)
if p.Timestamp != nil {
po := tsdb.NewTimePoint(null.FloatFrom(p.Value), float64(p.Timestamp.Seconds))
points = append(points, po)
}
}
res.Results[r.RefId].Series = append(res.Results[r.RefId].Series, &tsdb.TimeSeries{
Name: s.Name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment