Commit graph

298 commits

Author SHA1 Message Date
Stanislav Putrya 6141a8bd7c Show warnings in UI if query have returned some warnings (#5964)
* Show warnings in UI if query have returned some warnings
+ improve warning (error) text if query to remote was finished with error
* Add prefixes for remote_read errors

Signed-off-by: Stan Putrya <root.vagner@gmail.com>
2019-08-28 14:25:28 +01:00
Harkishen Singh f0bb8129c3 Fixes service-discovery view when accessed from unhealthy targets (#5915)
* fix service-discovery view

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* updated localStorage logic

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* sign off

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* committed vfs unicodes

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
2019-08-21 13:57:08 +02:00
slava 5e974d3170 Fix context for the showWarning function (#5833)
* Fix context for the showWarning function

If the difference between the current time on a client and time on a server is quite big, Prometheus tries to show a related warning in UI on the Graph tab. But in the code, an incorrect context is used to invoke this method. As a result, an error is showed in the web developer console and the whole page stop working at all. This commit fixes the context.

CC @juliusv

Signed-off-by: Vyacheslav Kulakov <vkulakov@swiftserve.com>

* Fix context for the showWarning function

Fixed assets

CC @juliusv

Signed-off-by: Vyacheslav Kulakov <vkulakov@swiftserve.com>
2019-08-05 20:03:12 +02:00
Sylvain Rabot 7cd5cf0b69 Sanitize HTML output (#5665)
* Compact html output
* Fix html style block location

Signed-off-by: Sylvain Rabot <s.rabot@lectra.com>
2019-06-25 13:39:34 +01:00
Tariq Ibrahim c4b57ac4e2
fix minor issue in the <a> tag of rules.html
Signed-off-by: Tariq Ibrahim <tariq181290@gmail.com>
2019-05-16 13:00:35 -07:00
pbhudiaBAE 43953b105b Sorting alerts by group name in /alerts (#5448)
* Working group name

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Working categorised by group name

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Changed group sorting in web

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Fixed group sorting and comments

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Fixed group sorting and comments with gofmt

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Added file and group name

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* reverted back to full path to yml file

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>
2019-05-14 23:14:27 +02:00
Simon Pasquier 03b90b4645
web/ui: update to Bootstrap 4.3.1 (#5506)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-04-30 10:16:36 +02:00
Ganesh Vernekar 0afd172224
Merge pull request #5416 from prometheus/release-2.8
Merge 2.8.1 into master
2019-03-29 15:20:49 +05:30
Simon Pasquier 7328cb6cc2 web/ui: display the job label in /targets
PR #4806 was removed accidentally by #5192 (Bootstrap upgrade).

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-26 16:52:48 +01:00
Matthias Loibl b7e978d255 web/ui: Fix padding in navbar container (#5371)
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2019-03-18 23:17:49 +01:00
Julien Pivotto 6c72cdb1e1 Add GODEBUG to the runtime page (#5324)
This is useful, e.g. with go 1.12 to see if TLS1.3 has been enabled.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-18 11:10:13 +00:00
Krasi Georgiev 9d96ada510 Display correct values for the retention in the flags web gui. (#5322)
* Display correct values for the retention in the flags web gui.

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>

* adding a log entry

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>

* added the retention info to the runtime status page

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>

* simplify the retention display

Signed-off-by: Krasi Georgiev <kgeorgie@redhat.com>
2019-03-11 22:48:57 +05:30
Julien Pivotto 6152df44c2 ui: Expand expression_select to 220px
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-11 17:24:25 +01:00
Ganesh Vernekar 46e0587cb3
Merge pull request #5318 from roidelapluie/sdtag
ui: remove extra table tag in service discovery
2019-03-11 20:13:13 +05:30
Julien Pivotto 5a162dc1ab
ui: remove extra table tag in service discovery
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-09 11:02:14 +01:00
Julien Pivotto 981f9208fb
ui: Remove time picker borders
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2019-03-08 22:58:31 +01:00
David 38fea83c1f Debounce input key press handling (#5309)
- input key handler causes 2 layout cycles on each keypress which can
clog up browser rendering when typing quickly
- this change adds a debounce to the key press handler of 500ms

Fixes #5308
Signed-off-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2019-03-06 16:16:55 +01:00
Julius Volz fdbaef86df Re-add typeahead license header to minified file
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-17 22:50:20 +00:00
Julius Volz 661f0127bc Rebuild web assets
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-17 22:50:16 +00:00
Julius Volz ed635190ba Re-add popper.js to fix target label tooltips
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-17 19:40:57 +00:00
Julius Volz 7b724cea3a Whitespace and other cleanups
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-17 19:40:52 +00:00
Julius Volz 7244ef3783 Add more top/bottom spacing for All/Unhealthy buttons
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-17 19:40:48 +00:00
Julius Volz 028e99e3d6 Remove spacing between All/Unhealthy buttons
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-17 19:40:44 +00:00
Julius Volz 45b91e8e80 Fix copy&paste button on /config, move pre style to CSS
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2019-02-17 19:40:30 +00:00
Julius Volz cd569b51d9 Merge branch 'master' into bootstrap4 2019-02-17 17:22:41 +00:00
Maria Nemtinova 8e3a39f725 Web UI QoL improvements (#5201)
1. Added an ability to resize text area on mouseclick
2. Remember selected target status button on page reload

Signed-off-by: Maria Nemtinova <nemtinovamasha@gmail.com>
2019-02-12 00:22:05 +01:00
jritchieBAE b8f0a41745 Update to Bootstrap 4.1.3 (#5192)
* web: updated bootstrap3-typeahead file to work with bootstrap 4.0.0

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: Replaced bootstrap-3.3.1 with bootstrap 4.0.0

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: Added bootstrap4-glyphicons as 4.0.0 doesnt include bootstrap3 glyphicons

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated js jquery to 3.3.1

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated _base.html to import new bootstrap 4.0.0, jquery3.3.1 and bootstrap class tags to be 4.0 compatible

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: _base.html missed word out in title tag (Server).

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated alerts.html class names and tags to be bootstrap 4 compatible.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated config.html class names and tags to be bootstrap 4 compatible.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated flags.html class names and tags to be bootstrap 4 compatible.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated service-discovery.html class names and tags to be bootstrap 4 compatible.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated status.html class names and tags to be bootstrap 4 compatible.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated targets.html class names and tags to be bootstrap 4 compatible.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: updated graph_template.handlebar class names and tags to be bootstrap 4 compatible.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: alerts.css fix for button color inheritance on alerts page.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: graph.css fix for color inheritance.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: prometheus.css updated to fix nav bar.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* web: previous merge conflict not fixed correctly on _base.html

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* menu.lib and prom.lib imports updated

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* bootstrap 4.1.3 imported

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Bootstrap 4.1.3 imported into _base.html

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* bootstrap 4.1.3 imported into prom.lib

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* menu.lib style adjusted to view sidebar

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Alert colour uplifted to bootstrap 4.1.3

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Alerts display code reformatted similarly to config

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Consoles pages adjusted to account for new navbar

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* LHS Menu fixed in console pages

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Minor changes to prom_console to adjust lhs nav

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Prom.lib and some css updated to fix console graph controls

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Bootstrap 4.0.0 files removed

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Consoles configured so that the graph fits with the new side bar, css files also adjusted

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Import popper.min.js for dropdowns

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Popper.min.js imported locally

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Re-added #4764 and fixed css

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Removed .DS_Store

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Rebuilt assets

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* Spaces between buttons and inputs on graph page removed

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>

* fixed spacing in buttons on /targets

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* Updated vfsdata.go

Signed-off-by: Pritam Bhudia <pritam.bhudia@baesystems.com>

* fixed typeahead issue

Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>

* added css for dropdown

Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>

* changed order of css imports

Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>

* tinkered with CSS changes to make keyboard select and mouseover match

Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
2019-02-07 22:18:09 +01:00
Simon Pasquier a60431f3cd Merge v2.7.1 into master (#5170)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-02-01 09:54:12 +01:00
Vishnunarayan K I 108b9b0e5f Limit number of merics in prometheus UI (#5139)
Signed-off-by: Vishnunarayan K I <appukuttancr@gmail.com>
2019-01-31 17:03:50 +00:00
Stafford Williams 328d81999a /config: Added Copy to clipboard button for /config (#4410)
* added `Copy to clipboard` button

Signed-off-by: Stafford Williams <stafford.williams@gmail.com>

* generate vsfdata

Signed-off-by: Stafford Williams <stafford.williams@gmail.com>

* new lines

Signed-off-by: Stafford Williams <stafford.williams@gmail.com>

* single newline

Signed-off-by: Stafford Williams <stafford.williams@gmail.com>
2018-11-27 16:05:26 +08:00
David Coles 1591ebf985 ui: Fix hover when metric has null value. (#4906)
When a metric has a null value, number formatters like
`humanizeNoSmallPrefix` will throw "Uncaught TypeError: Cannot read
property 'toPrecision' of null".

This is fixed by explicitly checking for `null` and returning the string
"null".

Note: This is usually not seen as rickshaw doesn't show annotations for
null values, but still calls the formatter.

Signed-off-by: David Coles <coles.david@gmail.com>
2018-11-25 14:16:48 +08:00
achiuBAE a9050c45f6 Allow setting the Prometheus instance document title through a flag. (#4841)
* web: added ability to set page title through flag.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* Reformatted variable names and Flag description for readability.

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* assets_vfsdata.go

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* Flag name changed from web.ui-title to web.page-title

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>

* make assets

Signed-off-by: Andrew Chiu <andrew.chiu2@baesystems.com>
2018-11-21 12:45:06 +08:00
Simon Pasquier d89c01b065 web/ui: fix asset generation for Go modules installs
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-12 10:56:21 +01:00
Simon Pasquier bf9a1d3d15 *: fix assets generation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-12 10:38:29 +01:00
Simon Pasquier 0a319b001a Update documentation
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 15:01:15 +01:00
Simon Pasquier 5230e2730a
*: check that assets are up-to-date (#4731)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-11-09 11:31:36 +01:00
Simon Pasquier 147f2061d5 web: display job label in targets page
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-30 16:20:43 +01:00
Wei Guo 742583e836 Support to query elements by a specific time (#4764)
* support to query elements by a specific time

Signed-off-by: Wei Guo <me@imkira.com>
2018-10-26 14:16:40 +02:00
Ariya Hidayat a0ba9b7f3e Avoid browser's spell-checking the Expression field (#4728)
Signed-off-by: Ariya Hidayat <ariya.hidayat@gmail.com>
2018-10-17 10:54:16 +02:00
Simon Pasquier c4a6acfb1e
*: move to go 1.11 (#4626)
* *: move to go 1.11

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Reduce number of places where we specify the Go version

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-10-16 09:41:45 +02:00
Will Hegedus 193ebe7e34 Updates to /targets and /rules (scrape duration, last evaluation time) (#4722)
* Add evaluationTimestamp (Last Evaluation) column to display on /rules
Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>

* Add lastScrapeDuration ("Scrape Duration") to display on /targets
Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>

* Updates based on Julius' feedback

Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>

* Update to set timestamp to when eval started (after eval completes)

Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>

* Update /rules to display time since last evaluation

Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>

* Re-order Last Eval/Eval Time to be consistent with targets page

Signed-off-by: Will Hegedus <wbhegedus@liberty.edu>
2018-10-12 18:26:59 +02:00
Benji Visser eb4cc37e50 Update moment.js and moment-timezone.js (#4679)
* upgrading moment-timezome (0.5.13 -> 0.5.17)
* upgrading dependency moment (2.16.0 -> 2.22.2)

Signed-off-by: noqcks <benny@noqcks.io>
2018-10-10 09:48:06 +01:00
Julien Pivotto 17fea5478a Improve rule views by wrapping lines (#4702)
With the addition of the errors in the views list, it is now difficult
to have a view on all the rules in a screen witdh.

This commit adds wrapping to improve the overall display of the rules
page.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2018-10-07 15:31:16 +01:00
Goutham Veeramachaneni 9ee4b05d16
Better link for docs (#4593)
Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2018-09-13 15:26:41 +05:30
Simon Pasquier 3581377e5d Replace go-bindata with vfsgen (#4430)
Looking at https://tech.townsourced.com/post/embedding-static-files-in-go/ (which was mentioned in the issue), vfsgen has all the needed features.

In particular:

- Reproducible builds (no issue with timestamping).
- Well maintained and relatively popular.
- Integration with go generate.
- Self-contained (no external dependency).

* [WIP] Replace go-bindata by vfsgen

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Add license + remove doc.go

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Generate templates assets

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Use new templates assets

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* split static assets

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Idempotent make assets

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Update vendor/

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* vendor vfsgendev

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Update README.md

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Simplify assets generation

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix README.md

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Use generate helper program instead of vfsgen

This avoids installing vfsgendev in the target environment.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Remove unused vfsgen package

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix Makefile

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* vendoring shurcooL/vfsgen

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Fix go generate command

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Sync web/ui/assets_vfsdata.go

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-08-24 09:03:10 +02:00
Benji Visser 8bb6e0dd6e Show rule evaluation errors on rules page (#4457)
* adding information about the health and errors for Rules

adding Health() and LastError() to the Rule interface. This will allow
us to easily surface information about rules.

Signed-off-by: noqcks <benny@noqcks.io>

* updating rules.html with fields for Rule errors and health state

Signed-off-by: noqcks <benny@noqcks.io>

* fix code comment grammar & access Rule health/error info using a mutex

Signed-off-by: noqcks <benny@noqcks.io>

* s/Errors/Error/ in rules.html to remain consistent with targets.html

Signed-off-by: noqcks <benny@noqcks.io>

* adding periods to code comments in reporting/alerting

Signed-off-by: noqcks <benny@noqcks.io>

* putting health/error below mutex in struct field

Signed-off-by: noqcks <benny@noqcks.io>
2018-08-07 00:33:45 +02:00
Julius Volz 8763dedb9d
Update method name in rules template, fix rendering (#4416)
Fixes https://github.com/prometheus/prometheus/issues/4407

Signed-off-by: Julius Volz <julius.volz@gmail.com>
2018-07-25 18:25:43 +02:00
Stafford Williams 286a8e0554 go-bindata debug clarification (#4411)
Signed-off-by: Stafford Williams <stafford.williams@gmail.com>
2018-07-24 14:01:56 +01:00
Adam Shannon 566c80b47c web: add named anchors for each rule group (#4130)
* web: add named anchors for each rule group

Signed-off-by: Adam Shannon <adamkshannon@gmail.com>
2018-07-18 16:34:41 +01:00
Martin Lee d0f11a3cc6 Forbid rule-abiding robots from indexing. (#4266)
* Resolves github issue #4257

Signed-off-by: Martin Lee <martin@billforward.net>
2018-07-18 05:01:57 +01:00
Fabian Reinartz 9c83e815d1 Merge branch 'release-2.2' into update 2018-06-05 05:29:11 -04:00
Simon Pasquier 097439b0f9 web: limit the number of dropped targets (#4212)
Displaying all the dropped targets in the service-discovery page hurts
the Prometheus server as well as the browser when thousands of dropped
targets exist. This change limits this number to 1,000 and display the
number of active/total targets per scrape configuration.

Add warning when more than 100 targets are dropped

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-06-05 10:20:32 +01:00
Ivan Voronchihin b3441cb0e7 Fix graph page for IE11 (#4148)
Signed-off-by: bege13mot <bege13mot@gmail.com>
2018-05-07 13:26:38 +01:00
Marek Siarkowicz bb86c3f62b Report internal runtime information on status page (#3921)
Add information about tsdb, wal and config reload
2018-03-21 16:08:37 +00:00
James Turnbull 4486ef013b Make show annotations checkbox match query history checkbox (#3936)
After removing the checkbox in #3913 the only remaining element that
looked like it was the new Show Annotations checkbox on the Alerts page.
Which in turn didn't look like the Enable query history checkout on the
graph page. So:

1. This takes the Enable query history button as canonical.
2. Updates the show annotations button code to match it.
3. Simplifies the JS for the checkbox.
2018-03-09 14:39:28 +01:00
James Turnbull 50e6aff3fd Make job heading on service discovery consistent (#3937)
The new Service Discovery page uses the CSS/JS from the Targets page but
used slightly differently. This makes the job header match in the
Service Discovery page for a more consistent look-n-feel.
2018-03-09 14:33:53 +01:00
James Turnbull c3f4f2204f Refactor/redesign Unhealthy checkbox on Targets page (#3913)
* Added only healthy to Targets

This adds a "Only heathly" button to supplement the "Only unhealthy"
button. The two are mutually exclusive.

I've also added a red/green text color to the buttons.

Arguably this could be a toggle instead if folks think this is
worthwhile... Happy to modify it.

* Moved functions above init

* Simplifed code and made prettier

* Appeased codeacy

* Made buttons square
2018-03-09 11:19:09 +01:00
Marek Siarkowicz 1f71caf23f Add golang runtime information to status page. (#3914) 2018-03-07 15:14:46 +00:00
Julien Pivotto 155faab7a2 Display annotations on Alerts page (#3900)
Fixes #1219

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2018-03-01 15:26:36 +00:00
Callum Jones 090e7e0959 Place Service Discovery labels inline (#3872)
Fixes #3739
2018-02-24 19:44:37 +00:00
Lovisa Svallingson 04f723ca44 [Fix 3789]: storing/loading multiple graphs from URL (#3813)
* Fix JS error: cannot read source of undefined

When the page was refreshed with queries on the page,
the updateTypeaheadMetricsSet function was called before
the typeahead had been initialized.

* Fix: updates URL when query submits

When queries were submitted by pressing enter, the URL did not update
to reflect the change. Not sure why, but this was only the case when
the queries were non-simple, meaning when either labels werre specified
or other promql functions were used.

* Rebase master and make assets
2018-02-15 13:23:12 +07:00
James Turnbull d127a21071 Removed alert_header (#3836)
This is a very minor UX change. The current "No Alert rules" present
table row has the `alert_header` class attached. This changes the cursor
and some other stuff and makes sense with the populated table but less
sense with the unpopulated table. So removing it the latter case.
2018-02-14 13:15:39 +07:00
James Turnbull 816d755956 Added "No rules" to Web UI (#3834)
When you have no alerting rules defined you get a screen sharing this
information in the WebUI. If no rules are defined then you instead see
an empty white screen. This adds a "No rules" defined `else` clause and
a `Rules` header to the page.
2018-02-13 14:51:34 +07:00
Lovisa Svallingson 460fe4dd0c Fix: Improve typeahead on /graph page (#3742)
* Do not autoselect the first item in the dropdown

* Historical queries only show in dropdown when toggled on

* Move shared behavior to queryHistory.isEnabled function

* Do not auto submit selected history queries
2018-02-02 19:16:29 +01:00
Lovisa Svallingson a8ff643464 Implement browsing of previous query expressions (#3486) 2017-12-21 18:58:05 +01:00
conorbroderick 8b6f3a1bd3 Added service discovery view showing labels before and after relabelling 2017-12-13 15:46:11 +00:00
Julien Pivotto 52c0121890 Correctly handle empty data set in the console view (#3521)
When there is an empty result set, the Prometheus server replies with

{"status":"success","data":{"resultType":"vector","result":null}}

That "null" reply was not handled correctly by the graphing library.
This commit handles that case and shows "no data" in the UI console view
instead of throwing an error in the browser javascript console.

Fixes #3515

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2017-11-30 10:04:02 +00:00
Lovisa Svallingson 2c2702e22b Align columns in Targets view (#3445)
- rebase and resolve merge conflicts
2017-11-26 12:49:24 +08:00
Goutham Veeramachaneni a880c86375
Fix unexported method on exported interface.
Also move to model.Duration

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-11-23 19:13:57 +05:30
conorbroderick 55aaece116 Add rule evaluation time 2017-11-22 15:22:02 +00:00
Julius Volz 8022fc1aa3
Fix display of raw target labels (again) (#3437)
I already fixed this once in 7be94d6643,
but it seems it got broken again when merging other fixes from 1.x into
2.0.
2017-11-08 15:30:19 +01:00
Takashi Kokubun bd52950ce8 Fix invalid syntax in graph.css (#3309) 2017-10-24 10:48:58 +02:00
BasPH a91d3bcb83 Add UI warning for time drift >30 seconds (#3276)
* Add UI warning for time drift >30 seconds

* Yellow time drift warning & better warning message

* Set warning threshold to 30 sec

* Include changed assets
2017-10-11 15:11:04 +02:00
Fabian Reinartz 2d0b8e8b94 Merge branch 'master' into dev-2.0 2017-10-05 13:09:18 +02:00
beorn7 16c95ae8e7 Merge branch 'release-1.7' 2017-09-21 18:27:12 +02:00
beorn7 dd381356a5 Tweak floating point number rendering 2017-09-19 18:53:00 +02:00
beorn7 61b6311504 Merge branch 'fix_ui_graph_decimal_axis' of git://github.com/yamatoya/prometheus into yamatoya-fix_ui_graph_decimal_axis 2017-09-19 18:30:18 +02:00
Takahito Yamatoya b1151bdabc ui changed, limit the number of digits for the larger units is 5 2017-09-19 11:11:39 +09:00
Takahito Yamatoya 1eac566d09 add ; , and change from B to G, and change from K to k, and add all the prefixes 2017-09-18 22:55:22 +09:00
beorn7 e7aab2791a Forward-merge bug fixes frem branch 'release-1.7' 2017-09-18 12:14:37 +02:00
beorn7 7a8e340c1a Merge branch 'fix_web_ui_utc' of git://github.com/yamatoya/prometheus into yamatoya-fix_web_ui_utc 2017-09-18 12:07:52 +02:00
Takahito Yamatoya 5d707d3aa3 #2439 library version update JQuery / JQuery.Selection / JQuery.hotkey (#3183) 2017-09-18 11:45:57 +02:00
Takahito Yamatoya ff038a4a39 bug fix 2017-09-17 00:20:39 +09:00
Takahito Yamatoya 7a3c348f83 fix decimal y-axis 2017-09-17 00:16:40 +09:00
Takahito Yamatoya 738a51bea6 #2371 fix to display utc date at datetime picker 2017-09-16 11:38:29 +09:00
beorn7 84211bd2df Foward-merge bug fixes and cherry-picks from 'release-1.7' 2017-09-15 13:44:22 +02:00
beorn7 a3fd7dd335 Backport the templating fix from master
The original fix is in commit 5f5d77848e
2017-09-14 18:12:00 +02:00
Fabian Reinartz 87918f3097 Merge branch 'master' into dev-2.0 2017-09-04 14:09:21 +02:00
Richard Hartmann aa3fb1e7c4 Point help to docs, not main Prometheus website
No matter how we refactor docs, `/docs/` will stay the prefix, so there's not long-term risk in changing this.

One we version docs, we should probably try and keep link & version in sync.
2017-08-25 10:53:36 +02:00
Karsten Weiss 5f5d77848e Fix 'predefined escaper "html" disallowed in template' in /targets (#3046) (#3050)
Issue #3046 is triggered by html/template changes in go1.9.

See https://tip.golang.org/pkg/html/template. Quote:

//   To ease migration to Go 1.9 and beyond, "html" and "urlquery" will
//   continue to be allowed as the last command in a pipeline. However, if the
//   pipeline occurs in an unquoted attribute value context, "html" is
//   disallowed. Avoid using "html" and "urlquery" entirely in new templates.

The commit also includes a trivial whitespace fix.
2017-08-11 18:31:46 +01:00
Fabian Reinartz 25f3e1c424 Merge branch 'master' into mergemaster 2017-08-10 17:04:25 +02:00
beorn7 6cf62fe8ba Update web/ui/bindata.go 2017-08-10 14:40:19 +02:00
Roman Khavronenko 245b8a0b37 Allow to collapse jobs at /targets page (#2628) 2017-08-09 17:10:30 +02:00
beorn7 3bb0667607 Merge branch 'release-1.7' 2017-07-21 19:40:30 +02:00
Martín Ferrari 64cfe2e7f5 Add PATH_PREFIX to redirectToMigratedURL
Old grafana versions use this format, and it breaks with prometheus instances
not mounted in the root directory.
2017-07-11 17:36:17 +00:00
Fabian Reinartz dba7586671 Merge branch 'master' into dev-2.0 2017-07-11 17:22:14 +02:00
Alexey Palazhchenko b6f89a1982 Parse custom step parameter correctly. (#2928)
Backport of 6a767b736b.
Refs #2827, #2861.
2017-07-10 21:05:40 +02:00
Julius Volz 13006feb1e Fix alert label display in /alerts UI 2017-07-08 11:42:13 +02:00
Goutham Veeramachaneni e1fc9dc78d Move /rules to new format (#2901)
Fixes #2891

Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
2017-07-08 11:38:02 +02:00
Alin Sinpalean 38de290d5f Console graph color scheme support (#2900)
Add a colorScheme parameter to PromConsole.Graph, to allow using custom colors in console graphs.
2017-07-04 15:30:12 +01:00
Fabian Reinartz ca2b68889b Merge branch 'master' into dev-2.0 2017-06-23 13:15:44 +02:00
Julius Volz 7be94d6643 Fix display of before-relabeling labels 2017-06-22 15:36:17 -04:00
Alexey Palazhchenko 6a767b736b Parse custom step parameter correctly. (#2861)
Fixes #2827.
2017-06-19 17:22:59 +01:00
Goutham Veeramachaneni 5ff283a7b7
Reflect the grouping in the UI
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-06-14 16:09:14 +05:30
Fabian Reinartz 669075c6b9 Merge branch 'master' into dev-2.0 2017-06-06 09:36:51 +02:00
Brian Brazil d66799d7f3 Show gaps in graphs. (#2766)
Fixes #345
2017-05-26 16:17:48 +01:00
Fabian Reinartz 4c31061251 Merge branch 'master' into dev-2.0 2017-05-24 15:36:17 +02:00
conorbroderick 9c953064c3 check if result is a scalar in order to display correct number of returned time series 2017-05-24 14:07:24 +01:00
Frederic Branczyk 45df5c2daf
Merge branch 'release-1.6' 2017-05-22 13:44:44 +02:00
conorbroderick 9287a01bbf Fixed fixed yaxis of stacked graph being cut off 2017-05-18 15:18:29 +01:00
Fabian Reinartz 9a9211845e ui: fix alert template 2017-05-10 15:30:10 +02:00
Fabian Reinartz 73b8ff0ddc Merge branch 'master' into dev-2.0 2017-04-27 10:19:55 +02:00
David Symonds 04ad889751 Preserve Alertmanager URLs as *url.URL.
Render a nicer link in the web UI.
2017-04-25 16:17:46 +10:00
Conor Broderick 9eb1a5d6bf Handle invalid query in graph UI (#2652) 2017-04-24 10:50:57 +01:00
Conor Broderick ee62807b62 Added min/max to graph to accomodate for constant time series (#2612)
Added min/max to graph to accommodate constant time series
2017-04-12 14:25:25 +01:00
Conor Broderick c72692fd75 Fixed issue of partially hidden y-axis values on graph (#2589) 2017-04-06 16:04:44 +01:00
Brian Brazil 26bedc9e00 Revert use of buildVersion in console templates. (#2579)
This function isn't available in console templates,
so go back to pre-#2468 state to get things working again.
2017-04-05 15:19:17 +01:00
Fabian Reinartz 8ffc851147 Merge branch 'master' into dev-2.0 2017-04-04 15:17:56 +02:00
Conor Broderick dafae52efa Display total number of returned elements on console (#2532)
Display total number of returned elements on console
2017-04-03 11:52:25 +01:00
Fabian Reinartz 397f001ac5 Merge branch 'master' into dev-2.0 2017-03-20 14:12:11 +01:00
Fabian Reinartz c389193b37 Merge branch 'master' into dev-2.0 2017-03-17 16:27:07 +01:00
Erdem Agaoglu 241da87f7f Adding version to names of static files
to prevent browsers using old files in local caches after an upgrade.
2017-03-03 23:36:06 +03:00
Fabian Reinartz 9304179ef7 Merge branch 'master' into dev-2.0 2017-03-02 08:16:58 +01:00
Derek Marcotte 0a7fb56b16 Expose PromConsole.Graph.buildQueryUrl, refactor dispatch to use (#2461)
Expose buildQueryUrl, refactor dispatch to use

buildQueryUrl will allow users to execute queries over the range of an
existing graph.  This will be helpful to select data series they wish to
annotate the graph with, for example.
2017-03-01 22:37:50 +00:00
Julius Volz 7e14533b32 Merge pull request #2396 from lightpriest/fuzzy-fix-lookup
Fix fuzzy search lookup issues
2017-02-28 19:06:30 +01:00
Derek Marcotte 74a3b1051a Add rickshawGraph proerty to the Graph object. (#2438)
Add rickshawGraph property to the Graph object.

This allows further changes to be made to the graph, for example,
annotations.
2017-02-18 10:03:32 +00:00
Or Cohen 93d20d2d2b Improve fuzzy search
The fuzzy library didn't try to find a "best match", but settled on the
first fuzzy match that exists. This patch includes a modified version of
the fuzzy library, which recursivley tries on the rest of the search
string to find a better match. If found, returns that one.

Another small modification is that if a pattern fully matches, it
skips the lookup entirley and returns the highest score possible for
that match.
2017-02-05 17:38:05 +02:00
Or Cohen 81d37a04aa Fix autocomplete misses certain queries
For some of the queries, the fuzzy lookup was not filtering properly.
The problem is due to the "replace" beind made on the query itself. It
accidently removes only the first underscore. This patch changes it so
that it removes all of the whitespaces, letting the fuzzy algorithm do
its magic, also fixing this problem.

Originally, the underscore were replaced by a space for this specific
reason, to let the user type a space and have the lookup treat it as the
word break.

Fixes #2380
2017-02-05 16:20:52 +02:00
Fabian Reinartz 87bea50b85 web: fix /targets for new label types 2017-02-02 13:18:17 +01:00
Harmen 135d32ea22 make assets 2016-12-27 13:59:20 +01:00
Harmen dfa4f79bcd add favicon 2016-12-27 13:58:51 +01:00
Brian Brazil bed4635802 Use irate consistently in console template examples. (#2296)
I must have forgotten my 'g' when switching these.
2016-12-21 13:19:23 +00:00
Brian Brazil 2e3b42ad6c Correctly handle the end time being 0 in the URL. (#2290) 2016-12-18 19:30:52 +00:00
Morten Siebuhr c5b17263a6 web: Display current working directory on status-page 2016-12-05 19:46:41 +01:00
Frederic Branczyk 33b583d50e
web/api: add targets endpoint 2016-12-05 13:13:21 +01:00
Frederic Branczyk 8f8cea4fbd
retrieval: refactor TargetManager to return flat list of Targets 2016-12-02 13:28:58 +01:00
Fabian Reinartz d4deb8bbf2 web: show discovered Alertmanagers in UI 2016-11-24 15:06:50 +01:00
Martín Ferrari 4298d91a9c Update bindata.go 2016-11-17 02:33:31 +00:00
Martín Ferrari fe83ea511f Replace handlebars with the simpler and saner mustache library. 2016-11-17 02:33:12 +00:00
Martín Ferrari 0a6972b6a3 Replace datetimepicker library with a more maintained version.
Adds also the moment.js library, which is a dependency of it.

Following conventions in the web/ui directory, I am not including the original
sources or LICENSE files.
2016-11-17 02:29:08 +00:00
beorn7 5b16d6bd6e Merge branch 'release-1.2' 2016-10-31 00:06:23 +01:00
beorn7 f0acde7721 Regenerate assets after cherry-pick 2016-10-28 14:16:48 +02:00
Stuart Olivera 223a22457f ui: don’t consider aborted requests complete
If an existing request is aborted due to a new request, ignore the completion of the initial request.

Example:
1. Chrome dev tools: enable 5 second network latency
2. Execute query
3. A second later, execute the query again
4. Currently, the spinner will hide, and the stats will immediately display, as if the request had completed. Instead, the spinner and stats should wait until the 2nd execution finishes.
2016-10-28 14:15:11 +02:00
beorn7 569a1d78eb Regenerate bindata after merge 2016-10-25 12:15:55 +02:00
beorn7 7e4d005ee1 Merge branch 'release-1.2' 2016-10-25 12:15:41 +02:00
tattsun 68e20bd9ac ISSUE-2109 ui: fix decode query params bug 2016-10-25 07:41:24 +09:00
Or Cohen 50f8e35c54 Add fuzzy search to /graph textarea (#2081)
* Add fuzzy search to /graph textarea

We have a few thousands different metrics and looking up some of them
can be quite annoying with the simple string matching.

This patch adds a fuzzy search to the textarea lookup box on the /graph
page. It uses a small neat library from github.com/mattyork/fuzzy.

* Add fuzzy lib to NOTICE and re-build assets

Previously built assets changed the mode.
2016-10-17 09:37:11 +02:00
Stuart Olivera b76d59e68b ui: don’t consider aborted requests complete
If an existing request is aborted due to a new request, ignore the completion of the initial request.

Example:
1. Chrome dev tools: enable 5 second network latency
2. Execute query
3. A second later, execute the query again
4. Currently, the spinner will hide, and the stats will immediately display, as if the request had completed. Instead, the spinner and stats should wait until the 2nd execution finishes.
2016-10-12 17:20:44 -07:00
Matthias Rampke 4f96d28e60 Always show instance label on target page. (#2062) 2016-10-12 12:45:47 +02:00
Bora Tunca 2e9de70267 generate assets 2016-09-16 18:20:12 -04:00