Commit Graph

400 Commits (31f72a71e92eee016f187b032f2f54842756a234)

Author SHA1 Message Date
Kent Wang a231e9f942 Add redirect url to generic oauth 2017-06-16 17:35:57 +08:00
Jared Scheib 73fd58ef35 Update swagger docs for external and statusFeed props 2017-06-15 18:23:42 -07:00
Jared Scheib 59e184b1f1 Comment new StatusFeed member of AllRoutes 2017-06-15 17:55:46 -07:00
Jared Scheib 7a6131bd40 Refactor statusFeedURL to be set in CLI 'default'
Reverts to a clean separation of concerns between mux.go vs AllRoutes
AllRoutes now expects a StatusFeed url directly
2017-06-15 13:51:22 -07:00
Jared Scheib 95e2c18c5a Add test for all routes with ExternalLinks 2017-06-14 16:22:30 -07:00
Jared Scheib 741ce0c4b6 Remove unused fragment 2017-06-14 13:51:08 -07:00
Tim Raymond 1723f30bdf correct TemplateVar collection type in Queries 2017-06-14 10:52:29 -04:00
Jared Scheib 9e38616783 Add default InfluxData JSON feed url 2017-06-13 19:23:52 -07:00
Jared Scheib f63cba3581 Add status-feed-url build flag within new externalLinks prop in AllRoutes 2017-06-13 13:40:20 -07: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
Hunter Trujillo 87eff2c86c Update swagger docs. 2017-06-12 15:30:10 -06:00
Regan Kuchan 5a0abe2de7 Update version and changelog for v1.3.2.0 2017-06-02 13:34:23 -06:00
Jared Scheib cb394dd716 Refactor /chronograf/v1 to not return logoutLink if not using auth
Use logoutLink to determine if logout menu item is shown

Signed-off-by: Chris Goller <güllère@gmail.com>
2017-05-30 17:34:55 -07:00
Chris Goller 0c4c74ce36 Add kapacitor rule validation on update 2017-05-25 12:10:25 -05:00
Chris Goller d19f8062ec Fix kapacitor PUT/POST returning request rather than response 2017-05-24 15:30:45 -07:00
Regan Kuchan 7331971e23 Update version number and bumpversion 2017-05-22 11:57:23 -07:00
Tim Raymond befccf44d0 Fix infinite spinner with /chronograf basepath
When using a basepath of /chronograf, the app would present a
never-ending spinner when visiting the root route. This was because the
prefixingRedirector middleware which is responsible for appending the
basepath to redirects from downstream http.Handlers thought that the
prefix was already appended since it saw `/chronograf/v1`. In reality,
it should have produced a location like `/chronograf/chronograf/v1`.

The solution was to look beyond the first instance of a prefix and check
for the presence of another prefix to detect if a prefix was already
applied by a downstream handler.
2017-05-09 12:12:42 -07:00
Chris Goller 33b3ccc298 Update version to 1.3 for javascript and swagger 2017-05-09 08:24:04 -07:00
Tim Raymond b4d10754e4 Force prefixing in several locations
The Basepath option should be applied in anything that will be consumed
by the React application. This is because from its perspective, the
proxy sitting between it and the backend wants those prefixes regardless
of what it does with them before handing the request back to the
Chronograf backend. Consequently, there's situations in the backend
where we need to have the `opts.Basepath` or the `basepath` that we
alter when `opts.PrefixRoutes` is set. The `basepath` is strictly for
altering routing decisions made by the backend.

There's subtle places where routes are supplied to the frontend that
need to always have the `opts.Basepath` set as well. Another commit
addressed the "Location" header of Redirects, for example.
2017-05-08 14:40:50 -07:00
Tim Raymond 49feb39e90 Add PrefixedRedirect function
The router that we use has a feature that will automatically redirect
routes in certain situations where it feels a trailing slash would be
appropriate. Because the underlying router is totally unaware of
upstream prefixing activity, the "Location" that it sends clients to is
incorrect because it doesn't have the prefix.

