Commit Graph

14 Commits (0c1263f754dbd0222bc244d9e38c73078c9531ca)

Author SHA1 Message Date
Luke Morris 4b54081cf8 Revert :interval: work
Squashed commit of the following:

commit 8b18f78098953c5aba744dd16a215b6ed4cd5143
Author: Luke Morris <lukevmorris@gmail.com>
Date:   Wed Feb 28 20:44:46 2018 -0800

    Revert "Merge pull request #2663 from influxdata/feature/migrate-time-interval"

    This reverts commit 935186984c, reversing
    changes made to e5b8889bc6.

commit 8f17059d24cc1a1bb4b8675be70fb9adb3f3a3e3
Author: Luke Morris <lukevmorris@gmail.com>
Date:   Wed Feb 28 20:44:23 2018 -0800

    Revert "Merge pull request #2890 from influxdata/fix/time-interval"

    This reverts commit bb01a569ca, reversing
    changes made to 3609bc7d3a.
2018-02-28 20:47:16 -08:00
Michael Desa 1c9ee296a0 Ensure backwards compat for old GROUP BY :interval: 2018-02-28 17:21:15 -05:00
Luke Morris 7354a75b79 Merge branch 'master' into feature/migrate-time-interval 2018-02-27 19:14:28 -08:00
Luke Morris 63b1848adb :interval: relies on others, and should always come last 2018-02-27 18:02:38 -08:00
Michael Desa c93d020190 Create new point template var template value
Previously users specify `resolution` and `pixelsPerPoint`. This has
been change and the front end will now need to specify `points` which is
the number of points it'd like to get back from the query.
2018-02-22 13:17:49 -05:00
Chris Goller 38e57eb897 WIP Add annotation store to influxdb 2018-01-11 11:46:49 -06:00
Chris Goller 4d53010c02 Fix template rendering to ignore template if not in query 2017-12-11 09:49:24 -06:00
Chris Goller eb82ec4131 Refactor and simplify auto group by (:interval:) template variable 2017-11-08 11:27:35 -06:00
Tim Raymond 4d22f83da5 Fix :dashboardTime: by introducing tvar precedence
In order for :autoGroupBy: and :dashboardTime: to co-exist in a query,
it's necessary to introduce template variable precedence to the backend.
This is done by adding a `Precedence()` method to the TemplateVariable
interface that returns an ordinal indicating the precedence level of the
template variable. Precedence starts from 0 (highest) proceeding to the
maximum that a `uint` can represent.

A template variable at a given precedence level can expect that all
template variables with higher precedence will have already been
replaced in the query that is passed to its `Exec` call.

For example, :autoGroupBy: has lower precedence than :dashboardTime:
because it needs to know the selected time range for the query. When the
`Exec` method of `GroupByVar` is invoked, it will see the query after
:dashboardTime: has already been replaced, allowing it to extract the
duration successfully.
2017-06-14 10:54:02 -04:00
Tim Raymond 62cdf76def Add parsing of Group By Duration from the query
In order for automatic group by to be remotely useful, we need to parse
out the selected duration of time from the query itself. The problem
with doing this is that using the existing machinery for parsing
InfluxQL requires having valid InfluxQL, which InfluxQL+Template
Variables is not. To break this chicken-and-egg problem, the duration is
directly extracted from the query using regular string processing.
2017-06-14 10:52:29 -04:00
Tim Raymond 45402f476d Add support for :autoGroupBy: template variable
This adds support for dynamic template variables that compute something
about themselves given some additional context.
2017-06-13 14:59:56 -04:00
Chris Goller 9860a5d906 Move template variables into chronograf.go 2017-04-19 11:18:23 -05:00
Chris Goller dc0aa7c7f9 Update template variable naming to Template rather than Temp 2017-04-19 11:08:14 -05:00
Chris Goller bf2402b568 Add InfluxQL template rendering 2017-04-19 11:03:53 -05:00