Commit Graph

3436 Commits (ae27f3aec1ab4cba862eaf146eb051a09037b6b2)

Author SHA1 Message Date
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
Jade McGough feaaa5c4bf update changelog 2017-05-08 11:08:24 -07:00
Jade McGough 1dd0e33a0d validate kapacitor connection after updating config 2017-05-08 11:03:54 -07:00
lukevmorris ebad771801 Submit tvars when asking for a queryConfig (#1408) 2017-05-05 23:05:14 -07:00
lukevmorris ba108269b5 Feature/varmoji dash (#1397)
* Support dashes in tempVars with two regex passes

* Rename CustomTimeRange component to CustomTimeRangeDropdown for discovery and consistency

* Update tests for template varmojis

* Give names to each step of regex multipass
2017-05-05 15:04:13 -07:00
lukevmorris 611795ecdd Need RangeValue to correctly calculate Alert graph range (#1406)
* Need RangeValue to correctly calculate Alert graph range

* Update CHANGELOG
2017-05-05 15:00:04 -07:00
Chris Goller 442a0762e8 Merge pull request #1201 from influxdata/feature/reverse-kapa
Kapacitor AST parsing / display all kapacitor tasks
2017-05-05 16:42:00 -05: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 8772cecef7 Fix bad commit to Makefile 2017-05-05 14:47:02 -05:00
Chris Goller 2851d607cc Merge branch 'master' into feature/reverse-kapa 2017-05-05 14:41:06 -05:00
Chris Goller ca35747702 Update CHANGELOG to mention enable/disable all tickscripts 2017-05-05 14:40:11 -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 315ca27b67 Fix link 2017-05-05 12:24:12 -07:00
Andrew Watkins acd5425ddb Handle deadman trigger validation 2017-05-05 12:16:01 -07:00
Jade McGough 861b8052b0 Merge pull request #1401 from influxdata/delete-kapacitor
add ability to delete kapacitor config
2017-05-05 11:42:16 -07:00
Alex Paxton c3e3e9c4d5 Merge pull request #1385 from influxdata/condense-de-lists
Query Builder Upgrade and Resizer Refactor
2017-05-05 11:33:11 -07:00
Jade McGough 1cdffa0097 use link from kapacitor object 2017-05-05 11:25:52 -07:00
Alex P 7669c69000 Follow correct pattern with naming 2017-05-05 11:25:02 -07:00
Andrew Watkins ff65bea7a7 Display all alert-rules regardless of origin
Alert rules can be generated by Chronograf or manually
by the user outide of the Chronograf UI.
2017-05-05 11:23:41 -07:00