This introduces a middleware that catches any downstream 3XX class
responses and replaces the Location header with the prefixed version of
it, plus a trailing slash. It does this only when the prefix has not
been applied already by some downstream middleware.
2017-05-08 14:40:50 -07:00
Tim Raymond ee5760bfd3 Add HTTP status code to logs
This adds the status code to the response log message to make it easier
to diagnose issues. It also replaces the placeholder "Success" message
with the decoded value of the HTTP Status, resulting in messages like:

INFO[0041] Response: Temporary Redirect                  code=307

...and so on. Both easily consumable by humans and machines.
2017-05-08 14:40:50 -07:00
Tim Raymond 0141f0870c Use Basepath over string concatenation
Basepath was previously not working here because the strings constructed
via concatenation had a trailing slash at the end:

Before:
  rootPath => "/someprefix/chronograf/v1/"

After:
  rootPath => "/someprefix/chronograf/v1"

The julienschmidt/httprouter that the bouk/httprouter is based on has
support for ignoring trailing slashes, which is behavior that we want.
However, routing decisions involving this rootPath string were being
made by a `strings.HasPrefix` function. This conditional seeks to
apply the token middleware only in cases where routes _under_
`/chronograf/v1` are accessed (e.g. `/chronograf/v1/sources`). In cases
where the paths were effectively equal, this conditional accidentally
worked because the string `/chronograf/v1` does not have the prefix
`/chronograf/v1/`. When this was corrected to use `path.Join`, this case
became true and caused the token middleware to be applied.

`path.Join` is the correct way to construct paths, since this prevents
issues where a fragment like `/foo/` is concatenated with a fragment
like `/bar/quux/` to yield the string `/foo//bar/quux/`.

