Commit Graph

226 Commits (b4773c15afe4fcd227ad88aa9d5686beb6b0a6cd)

Author SHA1 Message Date
Jared Scheib 54f1c3432f Remove spurious ping route 2017-04-03 11:32:56 -07:00
Chris Goller c89e4ab857 Merge branch 'master' into 1095-cookie_duration
Conflicts:
	server/server.go
2017-04-02 18:25:11 -05:00
Chris Goller 37dc759d8f Update /chronograf/v1/ping to simply return 204 2017-04-02 18:16:08 -05:00
Chris Goller e89a74e0ac Fix authentication comment 2017-04-02 17:59:45 -05:00
Chris Goller 688641c18b Move authentication middleware to server package 2017-04-02 17:58:39 -05:00
Chris Goller 01e8f7f75c Update oauth2 tests to newly refactored design 2017-04-02 17:37:13 -05:00
Chris Goller a9a1a0c34b Remove heartbeat/logout duration from authentication 2017-03-31 17:41:25 -05:00
Chris Goller a945524d4b Refactor Authenticator interface to accommodate cookie duration and logout delay 2017-03-31 14:48:34 -05:00
Chris Goller d57ebc65ab Add /chronograf/v1/ping endpoint for server status 2017-03-30 16:31:48 -05:00
Chris Goller 890b3829da Add ping route to all routes 2017-03-30 16:14:13 -05:00
Chris Goller 230669921a Fix kapacitor base64 auth as header was built incorrectly. 2017-03-30 15:32:02 -05:00
lukevmorris ae77767c9c Allow InfluxDB and Kapacitor configuration via ENV vars or CLI options (#1129)
* Introduce Kapacitor and InfluxDB as command line options

If omitted, their values will be null at runtime. If supplied, e.g.:
  chronograf
    --kapacitor https://path.to.my:1/kapacitor/instance
    --influxdb  https://path.to.my:1/influxdb/instance
Their values will be accessible via
  Server.Kapacitor
  Server.InfluxDB

* MultiSourcesStore will hold Bolt and config’d sources

* Delegate to db.SourcesStore for now

* Add Username/Password tags for InfluxDB and Kapacitor

* Builders for MultiSourceStore and MultiLayoutStore

* Store Kapacitor and InfluxDB configs in memory

* Typo

* Update CHANGELOG

* Move StoreBuilders to server/builders.go

* Correct these assertions by reversing them

* Kapacitor -> KapacitorURL; InfluxDB -> InfluxDBURL
2017-03-30 09:48:04 -07:00
Jade McGough 7389167e76 Change password (#1120)
Add ability to change a user's password via Admin page
2017-03-29 17:40:46 -07:00
Jared Scheib 5c0d759ff5 Merge remote-tracking branch 'origin/master' into 1095-cookie_duration 2017-03-29 14:26:44 -07:00
Jared Scheib 018e94efed User can now set oauth cookie session duration via the CLI to any duration or to expire on browser close 2017-03-28 12:36:27 -07:00
Chris Goller f748aa29a5 Add compression for InfluxQL query responses 2017-03-28 13:10:05 -05:00
Timothy J. Raymond 54dd3e5eee Redirect to default source when deleting sources (#1074)
* Redirect to default source on invalid source ID

When supplied with an invalid source ID, the CheckSources component
would redirect the user to a "Create Source" page. This caused
surprising behavior when a source was deleted because that source ID
would become invalid. The effect being that deleting a source brought
users immediately to the create source page, rather than back to the
sources list.

This instead redirects users to the default source when provided an
invalid source id. The backend automatically re-assigns the "default"
source, so this will always succeed, since sources are fetched again
from the backend.

The regex used is slightly dependent on URL structure that has been
stable over the lifetime of this project. Also it relies on URL
structure more than the previous redirecting implementation.

* Force sources to reload after deletion

Deleting a source invalidates the state held by the client because of
automatic re-assignment of the default source by the backend. Without
duplicating backend logic, it is impossible for the frontend to discover
the new source without reloading sources.

The ManageSources page now uses an async-action creator which deletes
the requested source and reloads all sources. The source action creators
have also been refactored to use implicit returns like other action
creators.

* Remove Dead removeSource action

removeSource is no longer used because the API invalidates its
assumptions. For more information, see 04bf3ca.

* Update Changelog with source deletion redirect fix

Users are no longer unexpectedly redirected to the "create source" page
whenever they delete a source that they are connected to.

* Return 404 when deleting non-existent source

When deleting a source, a new default is assigned automatically. If a
non-existent source ID was provided, previously this would result in a
500. This is a violation of the Swagger docs. The solution is to examine
the error and if it was an ErrSourceNotFound, invoke the notFound
handler.

* Add Error handling to source deletion

There are two kinds of errors that can be encountered when deleting a
source: a 404 and a 500 (from either the delete or the subsequent
fetch).

The 404 is a precondition failure of the action creator. The source.id
requested can be non-existent for two reasons: 1) The action creator was
passed garbage by the caller. 2) A concurrent write occurred which
silently invalidated this session's state. For the first case, we can
ensure that the caller is sane by having an assertion check that the
requested source is among some set of sources. This could be
circumvented by a caller, but chances are good that both the full set of
sources and the desired source are both available to callers of this
action creator. The second case is not an error. In this case, we should
proceed reloading sources, since the deletion that was requested has
already been performed by someone else.

Finally, 500s can only occur if there is something broken with the API.
In this situation, we provide a notification that tells the user to
check the API logs for more information.

* Remove duplicate CHANGELOG entries

These were introduced due to a naive merge conflict resolution.

* Remove assertion

This was decided to be confusing and unnecessary.

* Remove remnants of removed assertion

These were needed for an assertion that has been removed. It's no longer
necessary to pass `sources` to the action creator.
2017-03-28 08:53:11 -07:00
Chris Goller ec8c538c09 Fix go dependency breaking master build 2017-03-24 13:34:56 -07:00
Andrew Watkins 01ec21b483 Merge pull request #1029 from influxdata/feature/db-manager
Feature/db manager
2017-03-24 10:57:12 -07:00
Chris Goller 6bf79c7cb3 Update rpResponse default to isDefault 2017-03-24 10:06:59 -07:00
Chris Goller e8a77be244 Update RP JSON default to isDefault 2017-03-24 09:58:57 -07:00
lukevmorris 2d8d546368 Create a new dashboard cell; Fix remaining bugs with Overlay (#1056)
* Relax query validation for cell endpoint

* Dashboards can now add a cell; Rebase over 950-overlay_technologies-edit

* Server now returns empty queries array when creating a new dashboard cell

* Use async/await pattern for addDashboardCell, add basic error handling

* Update names of methods and actions for editing and updating cells to match those for adding

Factor out newDefaultCell to dashboard constants

* Update CHANGELOG

* Fix bug where Overlay wouldn’t display for query-less cells

* We removed these validations
2017-03-23 17:50:21 -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 2c874e4e53 Fix retention policies responses and change to PATCH 2017-03-23 14:30:24 -07:00
Chris Goller 98799cc442 Fix sources test to include databases link 2017-03-23 14:06:52 -07:00
Chris Goller 768bd12541 Add retention policies to the database response 2017-03-23 13:53:28 -07:00
Chris Goller 83ee057f56 Fix exported method to be internal 2017-03-23 13:34:09 -07:00
Chris Goller 2cd5e50442 Add retention policy link to databases and add comments 2017-03-23 13:29:13 -07:00
Chris Goller 8827093bc6 Update databases/retention policy link responses 2017-03-23 13:16:02 -07:00
Jade McGough baf7a938c4 Merge branch 'dbrp' into feature/db-manager 2017-03-23 11:24:40 -07:00
Jade McGough e58a846f7b updateRP 2017-03-23 06:13:41 -07:00
Jade McGough 2a990e2b3e clean up some dashboards code 2017-03-23 05:49:33 -07:00
Jade McGough c547ca5ebc add missing patch responses swagger 2017-03-23 05:16:49 -07:00
Jade McGough ba8609d7b6 go format 2017-03-23 04:56:36 -07:00
Jade McGough b40a90b9d1 dropRP 2017-03-23 04:51:08 -07:00
Jade McGough b378dd7c27 createRP 2017-03-23 04:27:53 -07:00
Jade McGough 2438090e70 get retention policies 2017-03-23 03:06:59 -07:00
Jade McGough 766ee9b517 drop db API 2017-03-23 01:04:35 -07:00
Jade McGough c21a378629 db creation seems to be working 2017-03-22 23:21:21 -07:00
Jade McGough 523a0788f7 WIP 2017-03-22 22:21:25 -07:00
Jade McGough 15b2744a5c write db info to dbresponse 2017-03-22 13:46:30 -07:00
Jade McGough 6a4c4122bb it's working! 2017-03-22 13:27:36 -07:00
Jade McGough 19729da202 cleanup 2017-03-22 11:29:38 -07:00
Jade McGough cea9d9a8dc uuuugh 2017-03-22 04:01:55 -07:00
Jade McGough 056abde56d WIP 2017-03-22 01:40:30 -07:00
Jade McGough 36ffe0c436 dbs GET returns list of databases 2017-03-21 12:59:27 -07:00
Jade McGough e1ccda806c WIP db endpoint 2017-03-20 15:26:48 -07:00
Jade McGough b443d857ca add db and rp routes to mux.go 2017-03-20 14:23:29 -07:00
Jade McGough 4ac8d72902 link to retention policies in db response 2017-03-20 11:58:09 -07:00
Jade McGough 626b313d98 add links to retentionpolicy swagger 2017-03-20 11:52:49 -07:00