After the query is parsed, return to :dashboardTime:

pull/1503/head
Luke Morris 2017-05-18 11:43:34 -07:00
parent d7dcb06529
commit ea41394105
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ func Convert(influxQL string) (chronograf.QueryConfig, error) {
return chronograf.QueryConfig{}, err return chronograf.QueryConfig{}, err
} }
if itsDashboardTime {
influxQL = strings.Replace(influxQL, "now() - 15m", ":dashboardTime:", 1)
}
raw := chronograf.QueryConfig{ raw := chronograf.QueryConfig{
RawText: &influxQL, RawText: &influxQL,
Fields: []chronograf.Field{}, Fields: []chronograf.Field{},