Commit Graph

22 Commits (054fa43f3c08830c4afb94a8312fedb693843235)

Author SHA1 Message Date
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
Andrew Watkins 92bd5d10b4 Resolve conflicts
Conflicts:
	ui/src/utils/influxql.js
2017-05-05 10:01:26 -07:00
Chris Goller 7b08acb621 Add line-protocol /write endpoint to all data sources 2017-05-03 00:06:40 -05:00
Chris Goller 01b2842ea8 Update queries endpoint to return InfluxQL, queryConfig, queryAST 2017-04-07 16:58:56 -05:00
Chris Goller 46f4f43692 Update kapacitors rule's to use AST and kapacitor directly 2017-04-05 20:04:42 -05:00
Timothy J. Raymond 67c2b98f68 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 8117106b26 Update databases/retention policy link responses 2017-03-23 13:16:02 -07:00
Andrew Watkins e61b8f73e8 Make name not required 2017-03-13 15:15:01 -07:00
Chris Goller a25a362360 Add ping and detection of influxdb source types 2017-03-13 16:45:05 -05:00
Chris Goller 1f9be2e4aa Merge branch 'master' into feature/#54-tr-enterprise-client
Conflicts:
	bolt/internal/internal.pb.go
2017-02-24 13:02:32 -06:00
Chris Goller 701a041a88 Merge branch 'master' into feature/connection-info#825
Conflicts:
	CHANGELOG.md
2017-02-24 11:29:43 -06:00
Chris Goller 08271f25ef Add roles to chronograf 2017-02-23 16:02:53 -06:00
Chris Goller a7fabd4ecb Add permissions endpoint to get all possible permission strings 2017-02-19 14:00:34 -06:00
Chris Goller 97a2206869 Update chronograf sources response 2017-02-12 16:38:05 -06:00
Jade McGough a7742fb9c1 add metaURL to source 2017-02-09 23:14:04 -06:00
Chris Goller 587c87fd9d Merge pull request #738 from influxdata/feature/go-orphan-kapacitor
Update source remove to also remove kapacitor and rules resources
2017-01-09 15:49:05 -06:00
Chris Goller 2281f4cfa0 Update removal of sources to include removing kapacitor and rules resources 2017-01-05 14:47:44 -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
Chris Goller 77b861d26e Add server error logging 2016-11-19 11:41:06 -06:00
Chris Goller 6067d5aaa8 Update sources endpoint to take optional telegraf database name. 2016-11-18 16:07:53 -06:00
Chris Goller dd9f110533 Fix mux paths to be hardcoded; clarify server start; fix golint 2016-10-28 11:27:06 -05:00
Chris Goller 12348d72cb Refactor to remove autogenerated code. 2016-10-26 22:10:52 -05:00