Commit Graph

7 Commits (85e8ba34918069717b8215bbee509e4ccf2aac5d)

Author SHA1 Message Date
Jared Scheib d0b36ae5df Allow hyphens and underscores in basepath 2018-06-15 17:05:01 -07:00
Brandon Farmer fe35f189ed Test & refactor basepath validation into dedicated fn 2018-04-23 17:02:00 -07:00
Jared Scheib 9710854b25 Comment WithContext fn for context 2018-04-23 16:47:35 -07:00
Chris Goller e39ddeddcf Fix cell replacement to return query config 2017-12-19 13:43:39 -06:00
Jared Scheib 12f1a8ce4b Add test for creating NewSources via server flag
Move TestLogger to mocks

Signed-off-by: Tim Raymond <tim@timraymond.com>
2017-07-07 12:56:12 -07: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
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