Commit Graph

152 Commits (3e3284ba9809efe5078c37e6bbeaf55f649cd95c)

Author SHA1 Message Date
Nathan Haugo 6cbd33b9ee Fix tests for the updated group by time logic 2017-10-03 16:31:51 -07:00
Chris Goller b99ba2d3c2 Add check for enterprise build type header 2017-09-28 18:37:52 -05:00
Jared Scheib 681c700806 Test fill for floating point number on server 2017-09-06 12:27:13 -04:00
Jared Scheib 856f879924 Add server test for invalid fill 2017-09-06 12:21:44 -04:00
Jared Scheib fc0ddc0304 Fix query parser to return correct fill num value 2017-09-06 10:55:45 -04:00
Jared Scheib e0c93f3b2a Test fill number 2017-09-06 10:55:36 -04:00
Jared Scheib 888e8a8b9d Test implicit fill null made explicit 2017-09-06 10:50:02 -04:00
Jared Scheib 839932978a Test explicit null fill in server query parsing 2017-09-05 18:41:58 -04:00
Jared Scheib ae3751e43d Add fill to queryConfig in server response 2017-09-05 18:41:58 -04:00
Jared Scheib cc082dfcab Add query parser test for non-null fill 2017-09-05 18:41:50 -04:00
Chris Goller 38f172f84d Update interface Authorization to Authorizer 2017-07-25 12:13:46 -05:00
Chris Goller cef0e66df0 Update influx Authorization Headers for write and query path 2017-07-25 12:13:46 -05:00
Chris Goller a3e38a68c9 Update influx Authorization Headers for write and query path 2017-07-25 12:13:46 -05: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
Luke Morris 68af7508d4 Tested + fixed bug in GROUP BY interval calculation 2017-06-16 15:54:15 -07:00
Tim Raymond b3980d2d8d Add Horrible Hacks for Group By Queries endpoint
This perpetuates the hacks that we added for :dashboardTime: so that
they will also work for :interval:. We should really find a better way
to do this.
2017-06-15 17:43:35 -04:00
Tim Raymond & Jared Scheib f18609cfc3 Rename :autoGroupBy: to :interval:
This naming is more consistent with user's expectations from other
similar visualization tools.

