Commit Graph

103 Commits (bed327b999582fd25438b241602138a066bae2e2)

Author SHA1 Message Date
Michael Desa 0d235f646d Generalize chronograf.UsersStore Get method
The `Get` method on the UsersStore was generalize by changing the second
parameter to a struct. This allows the Store to retrieve users by more
than simply their name.

-Get(ctx context.Context, name string) (*User, error)
+Get(ctx context.Context, q UserQuery) (*User, error)
2017-10-18 14:17:42 -04:00
Nathan Haugo e519759729 Fix tests for the updated group by time logic 2017-10-03 16:31:51 -07:00
Chris Goller 92238d3ec1 Add check for enterprise build type header 2017-09-28 18:37:52 -05:00
Jared Scheib 1d3e8790b3 Test fill for floating point number on server 2017-09-06 12:27:13 -04:00
Jared Scheib f0e9ea22dd Add server test for invalid fill 2017-09-06 12:21:44 -04:00
Jared Scheib 70515433e7 Fix query parser to return correct fill num value 2017-09-06 10:55:45 -04:00
Jared Scheib ad6e86e57d Test fill number 2017-09-06 10:55:36 -04:00
Jared Scheib 8e5b7dacbb Test implicit fill null made explicit 2017-09-06 10:50:02 -04:00
Jared Scheib 9c8ad74b88 Test explicit null fill in server query parsing 2017-09-05 18:41:58 -04:00
Jared Scheib 40111b68ab Add fill to queryConfig in server response 2017-09-05 18:41:58 -04:00
Jared Scheib 1eeae173bc Add query parser test for non-null fill 2017-09-05 18:41:50 -04:00
Chris Goller 033f292ae5 Update interface Authorization to Authorizer 2017-07-25 12:13:46 -05:00
Chris Goller 9abbcf6dc0 Update influx Authorization Headers for write and query path 2017-07-25 12:13:46 -05:00
Chris Goller 431cfc2509 Update influx Authorization Headers for write and query path 2017-07-25 12:13:46 -05:00
Chris Goller c2adec4709 Add JWT shared secret influxdb auth
Refactor --new-sources to simplify adding shared secrets
2017-07-19 01:39:06 -05:00
Luke Morris 5aeb32b75f Tested + fixed bug in GROUP BY interval calculation 2017-06-16 15:54:15 -07:00
Tim Raymond 4e7ec0b2a8 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 95862a9bbc 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 f8ebb13bdb 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 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 6a672cfd94 Working dynamic json Unmarshaling 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 a1fa4b9eb9 Fix test name typo 2017-05-31 16:18:24 -05:00
Chris Goller 47d9fc4433 Fix parsing of InfluxQL with multiple tag values 2017-05-30 17:19:41 -05:00
Chris Goller aab022f3e6 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 ea41394105 After the query is parsed, return to :dashboardTime: 2017-05-18 11:43:34 -07:00
Luke Morris ebee9f7dca Cowabunga, it's dashboard 🕑 2017-05-08 17:12:04 -07:00
Chris Goller 94fd7ef164 Update influxql AST parsing to return full binary exprs (#1380) 2017-05-03 15:57:19 -07:00
Chris Goller 72421f7954 Add test to influxql AST parsing of durations with no WHERE clause 2017-05-02 15:46:16 -05:00
Chris Goller e6aab20617 Add Range.Lower and Range.Upper to query config to persist custom ranges 2017-05-02 15:08:51 -05:00
Chris Goller 96eac36448 Fix AST influxql for parsing binary expressions in fields 2017-05-02 12:36:56 -05:00
Chris Goller 542f3c334c Add template variable substitution to influx queries 2017-04-19 12:10:18 -05: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
Chris Goller 65231c2409 Update rawtext in queryconfig to be null and not omitempty 2017-04-07 17:32:10 -05:00
Chris Goller 2f01e567c4 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 8ec4c2a32f Workaround InfluxQL bugs by returning original query. 2017-04-06 00:06:15 -05:00
Andrew Watkins 01ec21b483 Merge pull request #1029 from influxdata/feature/db-manager
Feature/db manager
2017-03-24 10:57:12 -07:00
Jared Scheib 959b387f61 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 af72d9b0e4ebe95be30e89b160f43eabaf0529ed

* 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 c252c6126c Fix create retention policies InfluxQL 2017-03-23 15:23:54 -07:00
Chris Goller 2c874e4e53 Fix retention policies responses and change to PATCH 2017-03-23 14:30:24 -07:00
Chris Goller b061369a56 Fix drop retention policy InfluxQL 2017-03-23 13:59:28 -07:00
Chris Goller 768bd12541 Add retention policies to the database response 2017-03-23 13:53:28 -07:00
Chris Goller 65e93125dd Fix drop database InfluxQL statement 2017-03-23 13:33:46 -07:00
Chris Goller b0c57f9509 Fix retention policy InfluxQL creation string 2017-03-23 13:15:39 -07:00
Jade McGough baf7a938c4 Merge branch 'dbrp' into feature/db-manager 2017-03-23 11:24:40 -07:00
Jade McGough 10a05412c0 go fmt 2017-03-23 06:24:26 -07:00
Jade McGough ffdc14ebdd add options to alter rp 2017-03-23 06:21:19 -07:00