Commit Graph

134 Commits (7450102424a60c9fc944c399df8fd2aadc57f56d)

Author SHA1 Message Date
Timothy J. Raymond 61bffeb7cb Merge pull request #1859 from influxdata/feature/tr-layout-cell-axes
Add Axes to Layout Cells
2017-08-16 16:45:26 -04:00
Tim Raymond f6e1be290c Add Axes to Cells on Layouts
This allows a creator of a layout to specify the visible extents of
graphs for individual cells. For example, a cell displaying a
percentage could be limited to values between 0 and 100.

Existing canned layouts need to updated as a separate step. However,
this adds support for Axes to appear in them as well.
2017-08-10 13:52:43 -07:00
Tim Raymond 228920fde4 Add absolute time range support to :interval:
Previously, users of the :interval: macro were restricted to using a
relative time range in their queries, or the :dashboardTime: macro. This
permits users to also supply an absolute time range in the form of:

time > '2017-01-01T00:00:00Z' and time < '2017-06-01T00:00:00Z'
2017-08-08 11:09:51 -07:00
Tim Raymond a6be00d4f3 Remove omitempty from Axis Label
If the key is always present in the response, it's easier for the front
end to perform tests on contents of its key.
2017-08-02 13:08:33 -04:00
Tim Raymond 532a6a8c48 Merge branch 'master' into feature/1602-graph-bounds-setting
Also removed LegacyBounds marshaling since it was no longer necessary

Conflicts resolved:
	bolt/internal/internal.go
	bolt/internal/internal.pb.go
	bolt/internal/internal.proto
	bolt/internal/internal_test.go
	chronograf.go
	server/cells_test.go
	server/dashboards_test.go
	server/swagger.json
2017-08-02 11:29:29 -04:00
Tim Raymond e545f91d8f Add Label to DashboardCell Axis
It's useful for the frontend to be able to specify a label on a
particular axis. This adds a property to Axis to facilitate that.
2017-08-02 11:12:47 -04:00
Tim Raymond 2ff3e27e1f Convert Axis Bounds to []string
Due to various limitations with the previous implementation of Bounds as
a [2]int64{}, we've decided to change this to a []string{}. This will
allow clients to store arbitrary data specifying a bound and interpret
it as they wish.
2017-07-31 16:35:53 -04:00
Tim Raymond ede85f6964 Enforce only "x", "y", and "y2" axes
For the forseeable future, we will only be using the "x", "y", and "y2"
axes, even though the underlying serialization can support arbitrary
axes (for the future).

This ensures that only "x", "y", and "y2" axes are present and updates
the Swagger docs to reflect that fact
2017-07-24 14:06:15 -04:00
Tim Raymond a5bdc5ff61 s/DashboardRange/Axis, format protobufs, 64-bit
"Axis" is a more consistent and appropriate name. Also, the formatting
the protobufs was all over the place, so this has been made consistent
using a first-column \t. Furthermore, a vim modeline was added to the
bottom to make it easier for editors to autoconfigure themselves to the
right format, since protobufs are not something that we edit everyday.

Also, 32-bit values have been substituted for 64-bit values in Protobuf
definitions.
2017-07-24 14:03:48 -04:00
Tim Raymond cbbfd312ca Add Axes to Dashboard Cells
The frontend would like to store viewport information for each cell so
that visualizations are zoomed to the proper extents upon rendering.
This adds a property to cells called "axes" which takes the following
shape:

```
{
   "axes" : {
      "y" : {
         "bounds" : [
            0,
            2
         ]
      },
      "y2" : {
         "bounds" : [
            1,
            3
         ]
      }
   }
}
```

Bounds specify the visible range for the axis, and are a 2-tuple of the
form [lower, upper]. Bounds are not implicitly inclusive or
exclusive--that determination is left for clients to make. Also, there
are no restrictions on the naming of axes.
2017-07-24 13:45:28 -04:00
Tim Raymond ee6a2fa54b Enforce only "x", "y", and "y2" axes
For the forseeable future, we will only be using the "x", "y", and "y2"
axes, even though the underlying serialization can support arbitrary
axes (for the future).

This ensures that only "x", "y", and "y2" axes are present and updates
the Swagger docs to reflect that fact
2017-07-21 12:09:49 -04:00
Tim Raymond 617fc38b14 s/DashboardRange/Axis, format protobufs, 64-bit
"Axis" is a more consistent and appropriate name. Also, the formatting
the protobufs was all over the place, so this has been made consistent
using a first-column \t. Furthermore, a vim modeline was added to the
bottom to make it easier for editors to autoconfigure themselves to the
right format, since protobufs are not something that we edit everyday.

Also, 32-bit values have been substituted for 64-bit values in Protobuf
definitions.
2017-07-20 14:42:51 -04:00
Tim Raymond f05c1d0774 Add Axes to Dashboard Cells
The frontend would like to store viewport information for each cell so
that visualizations are zoomed to the proper extents upon rendering.
This adds a property to cells called "axes" which takes the following
shape:

```
{
   "axes" : {
      "y" : {
         "bounds" : [
            0,
            2
         ]
      },
      "y2" : {
         "bounds" : [
            1,
            3
         ]
      }
   }
}
```

