Commit Graph

2746 Commits (fd672f0f053a393b20b2e5eac374cd8d7f267cc8)

Author SHA1 Message Date
Andrew Watkins 0606bbdd4f Consolidate switch statement 2017-04-04 14:46:16 -07:00
Timothy J. Raymond 42ad7e407a 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
Andrew Watkins f8a03e2f88 Add comments to elucidate various influxQL states 2017-04-04 14:42:59 -07:00
lukevmorris 2d023c2650 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
Andrew Watkins bc922215a3 Use quotes instead of backticks 2017-04-04 14:38:07 -07:00
Andrew Watkins 016a4cba9e Pull strings into consts 2017-04-04 14:37:24 -07:00
Chris Goller 267d2ad970 Update CHANGELOG to mention fixing #979 2017-04-04 16:33:45 -05:00
Chris Goller c3e1ada594 Update schema exploration to support non-default rp 2017-04-04 16:29:14 -05:00
Tim Raymond 23c5ff061f 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
Jared Scheib 45e8a5f1c8 Fix saving email in Kapacitor alerts (#1173)
* Fix Kapacitor Rules bug to now save user input data on an Alert Message

* Update changelog
2017-04-04 12:28:01 -07:00
Alex P a0c39ca17c Use more supported .cur format instead of .png 2017-04-04 12:22:47 -07:00
Alex P 1ac78833c0 Remove unused webpack files. -H 2017-04-04 12:22:23 -07:00
Andrew Watkins c24122ac4b Merge pull request #1164 from influxdata/1105-save-influxql-cells
Restore ability to save raw queries to a Dashboard Cell
2017-04-04 11:27:16 -07:00
Tim Raymond a8dbbf0f0f 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
Luke Morris 69edea39fa Bump CHANGELOG 2017-04-04 11:00:27 -07:00
Timothy J. Raymond 74cd9144cc Merge pull request #1115 from influxdata/feature/tr-disable-prefixing-no-flusher
Bypass URLPrefixer if http.Flusher is unavailable
2017-04-04 11:05:56 -04:00
Tim Raymond 5966bf1908 Update CHANGELOG with URL Prefixer Bypass changes
[ci skip]
2017-04-04 11:03:07 -04:00
Tim Raymond ee99e66a28 Update CHANGELOG with --prefix-routes changes 2017-04-04 10:59:16 -04:00
Tim Raymond 3177d4ef3c 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 d75ee187e6 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
Luke Morris 59894c61c0 Update CHANGELOG 2017-04-03 17:26:35 -07:00
Luke Morris d497dbf758 rawText queries should have blank labels for now 2017-04-03 17:22:48 -07:00
Tim Raymond f35de37257 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 84cc43cc77 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
Luke Morris 271728d3bf If InfluxQL, use rawText for label and query 2017-04-03 13:49:35 -07:00
Andrew Watkins 98fef831bb Fix portion of table being blocked from view 2017-04-03 13:48:59 -07:00
Andrew Watkins 155f1444b4 Improve copy 2017-04-03 13:42:55 -07:00
Andrew Watkins 7199d562e1 Improve no query state for table 2017-04-03 13:27:07 -07:00
Andrew Watkins e5d638e231 Remove requirement from prop 2017-04-03 13:26:47 -07:00
Hunter Trujillo ca3684e277 Merge pull request #1159 from influxdata/bugfix/1111-kapacitor-form
Bugfix/1111 kapacitor form
2017-04-03 14:22:53 -06:00
Andrew Watkins 581dfcbce2 Make query required in table and remove redundancy 2017-04-03 13:10:06 -07:00
Andrew Watkins d3643f88a4 Change empty how we handle empty state 2017-04-03 13:10:05 -07:00
Andrew Watkins 9d4a047ca9 Handle empty rawText case 2017-04-03 13:10:05 -07:00
Andrew Watkins 73f6f286cc Fix spacing on input with no status 2017-04-03 13:10:05 -07:00
Andrew Watkins 1c730a25ef Handle empty results 2017-04-03 13:10:05 -07:00
Andrew Watkins 1aa7b4770a Start query editor with placeholder text 2017-04-03 13:10:05 -07:00
Alex P 20ca434e97 Clean up styles 2017-04-03 13:10:05 -07:00
Alex P dba23a8ff1 Remove vestiges of "active" graphs in DE styles 2017-04-03 13:10:05 -07:00
Alex P e8698d376c Make DE table empty state more readable 2017-04-03 13:08:41 -07:00
Alex P dbc3c411e0 Style raw text status bar
is responsive
2017-04-03 13:08:41 -07:00
Alex P 88df7e99bc Change editor queries to be blue 2017-04-03 13:08:41 -07:00
Alex P bd2b630ffd Disable text selection in query editor empty states 2017-04-03 13:08:41 -07:00
Alex P 822f8b3b44 Make builder queries vertically centered (again) 2017-04-03 13:08:41 -07:00
Alex P 4de5c55b63 Make query tab delete buttons scale with everything else
They looked mad tiny on big screens
2017-04-03 13:08:41 -07:00
Alex P 1ba8b99014 Make visualization toggle capitalized 2017-04-03 13:08:40 -07:00
Alex P adb2de0504 Make query builder query tabs allow for more text before truncating 2017-04-03 13:08:40 -07:00
Andrew Watkins 170b15a3f0 Update table CSS 2017-04-03 13:08:40 -07:00
Andrew Watkins 3a4c955474 Remove MultiTable 2017-04-03 13:08:40 -07:00
Andrew Watkins afde7fcf69 Change tabs in the table when builder changes tabs 2017-04-03 13:08:40 -07:00
Andrew Watkins 3183544f6b Update some primatives to use constants 2017-04-03 13:08:40 -07:00