353 Commits

Author SHA1 Message Date
Fabian Reinartz
99b079a4c8 Bump version to 0.16.2 2016-01-12 12:30:29 +01:00
Fabian Reinartz
da037bbc3c Revert autocomplete changes 2016-01-11 18:20:59 +01:00
Fabian Reinartz
ee5b0c0e55 Don't federate stale samples 2016-01-11 18:20:57 +01:00
Fabian Reinartz
853485a059 Update common/{expfmt,model}
Closes #1232
2016-01-11 18:20:57 +01:00
Fabian Reinartz
f6204b80ff Do not panic in Consul SD creation 2016-01-11 18:20:57 +01:00
Tobias Schmidt
dfba548210 Return HTTP server error codes for execution errors 2016-01-11 18:20:55 +01:00
Tobias Schmidt
e8260b9b90 Make time parameter optional in v1 query API
If no time paramter is provided, the current server timestamp is used.
2016-01-11 18:20:54 +01:00
Julius Volz
d5ad7a3dbb Minor fixups to web/ui/README.md 2016-01-11 18:20:54 +01:00
Fabian Reinartz
f5bd4cd9bb Document convenient development of UI files. 2016-01-11 18:20:53 +01:00
Sam Starling
43c7ef253c Tidy up .js files based on static analysis from jshint 2016-01-11 18:20:53 +01:00
Julius Volz
2a0c8e9087 Don't autocomplete metrics in range specifications. 2016-01-11 16:48:25 +01:00
Tobias Schmidt
2c8cf39630 Format web/blob/files.go after generation 2016-01-11 16:48:24 +01:00
Julius Volz
d1d2dea8f4 Recompile web assets for autocomplete change. 2016-01-11 16:48:23 +01:00
Julius Volz
0bac481200 Enable autocomplete anywhere in expression.
This enables metric name autocompletion for every word in an expression,
not just the very first one. It would be great to also support all
language keywords during autocompletion in the future.
2016-01-11 16:48:23 +01:00
Julius Volz
5df52e2874 Support escape sequences in strings and add raw strings.
This adapts some functionality from the Go standard library for string
literal lexing and unquoting/unescaping.

The following string types are now supported:

Double- or single-quoted strings:

  These support all escape sequences that Go supports in double-quoted
  string literals. The difference is that Prometheus also has
  single-quoted strings (instead of single-quoted runes in Go). Raw
  newlines are not allowed.

Backtick-quoted raw strings:

  Strings quoted in backticks are treated as raw strings just like in Go
  and may contain raw newlines and other special characters directly.

Fixes https://github.com/prometheus/prometheus/issues/1122
Fixes https://github.com/prometheus/prometheus/issues/1121
2016-01-11 16:48:22 +01:00
Roy Miloh
dae8797037 Remove duplicated bootstrap js on the graph template, it's already included on the base template. 2016-01-11 16:48:21 +01:00
Fabian Reinartz
f4ddf1a1d8 Switch to common/log 2016-01-11 16:48:21 +01:00
Julius Volz
fbb42497af HTML-escape string return values in web UI.
Querying for the string literal "<script>alert(1)</script>" would alert
otherwise.
2016-01-11 16:48:21 +01:00
Julius Volz
35fa4ff267 Rename global "labels" config option to "external_labels". 2016-01-11 16:48:20 +01:00
Fabian Reinartz
a4abed1e01 Switch to common/route package 2016-01-11 16:48:19 +01:00
Julius Volz
b3ab5ec5d4 Fix / -> /graph redirect when using a path prefix. 2016-01-11 16:48:19 +01:00
beorn7
90f594c9fb Fix creation of protobuf fields 2016-01-11 16:48:18 +01:00
Fabian Reinartz
6d5cd89464 Fix unkeyed field errors. 2016-01-11 16:48:18 +01:00
Fabian Reinartz
38220cf132 Move assets generation to top level make file 2016-01-11 16:48:17 +01:00
Fabian Reinartz
bb74d7ba39 Remove compression from web interface 2016-01-11 16:48:16 +01:00
Fabian Reinartz
afa484b098 Apply HTTP handler compression everywhere 2016-01-11 16:48:16 +01:00
Fabian Reinartz
9655d22ff7 Fix redirect path 2016-01-11 16:48:15 +01:00
Fabian Reinartz
c62ca1dadf Change UI start page 2016-01-11 16:48:15 +01:00
Fabian Reinartz
8d8fdeaa58 Add global labels to federation 2016-01-11 16:48:13 +01:00
Julius Volz
1a1f8e7819 Add POST handler for /debug to fix CPU profiling.
`go tool pprof` sends a POST request to enable CPU profiling, so we also
need to handle that method.
2016-01-11 16:48:12 +01:00
Julius Volz
bb0ba8d68f Fix most golint warnings.
This is with `golint -min_confidence=0.5`.