Bounds specify the visible range for the axis, and are a 2-tuple of the
form [lower, upper]. Bounds are not implicitly inclusive or
exclusive--that determination is left for clients to make. Also, there
are no restrictions on the naming of axes.
2017-07-19 10:46:32 -04:00
Chris Goller 8dc08278bd Add JWT shared secret influxdb auth
Refactor --new-sources to simplify adding shared secrets
2017-07-19 01:39:06 -05:00
Hunter Trujillo 025af5c1ca Merge branch 'master' into feature/1482-custom-time-range
# Conflicts:
#	ui/src/style/pages/dashboards.scss
2017-07-10 16:09:14 -06:00
Hunter Trujillo 7846beff3f Fix quoting around timeStamps. Affects server code. 2017-07-10 15:33:48 -06:00
Jared Scheib d7e73f55ad Move NewSources input prep to server
Signed-off-by: Tim Raymond <tim@timraymond.com>
2017-07-06 14:12:07 -07:00
Jared Scheib e61ffaa6a3 Clarify comment 2017-07-06 13:47:39 -07:00
Jared Scheib c455592103 Remove check on already existing Kapacitor
Clean up conditionals by refactoring to use loop label.
Incidentally this also fixed a bug that would not allow
a Kapacitor server to be added by the same name as one
that already existed, allowing the check to be removed
as well.
2017-07-06 12:18:33 -07:00
Jared Scheib f49badf4f0 Clean up conditionals 2017-07-06 12:04:34 -07:00
Jared Scheib 340ed6f40e Move throwaway parsing type into NewSources 2017-07-06 11:57:02 -07:00
Jared Scheib 3c3602a724 Update error messages to use plural 2017-07-06 11:48:14 -07:00
Jared Scheib 0c0d1a0e78 Log info if source already exists 2017-07-06 11:19:10 -07:00
Jared Scheib 52e65be69d Successfully persist new source and kapa via server flag
Move this to after BoltDb connection is opened
2017-07-05 18:12:08 -07:00
Luke Morris 68af7508d4 Tested + fixed bug in GROUP BY interval calculation 2017-06-16 15:54:15 -07:00
Tim Raymond a129fc29c0 Documentation++
Improve spellingz and document what "resolution" actually means in the
context of a query
2017-06-15 20:42:46 -04:00
Tim Raymond & Jared Scheib 5ce8a9dea5 Remove stubbed-out auto group by option
This was present for testing in development and is no longer needed.
2017-06-15 17:43:16 -04:00
Tim Raymond & Jared Scheib 5cd742b6ab Update Group By Dropdown with Auto Option
This adds an "auto" option to the group by dropdown which interpolates
"GROUP BY :autoGroupBy:" to the query.
2017-06-15 17:41:55 -04:00
Tim Raymond aa1e3cd4d2 Move hardcoded reporting interval to client side
There's some follow-on work to be done here to determine an appropriate
value for the reporting interval, but for now this lets the client
supply it.
2017-06-14 10:54:02 -04:00
Tim Raymond 48eb27ef6e Prevent panic when where clause not found
This adds a bounds check to make sure that we don't overrun the end of
the string when searching for a where clause.
2017-06-14 10:54:02 -04:00
Tim Raymond 9310aa07ae Swap time.ParseDuration for influxql.ParseDuration
In order to properly parse time ranges including `days` and `weeks` like
`time > now() - 180d`, we need to use the `influxql.ParseDuration`
function
2017-06-14 10:54:02 -04:00
Tim Raymond 66be46bf23 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 a7cc6040d3 Add hacks to make AGB work with the frontend 2017-06-14 10:54:02 -04:00
Tim Raymond 5418592df8 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 2efdd4b363 Working dynamic json Unmarshaling 2017-06-14 10:52:29 -04:00
Tim Raymond fd5036ed20 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
lukevmorris 611795ecdd Need RangeValue to correctly calculate Alert graph range (#1406)
* Need RangeValue to correctly calculate Alert graph range

* Update CHANGELOG
2017-05-05 15:00:04 -07:00
Chris Goller 3821b1ccff Update Kapacitor alerts to set queryConfig to null if not parsable. 2017-05-05 14:30:20 -05:00
Andrew Watkins 92bd5d10b4 Resolve conflicts
Conflicts:
	ui/src/utils/influxql.js
2017-05-05 10:01:26 -07:00
Chris Goller 7a577f6618 Add Range.Lower and Range.Upper to query config to persist custom ranges 2017-05-02 15:08:51 -05:00
Hunter Trujillo 116c2e3c23 Merge branch 'master' into feature/template-variables
# Conflicts:
#	bolt/internal/internal.pb.go
#	ui/src/CheckSources.js
#	ui/src/dashboards/actions/index.js
#	ui/src/dashboards/containers/DashboardPage.js
#	ui/src/data_explorer/components/Visualization.js
#	ui/src/shared/components/AutoRefresh.js
#	ui/src/shared/components/Dropdown.js
2017-04-25 17:08:55 -06:00
Jared Scheib a993686130 Revert FieldKey struct schema changes to chronograf that break build 2017-04-21 19:06:24 -07:00
Hunter Trujillo 9e56b9776c Fix TVM UX flow issue with a React lifecycle antipattern; make TVM editing mode consistent 2017-04-21 19:52:01 -06:00
Jade McGough cbdf067a56 persist the currently active kapacitor in boltdb 2017-04-21 12:42:35 -07:00
Chris Goller c1e8786474 Update template query json key to be influxql 2017-04-20 18:23:59 -05:00
Chris Goller 8dcf168ea3 Add fields to store pieces of meta queries 2017-04-20 14:30:17 -05:00
Chris Goller d4f4530565 Add template structure definitions to chronograf 2017-04-20 10:33:47 -05:00
Chris Goller 4ba46c8c0d Move template variables into chronograf.go 2017-04-19 11:18:23 -05:00
Chris Goller 16a202ce8c Merge branch 'master' into feature/reverse-kapa 2017-04-11 12:52:49 -05:00
Chris Goller 313f7e94ca Update rawtext in queryconfig to be null and not omitempty 2017-04-07 17:32:10 -05:00