Commit Graph

1558 Commits (3ead540f759fc24faef718386c61d8699568c7bc)

Author SHA1 Message Date
Tim Raymond 9d2e9111ef Make prefixer support multiple tags, chunked enc
The prefixer needs to not only replace `src="` attributes as it
currently does because that is not the only place a relative URL can
appear. It needs to also prefix URLs found in CSS which can also come
from the downstream http.ResponseWriter.

This adds support for an arbitrary list of patterns that will cause the
prefixer to insert its configured prefix. This is currently set to look
for `src`, `href`, and `url()` attributes.

Also, because we are modifying the stream, we need to suppress the
Content-Length generated by any downstream http.Handlers and instead
enable Transfer-Encoding: chunked so that we can stream the modified
response (we don't know apriori how many times we'll perform a
prefixing, so we can't calculate a final Content-Length). This is
accomplished by duplicating the Headers in the wrapResponseWriter that
is handed to the `Next` handler. We also handle the chunking and
Flushing that needs to happen as a result of using chunked transfer
encoding.
2017-01-27 17:00:08 -05:00
Tim Raymond 33256914b3 Add URL Prefixer
In order to support hosting chronograf under an arbitrary path[1], we
need to be able to rewrite all the URLs that are served in HTML and CSS.
Take, for example, the scenario where Chronograf is to be hosted under
`/chronograf` using Caddy and this example Caddyfile:

```
localhost:2020
gzip
proxy /chronograf localhost:8888 {
  without /chronograf
}
```

Chronograf will not load properly when visiting
`http://localhost:2020/chronograf` because the requests for CSS, and
fonts will go to `http://localhost:2020/app-somegianthash.js` when they
should go to `http://localhost:2020/chronograf/app-somegianthash.js`.
This is the essence of issue #721.

To solve this, we add a URLPrefixer http.Handler, that acts as a
middleware. It inserts itself between any upstream handlers, and the
handler that was passed to it as its `Next` parameter and searches for
`src="` attributes. Upon discovering one of these attributes, it writes
the detected attribute and then the configured prefix. It then continues
writing the stream to the upstream http.ResponseWriter until
encountering another attribute until EOF.
2017-01-27 17:00:08 -05:00
Chris Goller f67e5678a7 Update circle's docker build tag to chronograf-20170127 2017-01-27 15:57:49 -06:00
Chris Goller 1adec2dd1d Update to node 6.9.4 and mention support for node 7 2017-01-27 15:53:25 -06:00
Chris Goller d32635ef88 Update to Go version 1.7.5 2017-01-27 15:31:04 -06:00
Andrew Watkins 6f7dcc7eb0 Merge pull request #803 from influxdata/kapacitor-defaults
Add default values for kapacitor config
2017-01-27 13:29:23 -08:00
Nathan Haugo 87b859eb00 Merge pull request #812 from influxdata/bugfix/layout-gaps
Fix layout autoflow to handle multiple cells per layout
2017-01-27 11:26:38 -08:00
Chris Goller 9ecfc5d77b Update CHANGELOG to add #774 2017-01-27 13:18:56 -06:00
Chris Goller 2254bcc442 Fix layout autoflow to handle multiple cells per layout 2017-01-27 13:15:50 -06:00
Nathan Haugo 4222d1bace Merge pull request #811 from influxdata/feature/procstat-layout
Add procstat layout
2017-01-27 10:37:52 -08:00
Chris Goller 111764a168 Update CHANGELOG to add procstat layout 2017-01-27 12:04:40 -06:00
Chris Goller f5baeca5a5 Add net and procstat to README 2017-01-27 12:03:50 -06:00
Chris Goller 6d6acf082e Add layout for telegraf's procstat measurement 2017-01-27 11:59:30 -06:00
Chris Goller a3458802a9 Update CHANGELOG to mention `inputs.net` telegraf layout 2017-01-27 11:36:21 -06:00
Chris Goller 59ed8e91e8 Fix typo in new_apps script 2017-01-27 11:31:02 -06:00
Chris Goller d1bdbadece Add layout for telegraf's net measurement 2017-01-27 11:30:41 -06:00
Chris Goller a2cb847eed Merge pull request #809 from influxdata/feature/update-release-build
Update build script to output JSON for website and MD for GH
2017-01-27 10:22:12 -06:00
Chris Goller 1926c8a7cf Update build script to output JSON for website and MD for GH 2017-01-27 10:07:15 -06:00
Jade McGough cb6d58d7ca cleanup 2017-01-27 05:41:03 -08:00
Jade McGough 6d07ddc533 cleanup 2017-01-27 05:32:59 -08:00
Jade McGough 7a37b4c9c4 get graphs to display 2017-01-27 05:24:26 -08:00
Jade McGough bc8ef6c91a don't show endless loading if there are no dashboards 2017-01-27 05:10:44 -08:00
Jade McGough 154f6f312c fix dashboards routes 2017-01-27 04:59:13 -08:00
Jade McGough fdb6de3503 fix bugs 2017-01-27 04:51:31 -08:00
Jade McGough 607aa033f4 augment boltdb to store dashboard query objects 2017-01-27 04:29:38 -08:00
Jade McGough db11ce66a0 dashboard graph rendering 2017-01-27 04:04:26 -08:00
Jade McGough e74b92a466 fix dashboard unmarshalling 2017-01-27 01:23:19 -08:00
Jade McGough 6cf85c98af remove dropdown menu for now 2017-01-27 00:54:28 -08:00
nathan haugo c8333acd2f Revert to f3cb3fb72b 2017-01-26 18:13:27 -08:00
Nathan Haugo 19003e57aa Merge pull request #807 from influxdata/revert-799-bugfix/legend-data-order
Revert "Bugfix/legend data order"
2017-01-26 18:05:54 -08:00
Nathan Haugo 063dd46d71 Merge pull request #806 from influxdata/revert-804-revert-799-bugfix/legend-data-order
Revert "Revert "Bugfix/legend data order""
2017-01-26 18:01:09 -08:00
Nathan Haugo 0c02deedd9 Revert "Revert "Bugfix/legend data order"" 2017-01-26 18:00:14 -08:00
Nathan Haugo 319b0e3953 Revert "Bugfix/legend data order" 2017-01-26 17:57:50 -08:00
Nathan Haugo eef17ab249 Merge pull request #804 from influxdata/revert-799-bugfix/legend-data-order
Revert "Bugfix/legend data order"
2017-01-26 17:56:08 -08:00
Nathan Haugo 8067b32b17 Revert "Bugfix/legend data order" 2017-01-26 17:55:21 -08:00
Nathan Haugo 1da41c760a Merge pull request #799 from influxdata/bugfix/legend-data-order
Bugfix/legend data order
2017-01-26 17:54:19 -08:00
Nathan Haugo f3cb3fb72b Merge pull request #791 from influxdata/talk-config
Introduce Talk alert config
2017-01-26 17:52:15 -08:00
Nathan Haugo a207a7b21b Merge pull request #800 from influxdata/bugfix/duplicate-defaults#769
Duplicate defaults appearing in InfluxDB configuration
2017-01-26 17:51:41 -08:00
Andrew Watkins 857dd08468 Add default values for kapacitor config 2017-01-26 17:51:37 -08:00
Hunter Trujillo d166dcf730 Fix Telegram parse-mode support for HTML and Markdown. 2017-01-26 17:31:51 -07:00
Hunter Trujillo bfdba8de74 Add reducer spec for shared/sources. Add nodemon script to package.json to help with TDD. Fix actual issue: duplicate defaults in sources. 2017-01-26 16:55:05 -07:00
Regan Kuchan ba447ebaed Update Chronograf version number 2017-01-26 14:52:10 -08:00
Regan Kuchan 36829b01f5 Update INSTALLATION and GETTING_STARTED 2017-01-26 14:51:24 -08:00
Jade McGough 456ec00c95 add dashboard content, make request to API 2017-01-26 14:04:51 -08:00
Andrew Watkins 7bce138415 Cleanup 2017-01-26 11:21:56 -08:00
Andrew Watkins b8bb570ecc Cleanup comments 2017-01-26 11:09:04 -08:00
Andrew Watkins 5b200a315f Include support for tags 2017-01-26 11:07:34 -08:00
Hunter Trujillo c0182922ed Fix format sent to Kapacitor for Telegram. 2017-01-25 16:22:59 -07:00
Hunter Trujillo ccb94894e8 Guard against undefined series error. 2017-01-25 14:35:47 -07:00
Hunter Trujillo 81d214780e Cleanup. Passes linter. 2017-01-25 14:35:32 -07:00