I left several lint warnings untouched because they were either
incorrect or I felt it was better not to change them at the moment.
2016-01-11 16:48:11 +01:00
Fabian Reinartz
d6b8da8d43 Switch promql types to common/model 2015-08-25 13:49:14 +02:00
Fabian Reinartz
d6d88f8950 Add missing license headers 2015-08-24 19:19:21 +02:00
Fabian Reinartz
1535ef1457 Replace metric.SamplePair with model.SamplePair 2015-08-22 14:52:35 +02:00
Fabian Reinartz
438e232c9b Fix grouping of import blocks 2015-08-22 09:42:45 +02:00
Fabian Reinartz
47aa0d536c Use common/expfmt in federation 2015-08-21 13:33:38 +02:00
Fabian Reinartz
306e8468a0 Switch from client_golang/model to common/model 2015-08-21 13:33:38 +02:00
Julius Volz
274e9d6955 Exit when web server encounters a startup error 2015-08-20 18:23:57 +02:00
Julius Volz
e88007306c Remove broken alert silencing links.
Let's remove the silencing links until we actually have support for that.
A silencing link shouldn't only redirect to Alertmanager, but also open a
silencing dialog for the respective alert name or active alert element.
2015-08-18 14:48:57 +02:00
Brian Brazil
eb82a4b948 web: Support multiple names for console graphs. 2015-08-11 23:37:09 +01:00
Brian Brazil
a8605825a0 Rollback, meant to send a PR 2015-08-11 20:02:03 +01:00
Brian Brazil
1ad449d233 web: Support multiple names for console graphs. 2015-08-11 19:59:00 +01:00
Jan Berktold
fa929a8345 Change /reload to /-/reload & and fix channel type 2015-08-11 12:26:41 +02:00
Jan Berktold
2bf7048dbb Add reload handler to web 2015-08-11 11:27:15 +02:00
Dan Williams
0441518a71 Add IDs to H2 tags to allow anchored linking
Allow sharing links directly to areas of the status page f.e. http://prometheus.internal/#config/
2015-07-30 15:39:05 -04:00
Julius Volz
c5c7f92960 Fix /debug/pprof endpoint with new web router.
This got broken in
78047326b4
since it stopped using the DefaultServeMux.

This approach will defer pprof requests to the DefaultServeMux, which
may or may not have pprof enabled (in Prometheus, it gets it included in
main.go). An alternative approach would be to duplicate the four lines in
https://golang.org/src/net/http/pprof/pprof.go#L62. When choosing that
approach though, we would not automatically gain any new endpoints added
by net/http/pprof or other /debug endpoints in the future.
2015-07-22 12:28:46 +02:00
Fabian Reinartz
62b4e89b39 Restore legacy API scalar format 2015-07-16 20:19:18 +02:00
Brian Brazil
87b9813be4 Merge pull request #883 from brian-brazil/fix-menu
web: Fix regression in .Path
2015-07-10 10:38:30 +01:00
Brian Brazil
7b5a29fc8f web: Fix regression in .Path
.Path is documented as removing /consoles/,
recent changes added in a leading / which broke
the provided console templates menu system.
2015-07-10 10:31:35 +01:00
Fabian Reinartz
9e599976c4 web/js: fix display error for vectors in console 2015-07-10 00:43:43 +02:00