Given that continuing to use concatenation is no longer an option, the
solution is to compare the lengths of the strings to ensure that the
path under comparison is longer than the prefix it's being tested
against. This guarantees that the subject path is a route underneath the
`/chronograf/v1` route.
2017-05-08 14:40:50 -07:00
Tim Raymond 93acebffc6 Remove broken path.Join logic
It is entirely unclear why this doesn't work.
2017-05-08 14:40:50 -07:00
Tim Raymond & Jared Scheib dcbe44d9ce Fix OAuth when using Basepath
Updated the logout link in the UI to use a link provided by the
/chronograf/v1/ endpoint. We also replaced many instances of string
concatenation of URL paths with path.Join, which better handles cases
where prefixed and suffixed "/" characters may be present in provided
basepaths. We also refactored how Basepath was being prefixed when using
Auth. Documentation was also updated to warn users that basepaths should
be applied to the OAuth callback link when configuring OAuth with their
provider.
2017-05-08 14:40:50 -07:00
Tim Raymond 43ee0e4baf Add logging of response times
This makes monitoring Chronograf 👍
2017-05-08 14:40:50 -07:00
Jared Scheib 1e2e3c1362 Notify user about --prefix-routes when using --basepath 2017-05-08 14:40:50 -07:00
Chris Goller 243286892f Fix null queryConfig and add substantial test coverage to kapacitor
storage
2017-05-05 16:14:02 -05: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 365434783d Merge branch 'master' into feature/influx-write 2017-05-05 08:10:14 -05:00
Chris Goller e54554e8de Update influxql AST parsing to return full binary exprs (#1380) 2017-05-03 15:57:19 -07:00
Chris Goller 7b08acb621 Add line-protocol /write endpoint to all data sources 2017-05-03 00:06:40 -05:00
Chris Goller bc1ac4c0ce Update swagger.json to mention queryConfig's range 2017-05-02 15:20:06 -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 f8652efdee Update /queries endpoint to handle templates 2017-04-28 15:12:28 -05:00
Luke Morris b9327c412e Remove unused dependencies from dashboard_test.go 2017-04-28 12:57:16 -07: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
Jade McGough 32386f8ab2 make kapacitor patching work 2017-04-21 12:42:35 -07:00
Jade McGough cbdf067a56 persist the currently active kapacitor in boltdb 2017-04-21 12:42:35 -07:00
Jade McGough 05688ef634 WIP 2017-04-21 12:39:41 -07:00
Jade McGough 26bb911e04 add kapacitors to AllRoutes 2017-04-21 12:39:41 -07:00
Jade McGough 8d9ac52c5c clean up kapacitor swagger docs 2017-04-21 12:39:40 -07:00
Chris Goller ff176164c1 Remove extra debug info in the dashboard testing 2017-04-20 16:31:00 -05:00
Chris Goller d45a1ae7f4 Add measurements and databases to template variables 2017-04-20 14:32:02 -05:00
Chris Goller 5f54d9282c Update templates API response 2017-04-20 12:22:55 -05:00
Chris Goller adb67657c3 Add more validation checks to dashboard updates 2017-04-20 11:47:31 -05:00
Chris Goller 2018f7300a Add initial template CRUD operations 2017-04-20 11:09:56 -05:00
Chris Goller c141709451 Move dashboard cells into cells.go 2017-04-20 09:24:57 -05:00
Chris Goller 673a0c07c0 Add swagger documentation for template variables 2017-04-19 12:09:22 -05:00
Chris Goller f4361c6c9a Merge branch 'master' into feature/refreshing-jwts 2017-04-17 15:24:10 -05:00
Chris Goller 45e9508d31 Update oauth2 Authenticator signatures to use extend 2017-04-17 11:49:45 -05:00
Chris Goller 1fabed5039 Update tests for refreshing jwts 2017-04-14 02:35:30 -05:00
Chris Goller 5b692bdef3 Add JWT refresh on validation.
JWTs will only life five minutes into the future.  Any time
the server receives an authenicated request, the JWT's expire at
will be extended into the future.
2017-04-14 02:12:52 -05:00
Andrew Watkins dc4574fa39 Add default RP to queryConfig when no RP is present
This will only happen if the qC is fully qualified.  A fully
qualified query is one that has a db, measurement, and field.
2017-04-13 17:49:53 -07:00
Andrew Watkins 1271ade90d Merge pull request #1232 from influxdata/feature/voltron-the-builder
Voltron the builder / One Builder to Rule Them All / Make Builder Great Again
2017-04-13 09:49:45 -07:00
Chris Goller 16a202ce8c Merge branch 'master' into feature/reverse-kapa 2017-04-11 12:52:49 -05:00
Fred Cox b804be1885 Fix env var name for Google client secret 2017-04-11 16:48:35 +03:00
Hunter Trujillo 8eb6aae21b Use backend IDs for great justice. 2017-04-10 12:02:09 -06:00
Chris Goller 313f7e94ca Update rawtext in queryconfig to be null and not omitempty 2017-04-07 17:32:10 -05:00
Chris Goller 01b2842ea8 Update queries endpoint to return InfluxQL, queryConfig, queryAST 2017-04-07 16:58:56 -05:00
Chris Goller 40e0f579f1 Fix JSON typos in swagger.json 2017-04-07 16:35:05 -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 6de8ec26d5 Merge branch 'master' into feature/generic-oauth 2017-04-07 15:35:28 -05:00
Chris Goller ca58111730 Fix PathEscape work for go 1.7 2017-04-07 15:32:35 -05:00
Chris Goller 5d2aced125 Update generic oauth routes to be path escaped. 2017-04-07 15:20:53 -05:00
Chris Goller bbf6c1300c Add configurable scopes to generic oauth2 support 2017-04-07 14:58:35 -05:00
Chris Goller de43145701 Merge branch 'master' into feature/generic-oauth 2017-04-07 08:39:52 -05:00
John Gilden cf054c1f79 Use the Host header from the original Kapacitor URL 2017-04-07 08:15:19 -05:00
Chris Goller 150b0f212d Update cell dashboard error messags to be descriptive 2017-04-06 17:30:53 -05:00
Chris Goller 978838cf2c Merge branch 'master' into feature/generic-oauth 2017-04-06 16:47:58 -05:00
Chris Goller dc8cfbdf8e Add generic oauth2 configuration options 2017-04-06 16:45:33 -05:00
Luke Morris 8006498180 Merge branch 'master' into hotfix/1193-influxql-no-quotes 2017-04-06 13:51:15 -07:00
Jared Scheib ac4423a6fd Add new auth duration CLI option; add client heartbeat; fix logout (#1119)
* User can now set oauth cookie session duration via the CLI to any duration or to expire on browser close

* Refactor GET 'me' into heartbeat at constant interval

* Add ping route to all routes

* Add /chronograf/v1/ping endpoint for server status

* Refactor cookie generation to use an interface

* WIP adding refreshable tokens

* Add reminder to review index.js Login error handling

* Refactor Authenticator interface to accommodate cookie duration and logout delay

* Update make run-dev to be more TICKStack compliant

* Remove heartbeat/logout duration from authentication

* WIP Refactor tests to accommodate cookie and auth refactor

* Update oauth2 tests to newly refactored design

* Update oauth provider tests

* Remove unused oauth2/consts.go

* Move authentication middleware to server package

* Fix authentication comment

* Update authenication documentation to mention AUTH_DURATION

* Update /chronograf/v1/ping to simply return 204

* Fix Makefile run-dev target

* Remove spurious ping route

* Update auth docs to clarify authentication duration

* Revert "Refactor GET 'me' into heartbeat at constant interval"

This reverts commit 298a8c47e1431720d9bd97a9cb853744f04501a3.

Conflicts:
ui/src/index.js

* Add auth test for JWT signing method

* Add comments for why coverage isn't written for some areas of jwt code

* Update auth docs to explicitly mention how to require re-auth for all users on server restart

* Add Duration to Validation interface for Tokens

* Make auth duration of zero yield a everlasting token

* Revert "Revert "Refactor GET 'me' into heartbeat at constant interval""

This reverts commit b4773c15afe4fcd227ad88aa9d5686beb6b0a6cd.

* Rename http status constants and add FORBIDDEN

* Heartbeat only when logged in, notify user if heartbeat fails

* Update changelog

* Fix minor word semantics

* Update oauth2 tests to be in the oauth2_test package

* Add check at compile time that JWT implements Tokenizer

* Rename CookieMux to AuthMux for consistency with earlier refactor

* Fix logout middleware

* Fix logout button not showing due to obsolete data shape expectations

* Update changelog

* Fix proptypes for logout button data shape in SideNav
2017-04-06 11:40:57 -07:00
Chris Goller 20e13a4275 Workaround InfluxQL bugs by returning original query. 2017-04-06 00:06:15 -05:00
Chris Goller 66dc39a458 Remove debugging log 2017-04-05 23:18:40 -05:00
Chris Goller f9b0b6fa0b Merge branch 'master' into feature/reverse-kapa 2017-04-05 20:05:25 -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 fc900721ec Merge pull request #1168 from influxdata/feature/tr-mountable-router
Prefix all Chronograf routes with Basepath when configured
2017-04-04 17:45:31 -04:00
lukevmorris 1c1c00cd02 Admin Databases Page no longer breaks if a db is missing an rp (#1179)
* retentionPolicies could be a blank array

* Update CHANGELOG

* Add `retentionPolicies` to swagger docs
2017-04-04 14:42:24 -07:00
Tim Raymond 8a51adbced Remove unnecessary conditional tests
Re-mounting should only happen if the --prefix-routes option is set. If
this happens, the result will be a no-op as intended since the
--basepath will be "". MountableRouter and http.StripPrefix are both
no-ops with prefix set to ""
2017-04-04 16:29:48 -04:00
Tim Raymond d04483f779 Favor http.StripPrefix over home-rolled version
http.StripPrefix is a standard library handler which is designed to do
exactly what the inline http.HandlerFunc did (with almost the same
implementation).
2017-04-04 14:03:46 -04:00
Tim Raymond 206a6bba33 Bypass URLPrefixer if http.Flusher is unavailable
In certain situations, the http.ResponseWriter passed to the URLPrefixer
may not be an http.Flusher. A simple case where this may occur is if the
Prefixer has been wrapped up in a middleware where the above middleware
wraps the ResponseWriter in a ResponseWriter that doesn't implement the
Flush method.

Previously, the Prefixer would error, which would cause the request to
fail with a 500. Instead, the condition is logged and the request is
passed unmodified to the next middleware in the chain. This effectively
disables prefixing for requests where the above ResponseWriter is not an
http.Flusher.

Misc. Changes
=============

- Some tests for "builders" were moved to server/builders_test.go to
  follow with convention. We've been naming files after different things
  under test and leaving the file matching the package name for support
  objects-in this case a mock logger was added to that file.
2017-04-04 10:33:14 -04:00
Tim Raymond df19469002 Add parameter to control mounting behavior
Some load balancers will strip prefixes on their way to the chronograf
backend, others won't. The "--prefix-routes" parameter forces all
requests to the backend to have the prefix specified in "--basepath".
Omitting it will only cause routes to be rewritten in rendered
templates and assumes that the load balancer will remove the prefix.

Use with Caddy
==============

An easy way to test this out is using the free Caddy http server at
http://caddyserver.com.

This Caddyfile will work with the options `--basepath /chronograf
--prefix-routes` set:

```
localhost:2020 {
  proxy /chronograf localhost:8888
  log stdout
}
```

This Caddyfile will work with only the option `--basepath /chronograf`
set:

```
localhost:2020 {
  proxy /chronograf localhost:8888 {
    except /chronograf
  }
  log stdout
}
```
2017-04-04 10:28:46 -04:00
Tim Raymond 77ede66347 Use MountableRouter when Basepath is set
This breaks compatibility with the old behavior of --basepath, so this
requires that proxies be configured to not modify routes forwarded to
backends. The old behavior will be supported in a subsequent commit.
2017-04-03 17:09:05 -04:00
Tim Raymond e1d2949b18 Implement a MountableRouter
The httprouter used in Chronograf did not support prefixing every route
with some basepath. This caused problems for those using the --basepath
parameter in combination with a load balancer that did not strip the
basepath prefix from requests that it forwarded onto Chronograf.

To support this, MountableRouter prefixes all routes at definition time
with the supplied prefix.
2017-04-03 17:06:21 -04:00
Chris Goller 30da45163b Fix kapacitor base64 auth as header was built incorrectly. 2017-03-30 15:32:02 -05:00
lukevmorris d2a8dec731 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 2c925dad98 Change password (#1120)
Add ability to change a user's password via Admin page
2017-03-29 17:40:46 -07:00
Chris Goller 4a8fd7d108 Add compression for InfluxQL query responses 2017-03-28 13:10:05 -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 3107408851 Fix go dependency breaking master build 2017-03-24 13:34:56 -07:00
Andrew Watkins aa504b3640 Merge pull request #1029 from influxdata/feature/db-manager
Feature/db manager
2017-03-24 10:57:12 -07:00
Chris Goller 43c70c45e9 Update rpResponse default to isDefault 2017-03-24 10:06:59 -07:00
Chris Goller b474b8650c Update RP JSON default to isDefault 2017-03-24 09:58:57 -07:00
lukevmorris 668a1c5fc8 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 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 5d2fee8d3f Fix retention policies responses and change to PATCH 2017-03-23 14:30:24 -07:00
Chris Goller d107b9f591 Fix sources test to include databases link 2017-03-23 14:06:52 -07:00
Chris Goller 7997739a73 Add retention policies to the database response 2017-03-23 13:53:28 -07:00
Chris Goller 14d1e90de8 Fix exported method to be internal 2017-03-23 13:34:09 -07:00
Chris Goller c52742a901 Add retention policy link to databases and add comments 2017-03-23 13:29:13 -07:00
Chris Goller 8117106b26 Update databases/retention policy link responses 2017-03-23 13:16:02 -07:00
Jade McGough 05367492c6 Merge branch 'dbrp' into feature/db-manager 2017-03-23 11:24:40 -07:00
Jade McGough 3c014b2d05 updateRP 2017-03-23 06:13:41 -07:00
Jade McGough c4a97ad01d clean up some dashboards code 2017-03-23 05:49:33 -07:00
Jade McGough 4f229172c1 add missing patch responses swagger 2017-03-23 05:16:49 -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 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 0b521f3a27 db creation seems to be working 2017-03-22 23:21:21 -07:00
Jade McGough 8954535734 WIP 2017-03-22 22:21:25 -07:00
Jade McGough 45a44e7a89 write db info to dbresponse 2017-03-22 13:46:30 -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
Jade McGough 4b3b3c4930 dbs GET returns list of databases 2017-03-21 12:59:27 -07:00
Jade McGough cec687316d WIP db endpoint 2017-03-20 15:26:48 -07:00
Jade McGough 073520060b add db and rp routes to mux.go 2017-03-20 14:23:29 -07:00
Jade McGough b354d80782 link to retention policies in db response 2017-03-20 11:58:09 -07:00
Jade McGough 46b62c2569 add links to retentionpolicy swagger 2017-03-20 11:52:49 -07:00
Jade McGough 12b2d4908a add links to database swagger object 2017-03-20 11:48:25 -07:00
Chris Goller 79b1e9ae5e Fix reporting stats to update uptime 2017-03-17 09:59:52 -05:00
Jade McGough 862802710e add example for retention policy 2017-03-14 16:53:41 -07:00
Jade McGough b72e03cf23 fix swagger errors, add tags 2017-03-14 16:44:44 -07:00
Jade McGough 5f2e3b5d15 db rp server endpoint objects 2017-03-14 16:05:13 -07:00
Jade McGough 59b45388a6 first whack at db rp server endpoints 2017-03-14 15:31:57 -07:00
Jade McGough 64d5e822e4 db rp documentation WIP 2017-03-14 14:01:28 -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 43a12023f6 Update user's roles validation 2017-03-10 18:06:06 -06:00
Chris Goller 07ec40c94b Update roles to check if role already exists 2017-03-10 17:24:52 -06:00
Chris Goller b93cf4ca94 Add ability to update roles on a user resource 2017-03-10 16:52:24 -06: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 49d8ece940 Add structured logging to underlying http server 2017-03-06 15:16:45 -06:00
Chris Goller 9ac300cf19 Update to fix go linter issues 2017-03-06 10:11:52 -06:00
Chris Goller 03b6d4ce60 Update swagger documentation for roles and users examples 2017-03-01 19:39:03 -06:00
Chris Goller 51c65f9111 Update InfluxEnterprise users to return their roles 2017-03-01 19:13:44 -06:00
Chris Goller 3947d5181f Update schema for /permissions endpoint to have scopes 2017-02-27 13:31:38 -06:00
Chris Goller e1764a7c02 Update source timeseries client to change if meta server is set 2017-02-24 14:48:42 -06: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 1f878aa6d9 Fix enterprise create user to add permissions 2017-02-24 01:16:28 -06:00
Chris Goller b8fa581248 Enhance server logging for connection errors 2017-02-24 00:34:50 -06:00
Chris Goller f60a358751 Merge branch 'master' into feature/#54-tr-enterprise-client
Conflicts:
	Makefile
	chronograf.go
	server/routes.go
	server/users.go
2017-02-23 23:26:09 -06:00
Chris Goller 6581dc7ec2 Add roles endpoint and switching between OSS and enterprise 2017-02-23 21:54:20 -06:00
Chris Goller b29846da68 Merge pull request #922 from influxdata/feature/oauth-google
Support Multiple OAuth2 Providers - Add Heroku and Google
2017-02-23 17:34:01 -06:00