Also, the usage of the variable now requires the words "GROUP BY" to be
present. e.g. `GROUP BY :interval:`
2017-06-15 17:43:27 -04:00
Tim Raymond 09ec78fee2 Adjust templates_tests to reflect reality
Where clauses generated by the query builder have "WHERE" capitalized,
and supply template variables with the ":" bracing.
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 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
Chris Goller aebf1f5d96 Fix test name typo 2017-05-31 16:18:24 -05:00
Chris Goller a93abc39cd Fix parsing of InfluxQL with multiple tag values 2017-05-30 17:19:41 -05:00
Chris Goller 27ff8e34ac Update query config field ordering to always match input query
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-05-22 16:46:04 -07:00
Luke Morris 8bd7ed21c3 After the query is parsed, return to :dashboardTime: 2017-05-18 11:43:34 -07:00
Luke Morris b7ede8c8a7 Cowabunga, it's dashboard 🕑 2017-05-08 17:12:04 -07:00
Chris Goller e54554e8de Update influxql AST parsing to return full binary exprs (#1380) 2017-05-03 15:57:19 -07:00
Chris Goller bc7895df2e Add test to influxql AST parsing of durations with no WHERE clause 2017-05-02 15:46:16 -05: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
Chris Goller ebe15248b0 Fix AST influxql for parsing binary expressions in fields 2017-05-02 12:36:56 -05:00
Chris Goller 0902f23f96 Add template variable substitution to influx queries 2017-04-19 12:10:18 -05:00
Chris Goller 4ba46c8c0d Move template variables into chronograf.go 2017-04-19 11:18:23 -05:00
Chris Goller c4465863da Update template variable naming to Template rather than Temp 2017-04-19 11:08:14 -05:00
Chris Goller f17cf6bb09 Add InfluxQL template rendering 2017-04-19 11:03:53 -05:00
Chris Goller 313f7e94ca Update rawtext in queryconfig to be null and not omitempty 2017-04-07 17:32:10 -05:00
Chris Goller d2c7c74238 Merge branch 'master' into feature/structured-queries
Conflicts:
	Godeps
	LICENSE_OF_DEPENDENCIES.md
	server/mux.go
	server/routes.go
	ui/.eslintrc
2017-04-07 16:06:24 -05:00
Chris Goller 20e13a4275 Workaround InfluxQL bugs by returning original query. 2017-04-06 00:06:15 -05:00
Andrew Watkins aa504b3640 Merge pull request #1029 from influxdata/feature/db-manager
Feature/db manager
2017-03-24 10:57:12 -07:00
Jared Scheib b90ff76670 Introduce ability to edit a dashboard cell
* Correct documentation for dashboards

* Exclude .git and use 'make run-dev' in 'make continuous'

* Fix dashboard deletion bug where id serialization was wrong

* Commence creation of overlay technology, add autoRefresh props to DashboardPage

* Enhance overlay magnitude of overlay technology

* Add confirm buttons to overlay technology

* Refactor ResizeContainer to accommodate arbitrary containers

* Refactor ResizeContainer to require explicit ResizeTop and ResizeBottom for clarity

* Add markup and styles for OverlayControls

* CellEditorOverlay needs a larger minimum bottom height to accommodate more things

* Revert Visualization to not use ResizeTop or flex-box

* Remove TODO and move to issue

* Refactor CellEditorOverlay to allow selection of graph type

* Style Overlay controls, move confirm buttons to own stylesheet

* Fix toggle buttons in overlay so active is actually active

* Block user-select on a few UI items

* Update cell query shape to support Visualization and LayoutRenderer

* Code cleanup

* Repair fixture schema; update props for affected components

* Wired up selectedGraphType and activeQueryID in CellEditorOverlay

* Wire up chooseMeasurements in QueryBuilder

Pass queryActions into QueryBuilder so that DataExplorer can provide
actionCreators and CellEditorOverlay can provide functions that
modify its component state

* semicolon cleanup

* Bind all queryModifier actions to component state with a stateReducer

* Overlay Technologies™ can add and delete a query from a cell

* Semicolon cleanup

* Add conversion of InfluxQL to QueryConfig for dashboards

* Update go deps to add influxdb at af72d9b0e4

* Updated docs for dashboard query config

* Update CHANGELOG to mention InfluxQL to QueryConfig

* Make reducer’s name more specific for clarity

* Remove 'table' as graphType

* Make graph renaming prettier

* Remove duplicate DashboardQuery in swagger.json

* Fix swagger to include name and links for Cell

* Refactor CellEditorOverlay to enable graph type selection

* Add link.self to all Dashboard cells; add bolt migrations

* Make dash graph names only hover on contents

* Consolidate timeRange format patterns, clean up

* Add cell endpoints to dashboards

* Include Line + Stat in Visualization Type list

* Add cell link to dashboards

* Enable step plot and stacked graph in Visualization

* Overlay Technologies are summonable and dismissable

* OverlayTechnologies saves changes to a cell

* Convert NameableGraph to createClass for state

This was converted from a pure function to encapsulate the state of the
buttons. An attempt was made previously to store this state in Redux,
but it proved too convoluted with the current state of the reducers for
cells and dashboards. Another effort must take place to separate a cell
reducer to manage the state of an individual cell in Redux in order for
this state to be sanely kept in Redux as well.

For the time being, this state is being kept in the component for the
sake of expeditiousness, since this is needed for Dashboards to be
released. A refactor of this will occur later.

* Cells should contain a links key in server response

* Clean up console logs

* Use live data instead of a cellQuery fixture

* Update docs for dashboard creation

* DB and RP are already present in the Command field

* Fix LayoutRenderer’s understanding of query schema

* Return a new object, rather that mutate in place

* Visualization doesn’t use activeQueryID

* Selected is an object, not a string

* QueryBuilder refactored to use query index instead of query id

* CellEditorOverlay refactored to use query index instead of query id

* ConfirmButtons doesn’t need to act on an item

* Rename functions to follow convention

* Queries are no longer guaranteed to have ids

* Omit WHERE and GROUP BY clauses when saving query

* Select new query on add in OverlayTechnologies

* Add click outside to dash graph menu, style menu also

* Change context menu from ... to a caret

More consistent with the rest of the UI, better affordance

* Hide graph context menu in presentation mode

Don’t want people editing a dashboard from presentation mode

* Move graph refreshing spinner so it does not overlap with context menu

* Wire up Cell Menu to Overlay Technologies

* Correct empty dashboard type

* Refactor dashboard spec fixtures

* Test syncDashboardCell reducer

* Remove Delete button from graph dropdown menu (for now)

* Update changelog
2017-03-23 17:12:33 -07:00
Chris Goller d9adffa116 Fix create retention policies InfluxQL 2017-03-23 15:23:54 -07:00
Chris Goller 5d2fee8d3f Fix retention policies responses and change to PATCH 2017-03-23 14:30:24 -07:00
Chris Goller 62f1deaf4d Fix drop retention policy InfluxQL 2017-03-23 13:59:28 -07:00
Chris Goller 7997739a73 Add retention policies to the database response 2017-03-23 13:53:28 -07:00
Chris Goller 7071f7b1a8 Fix drop database InfluxQL statement 2017-03-23 13:33:46 -07:00
Chris Goller fa8082a552 Fix retention policy InfluxQL creation string 2017-03-23 13:15:39 -07:00
Jade McGough 05367492c6 Merge branch 'dbrp' into feature/db-manager 2017-03-23 11:24:40 -07:00
Jade McGough 36c3b5eeec go fmt 2017-03-23 06:24:26 -07:00
Jade McGough 4b18fa70c5 add options to alter rp 2017-03-23 06:21:19 -07:00
Jade McGough 3c014b2d05 updateRP 2017-03-23 06:13:41 -07:00
Jade McGough 1acf2bcb47 go format 2017-03-23 04:56:36 -07:00
Jade McGough e388a8b81e dropRP 2017-03-23 04:51:08 -07:00
Jade McGough 0023553e56 createRP 2017-03-23 04:27:53 -07:00
Jade McGough f7e00b3ba9 fix rp GET 2017-03-23 03:37:32 -07:00
Jade McGough 3c666ac329 get retention policies 2017-03-23 03:06:59 -07:00
Jade McGough 6c418bb323 drop db API 2017-03-23 01:04:35 -07:00
Jade McGough 8954535734 WIP 2017-03-22 22:21:25 -07:00
Jade McGough 65a0612496 it's working! 2017-03-22 13:27:36 -07:00
Jade McGough 47c6308482 cleanup 2017-03-22 11:29:38 -07:00
Jade McGough b1c45e1dbc uuuugh 2017-03-22 04:01:55 -07:00
Jade McGough e5fad520b7 WIP 2017-03-22 01:40:30 -07:00
Chris Goller a25a362360 Add ping and detection of influxdb source types 2017-03-13 16:45:05 -05:00
Chris Goller 6158502e45 Fix updating of OSS user permissions 2017-03-10 14:53:30 -06:00
Chris Goller e8da54a6c3 Update user/role responses to return empty arrays 2017-03-10 13:24:48 -06:00
Chris Goller e606e74fed Fix influx querying to prevent leaking sockets 2017-02-28 15:17:36 -06:00
Chris Goller 3947d5181f Update schema for /permissions endpoint to have scopes 2017-02-27 13:31:38 -06:00
Chris Goller 08271f25ef Add roles to chronograf 2017-02-23 16:02:53 -06:00
Chris Goller 9ec0c5fa71 Add password changing for OSS users 2017-02-22 00:36:28 -06:00
Chris Goller 9ee5c40ecc Add a listing of all possible permissions for OSS and Enterprise 2017-02-19 13:47:19 -06:00
Chris Goller 61af9c8cb4 Add tests for influx OSS user permissions 2017-02-19 12:16:39 -06:00
Chris Goller b992ba6b29 Fix influxql permission grants with no allowances 2017-02-19 12:16:22 -06:00
Chris Goller ee24cb5056 Add comments to influx query proxy 2017-02-19 12:15:53 -06:00
Chris Goller 74522fd030 Refactor Influx OSS users 2017-02-19 00:54:52 -06:00
Chris Goller b33a32d69d Add routes for users 2017-02-17 20:47:23 -06:00
Chris Goller cee9b35487 Add Influx OSS implementation of users 2017-02-17 19:58:39 -06:00
Chris Goller b304ac256e Add get of all users for a data source 2017-02-17 15:13:51 -06:00
Chris Goller 2a2e188560 Refactor users and add client usersstore 2017-02-17 13:37:00 -06:00
Hunter Trujillo 8cc6f0f676 Add AST to Influx converter. 2017-02-06 19:14:15 -07:00
Chris Goller f6d31f2a34 Add temporary /chronograf/v1/query endpoint to parse InfluxQL 2017-02-06 09:40:05 -06:00
Chris Goller 8e0376cec4 Add insecureSkipVerify option to source to accept all influxdb certs
The insecureSkipVerify defaults to false, but when true, instructs
the server to accept any certificate coming from the InfluxDB server.
2017-01-04 19:35:07 -06:00
Tim Raymond 900591ea71 Improve error messages through proxy
Previously, the proxy would only report the error code it received from
an InfluxDB instance. This also passes the error message returned by
InfluxDB through, so it appears in the Chronograf server logs as well as
in the response returned to the frontend by the proxy (making it visible
by inspecting the request in the network tab).
2016-12-13 11:59:26 -05:00
Chris Goller d2e011a350 Fix logger panic and put logging of queries into debug 2016-11-12 17:48:49 -06:00
gunnaraasen b85a5be094 Add usage stats reporting 2016-10-28 14:34:55 -07:00
Chris Goller 12348d72cb Refactor to remove autogenerated code. 2016-10-26 22:10:52 -05:00
Chris Goller 8911b0fd78 Update name to chronograf 2016-10-20 09:39:40 -05:00
Tim Raymond ed922e876e Reorg logging package
This moves the logger interface into the root package and makes the log
subpackage specific to logrus. Also this makes the Logger interface type
also return other Loggers, such that we can completely encapsulate
logrus.Loggers.
2016-10-03 12:30:43 -04:00
Tim Raymond 1258f5a1d2 Add logrus for structured logging
This adds the logrus package to facilitate structured logging. Logrus is
encapsulated in the log/ subpackage and currently used in the influx/
subpackage.
2016-10-03 12:30:43 -04:00
Chris Goller b7b5c08951 Fix panic when influx client receives error status code 2016-09-30 10:31:20 -05:00
Chris Goller 83ee76adda Update sources take multiple URLs for future load-balancing 2016-09-29 18:07:54 -05:00
Chris Goller f3805c2130 Add interface and mock for sources 2016-09-29 17:09:22 -05:00
Chris Goller c680cf8596 Update test to use channels to prevent race.
Signed-off-by: Nathaniel Cook <nvcook42@gmail.com>
2016-09-22 14:15:46 -07:00
Chris Goller 5d72f12ca5 Update influx to remove the v2 client and use our own.
Signed-off-by: Gunnar Aasen <gunnar+github@gunnar.me>
2016-09-21 17:58:46 -07:00
Chris Goller acdd1992e6 Update Database to be DB 2016-09-21 15:11:29 -07:00
Chris Goller a1645a45f8 Add simple influx backend through cli option. 2016-09-21 15:03:07 -07:00
Chris Goller 7eef3f2321 Update database and rp to use default parameters 2016-09-21 09:53:36 -07:00
Chris Goller 1d4d3668d8 Update query interface to take database and rp 2016-09-21 09:53:36 -07:00
Tim Raymond 7a6cba805e Rework domain errs to be strings
At @goller's recommendation, we're following @benbjohnson's advice laid
out here: https://github.com/benbjohnson/wtf/blob/master/errors.go and
moving errors to the top level package. This cleaned up some ugliness in
the tests where we needed to type assert.
2016-09-19 10:12:52 -04:00
Tim Raymond 90104acbc7 Update influx package to support MonitoredServices
The Timeseries interface was updated to include MonitoredServices as
part of its spec. This adds a stub implementation of that.
2016-09-16 12:11:28 -04:00
Tim Raymond d8efea5da7 Add timeout error for influx
This adds a type to be returned when requests to InfluxDB were cancelled
or timed out.
2016-09-15 15:08:25 -04:00
Tim Raymond 05dfabc06b Add coverage for bad hostnames and cancellation
The case where users passed bad hostnames to create new influx clients
was untested as well as the cancellation logic.
2016-09-15 14:01:53 -04:00