Commit 4436b8da by Marcus Efraimsson

elasticsearch: query interval override fix

parent 8870e3e8
...@@ -104,7 +104,7 @@ func (c *baseClientImpl) GetTimeField() string { ...@@ -104,7 +104,7 @@ func (c *baseClientImpl) GetTimeField() string {
} }
func (c *baseClientImpl) GetMinInterval(queryInterval string) (time.Duration, error) { func (c *baseClientImpl) GetMinInterval(queryInterval string) (time.Duration, error) {
return tsdb.GetIntervalFrom(c.ds, simplejson.NewFromAny(map[string]string{ return tsdb.GetIntervalFrom(c.ds, simplejson.NewFromAny(map[string]interface{}{
"interval": queryInterval, "interval": queryInterval,
}), 5*time.Second) }), 5*time.Second)
} }
......
...@@ -258,7 +258,7 @@ func (p *timeSeriesQueryParser) parse(tsdbQuery *tsdb.TsdbQuery) ([]*Query, erro ...@@ -258,7 +258,7 @@ func (p *timeSeriesQueryParser) parse(tsdbQuery *tsdb.TsdbQuery) ([]*Query, erro
return nil, err return nil, err
} }
alias := model.Get("alias").MustString("") alias := model.Get("alias").MustString("")
interval := model.Get("interval").MustString() interval := strconv.FormatInt(q.IntervalMs, 10) + "ms"
queries = append(queries, &Query{ queries = append(queries, &Query{
TimeField: timeField, TimeField: timeField,
......
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