Commit Graph

3511 Commits (fa997b27bdab0ba0419af315ffe1d793d89cf311)

Author SHA1 Message Date
Luke Morris 52bddb9ba5 Update 3 links 2017-05-08 18:27:25 -07:00
lukevmorris 281e743d95 Add SourceIndicator to Configuration and Admin pages (#1439)
* Add SourceIndicator to ManageSources + SourcePage

* Update CHANGELOG

* Add Source Indicator to Admin Page
2017-05-08 18:22:53 -07:00
Andrew Watkins 7d89b81d9b Merge pull request #1435 from influxdata/bugfix/click-meas-sadness
Resolve bugs: 1424, 1425, & 1431
2017-05-08 18:04:17 -07:00
Alex P b3e712daae Add autoHide prop to pass down 2017-05-08 18:00:11 -07:00
Andrew Watkins 69c0ee61a7 Merge branch 'master' into bugfix/click-meas-sadness 2017-05-08 17:50:12 -07:00
lukevmorris 7b3e23cfba Update CHANGELOG (#1436)
* Update CHANGELOG

* Update CHANGELOG
2017-05-08 17:49:13 -07:00
Andrew Watkins 9a8c61bb28 Update CHANGELOG 2017-05-08 17:48:49 -07:00
Andrew Watkins d5b644274a Fix #1431 -- no legend on graph-single-stat 2017-05-08 17:47:32 -07:00
Andrew Watkins 37c51a7697 Fixes bugs #1424,#1425 2017-05-08 17:47:32 -07:00
Hunter Trujillo 1febb80aff Merge pull request #1433 from influxdata/bugfix/router-fix
Fall back to useRouterHistory method.
2017-05-08 17:42:12 -07:00
Alex P 4e1e54de96 Fix presentation mode 2017-05-08 17:41:50 -07:00
Luke Morris 59a5ba1f51 Remove redundant if/else 2017-05-08 17:33:07 -07:00
Luke Morris b7ede8c8a7 Cowabunga, it's dashboard 🕑 2017-05-08 17:12:04 -07:00
Jade McGough 41ed763c91 Merge pull request #1417 from influxdata/fix/safari-presentation-mode
support escaping from presentation mode with safari
2017-05-08 16:39:56 -07:00
Jade McGough c1e040887c add comment 2017-05-08 16:39:14 -07:00
Regan Kuchan 289c7ed979 Link to new docs! 2017-05-08 16:31:24 -07:00
Jade McGough bd21b6c8da Yehuda says to use keyCode for cross-browser support 2017-05-08 16:29:54 -07:00
Hunter Trujillo 3ff8dfbbf8 Update CHANGELOG. 2017-05-08 16:22:45 -07:00
Jade McGough 0e7f6f0f6c avoid using deprecated keydown attribute 2017-05-08 16:10:05 -07:00
Alex P b6886a8bd8 Make scrollbars green themed on Kapacitor pages 2017-05-08 16:01:52 -07:00
Hunter Trujillo b2738b51e2 Fall back to useRouterHistory method. 2017-05-08 16:01:06 -07:00
Alex P 8983cbfe48 Use FancyScrollbox instead of page-contents 2017-05-08 15:55:57 -07:00
Alex P 76aeda2cca Remove defaultProps 2017-05-08 15:55:32 -07:00
Alex P 8304c178e1 Clean up layout styles
Moving misc styles to unsorted, removing dupes
2017-05-08 15:54:58 -07:00
Jade McGough 1a2cafe485 update changelog 2017-05-08 15:35:02 -07:00
Jade McGough 9ac62d50b2 support escaping from presentation mode with safari 2017-05-08 15:31:13 -07:00
Alex P 982ab41be6 Use yellow for warning dot in tables 2017-05-08 15:04:48 -07:00
Alex P 6e3a2f7a3a Add react-custom-scrollbars package and default styles 2017-05-08 15:04:21 -07:00
Regan Kuchan 7562409fcd Merge pull request #1414 from influxdata/chronorc
Updates for 1.3.0~rc1
2017-05-08 14:57:23 -07:00
Regan Kuchan c882d751ab Updates for 1.3.0~rc1 2017-05-08 14:56:57 -07:00
Timothy J. Raymond 96f58f342d Merge pull request #1407 from influxdata/1369-fix/router_basepath
Fix OAuth when using a Basepath
2017-05-08 14:48:06 -07:00
Tim Raymond 2821777750 Update CHANGELOG with OAuth/basepath fix 2017-05-08 14:40:50 -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 bdf111357d Fix missing renaming of logout => logoutLink
During development, this was previously named `logout`. This cleans up a
remaining instance of `logout`, renaming it to the preferred
`logoutLink` to remain consistent with the rest of the codebase.
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
Jared Scheib 172f976ca6 Fix links assignment on some AJAX requests 2017-05-08 14:40:50 -07:00
Jared Scheib 4b4f1bd572 Add / to routes and use simpler basename api 2017-05-08 14:40:50 -07:00
Jared Scheib 05437cfcdc Remove unnecessary basepath logic 2017-05-08 14:40:50 -07:00
Jade McGough d4dac5a878 Merge pull request #1412 from influxdata/fix/alerts-on-kapacitor-refresh
validate kapacitor connection after updating config
2017-05-08 12:41:03 -07:00
Jade McGough 1025f4fe70 fix dumb copypasta 2017-05-08 12:20:57 -07:00
Jade McGough 9e2cce9593 make checkKapacitorConnection async 2017-05-08 12:17:49 -07:00
Jade McGough 610c6697e6 redirect to kapacitor edit route after creating new kapacitor 2017-05-08 12:05:09 -07:00
Jade McGough 74760ab2b4 pull kapacitor connection checks out of callbacks 2017-05-08 11:32:35 -07:00
Jade McGough b048cefa80 remove line from another PR 2017-05-08 11:08:38 -07:00