Commit Graph

10974 Commits

Author SHA1 Message Date
Lukas Siatka
34d9274c4c Datasource: fixes prometheus datasource tests - adds align range 2020-01-07 15:41:01 +01:00
Torkel Ödegaard
f774c4a076
Cloudwatch: Fixed crash when switching from cloudwatch data source (#21376) 2020-01-07 13:05:14 +01:00
lzd
ee77e1a791 Datasource: fix a bug where deleting data source will trigger save and test events (#21300) 2020-01-07 09:48:46 +01:00
Dominik Prokop
630f75d3ef
Forms: revamped select (#21092) 2020-01-07 09:20:06 +01:00
Torkel Ödegaard
e78074992b
AddDatasourcePage: Refactoring & more Phantom plugins (#21261)
* WIP: New types and state refactoring

* Added buildCategories & tests

* Added phantom plugins

* fixed tests

* Minor changes, force enterprise plugins to enterprise category

* Fixed tests
2020-01-06 16:56:34 +01:00
Torkel Ödegaard
f93f1c4b51
Chore: Remove empty flot.pie file (#21356) 2020-01-06 16:53:38 +01:00
Ryan McKinley
1ba072cd58
NewsPanel: update default feed url (#21342) 2020-01-04 13:41:43 -08:00
Ryan McKinley
e550572033
DataFrame: round trip metadata to arrow Table (#21277) 2020-01-03 08:12:19 -08:00
David
cb3d91b53c
Prometheus: user metrics metadata to inform query hints (#21304)
* Prometheus: user metrics metadata to inform query hints

- no longer analyse datapoints
- either use metrics metadata to determine metrics type or use metric
name suffix
- removed testcases based on datapoints

* Added hint certainty and tests
2020-01-03 12:55:50 +01:00
okhowang
512a42d2c6 Panel: disable edit/duplicate/delete entry for repeat panel (#21257) 2020-01-03 12:18:39 +01:00
David
d63ad9ac93
Prometheus: Disable suggestions at beginning of value (#21302)
* Prometheus: Disable suggestions at beginning of value

- fixed comparison operator regex
- no longer suggest anything at beginning of label value

* Detect cursor in front of label values
2020-01-03 12:16:27 +01:00
Ryan McKinley
e1acc77297
@grafana/data: use timeZone parameter rather than isUtc (#21276) 2020-01-02 08:11:28 -08:00
David
3667781e6f
Loki: fix filter expression suggestions (#21290)
* Loki: fix filter expression suggestions

- dont suggest term completion items in filter expression
- allow at least one character before suggesting term items
- keep logql expression when switching between Metrics/Logs mode
- show only history by default in completion items

* Clear results when changing mode
2019-12-31 09:53:30 +01:00
David
334b89f3ee
Prometheus: Fix label value suggestion (#21294)
* Prometheus: Fix label value suggestion

- remove quotes from typeahead input to suggest correct label values
- fix acceptance of partial label values

* Disable mid-word suggestions

* Fix test
2019-12-31 08:56:57 +01:00
David
649fa6789e
Prometheus: Fix term completion that contain keywords (#21295)
- `unless`, `or` and `and` are binary operators
- if they appear in a query the query was broken up so the suggestor
only works on the current term
- this change fixes the splitter logic to make sure those keywords are
not inside a word
2019-12-30 18:03:35 +01:00
Ryan McKinley
d9e9843a10
FieldConfig: add thresholds and color modes (#21273) 2019-12-28 17:32:58 -08:00
Björn Rabenstein
36aad1c101 Prometheus: improve tooltips (#21247)
* Prometheus data source: Update tooltip for _Scrape interval_

The old tool tip was plainly wrong. The globally configured scrape
interval is not necessarily the most used scrape interval, so the new
wording is describing what actually matters. The evaluation interval
wasn't even mentioned before. And finally, the configured value is
not strictly a lower limit for the step query parameter as it can be
overridden by the panel option _Min time interval_.

I plan to explain the overriding intricacies in the tool tip for _Min
time interval_.

Signed-off-by: beorn7 <beorn@grafana.com>

* Improve tooltip for _Min step_

The previous tool tip was mostly addressing aspects that are not
specific to _Min step_ (and might be more appropriate to be added to
the _Min time interval_ tool tip as that setting has a wider
scope). The new version emphasizes the important gotchas: that this is
an _additional_ lower limit, and that it is _not_ multiplied by the
resolution factor.

Signed-off-by: beorn7 <beorn@grafana.com>

* Fixed snapshot

Co-authored-by: David <david.kaltschmidt@gmail.com>
2019-12-27 09:49:42 +01:00
Torkel Ödegaard
45b7de1910
Explore: Moves PromContext from query level to DataQueryRequest level (#21260)
Closes #19598

Fixes bug introduced recently where the new PromQueryEditor did not preserve
the PromContext.Explore set on the query model by PromQueryField which caused
the table to be empty for Prometheus in explore.
2019-12-27 09:11:16 +01:00
Łukasz Szczęsny
545b72da33 BridgeSrv: do not strip base from state.location.url (#20161) 2019-12-26 16:08:04 +01:00
Torkel Ödegaard
8477104925
Graph: another tooltip fix (#21251) 2019-12-25 08:15:31 +01:00
Zach Bagnall
d0360de8f1 Alerting: Add configurable severity support for PagerDuty notifier (#19425)
* Pagerduty notifier: configurable severity

Instead of hardcoding `critical` make it configurable per notification channel instance.

* fix html

* Add a test to ensure default severity is correct

* Notifications doc

* Add a non-default test

* Add err check on NewJson (all tests)

* Add default severity (critical) to AlertNotificationEditCtrl class
2019-12-24 09:32:05 +02:00
Torkel Ödegaard
8740c66218
Graph: Fixed no value in graph tooltip (#21246) 2019-12-24 08:25:17 +01:00
David
d0ba644355
Promtheus: Fix hint and error display for query rows (#21242)
- prometheus explore editor introduced new styles for the hint display
- when multiple rows are rendered the hints are covered because they are
forced to have 0 height
- this change removes the 0-height
2019-12-23 19:53:42 +01:00
vikkyomkar
bc10a69626 Docs: fixed broken doc link for graph and table panels (#21238)
* fixed  broken doc link

* fixed broken doc link
2019-12-23 17:41:27 +01:00
vikkyomkar
68f73b18fb Docs: fix of broken doc link in the dashlist panel's help section (#21230)
* fixed the broker link of dashlist panel docs

* fixed broken document link
2019-12-23 17:40:43 +01:00
mpursley
bf79b97b6e Docs: Update the link to docs for singlestat (#21225) 2019-12-23 17:39:38 +01:00
Lukas Siatka
74924c8284 Explore: moves add query row button below query rows (#20522)
* Explore: updates Query Row component, moves latency to query row actions

* Explore: updates query row actions - adds latency and removes add row button

* Explore: updates explore toolbar props, adds index of the last query row

* Explore: updates toolbar, adds add new row button

* Explore: updates add new query row toolbar button title to add query

* Explore: updates query row actions - adds disabled property on latency button

* Explore: updates query row actions snapshot

* Explore: updates styles

* Explore: updates query row, removes latency

* Explore: updates query row actions, removed latency

* Explore: updates query row actions test and snapshot

* Explore: updates toolbar, moves add new query row button below query rows

* Explore: updates add query row button color and adds transparent background to latency div

* Explore: updates styles for add query row button responsiveness

* Explore: updates query row with latency button, fixes alignment of overall latency

* Explore: updates query row actions snapshot

* Explore: removes overall latency

* Explore: updates query row latency - removes mouseover-triggered style changes

* Explore: updates query row actions snapshot

* Explore: moves styles from scss to emotion

* Add row button: Removed responsiveness, reused query row styles

Co-authored-by: David <david.kaltschmidt@gmail.com>
2019-12-23 12:29:00 +01:00
Lukas Siatka
1de24cc929 Explore: adds PrometheusExploreQueryEditor (#20195)
* Explore: updates prom query field styles with flex-grow

* Explore: adds prometheus explore query editor

* Explore: updates step input width in prom explore query editor

* Explore: updates prom explore query editor step field input placeholder to auto

* Explore: updates prom explore query editor to include history

* Explore: updates prom explore query editor, removes unused lodash import

* Explore: updates step spacing in prom explore query editor

* Explore: updates prom explore query editor - moves logic to query field

* Explore: updates prom query field - adds step field with conditional rendering

* Explore: updates promql cheat sheet with step description

* Explore: updates prom cheat sheet  step description

* Explore: updates styles - adds query row break class

* Explore: moves back step markup to PromExploreQueryEditor
2019-12-23 11:42:31 +01:00
Björn Rabenstein
7e8f4d0b0e Simplify adjustInterval (#21226)
Much easier to wrap one's head around it if it is expressed more
directly.

This is not mathematically the same as the previous version involved
more rounding than necessary because of the way the intervalFactor was
handled. I'd argue the new version is better because it gets closer to
the 11,000 points limit and thus approaches better what the user
wanted within the limits of Prometheus.

Note that in practice, the 11,000 points limit should never be of
relevance. (Even a 4k screen doesn't have 11k points on the x axis.)

Signed-off-by: beorn7 <beorn@grafana.com>
2019-12-23 08:28:08 +01:00
Torkel Ödegaard
31c59f3de9 Sass: Checked in tmpl files 2019-12-23 07:22:44 +01:00
Torkel Ödegaard
3347b45a95
Table: Component progress & custom FieldConfig options (#21231)
* Table: Set & use field display processor

* Use applyFieldOverrides outside in story instead

* Change types a bit

* Table: Move to flexible layout

* Simplest possible custom field option

* Skip default column

* Added textAlign

* Explore: Set display processor for table data frame

* Fixed storybook

* Refactoring

* Progress on cell display mode

* Major progress

* Progress & refactoring

* Fixes

* Updated tests

* Added more tests

* Table: Progress on cell style customization

* Restored testdata random walk table scenario

* put back unrelated change

* remove unused things

* Updated table story

* Renamed property

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2019-12-23 06:22:54 +01:00
Ryan McKinley
8d537b7afb Chore: remove StreamHandler and DataStreamState (#21234)
* remove StreamHandler

* remove DataStreamState
2019-12-23 06:16:04 +01:00
Torkel Ödegaard
6c2375e495
DashboardGrid: Fixed flickering while resizing (#21221) 2019-12-21 08:01:26 +01:00
Ryan McKinley
b8c0924ab1
NewsPanel: add news as a builtin panel (#21128) 2019-12-20 10:47:45 -08:00
Torkel Ödegaard
392819c5d0
New bar gauge style: Unfilled (#21201)
* BarGauge: Added unfilled option

* Fixed white theme and added 2 unit tests

* Added another demo dashboard

* Fixed dev env dashboards
2019-12-20 16:05:37 +01:00
Marcus Andersson
587e4009f3
Dashboard: new updated time picker (#20931)
* Dashboard: started to implement new time picker.

* TimePicker: working in full screen (except calendar).

* TimePicker: first draft on narrow screen variant.

* TimePicker: small adjustments to the narrow design.

* TimePicker: enabled range selection and started to style calendar.

* TimePicker: applied some more styling.

* Calendar: added so the calendar range selection is styled properly.

* Calendar: added styling for timepicker calendar in narrow screen.

* TimePicker: made it possible to select range from calendar.

* TimePicker: made the calendar have previous selected value.

* TimePicker: moved calendar to be able to update form state.

* TimePicker: calendar is now displayed onFocus or onClick.

* TimePicker: calendar will be closed if click outside input.

* Calendar: fixed the styling of the calendar in narrow screen.

* Calendar: made it work properly with narrow screen.

* TimePicker: connected recent to absolute time range.

* TimePicker: changed the label on recent ranges.

* TimePicker: cleaned up the range list and options.

* TimePicker: some more cleaning up.

* TimePicker: cleaned up the calendar a bit.

* TimePicker: some more refactorings.

* TimePicker: refactorings.

* TimePicker: styled modal properly.

* TimePicker: empty recent list.

* TimePicker: width when calendar in full screen.

* TimePicker: will validate input value.

* TimePicker: removed unused code.

* TimePicker: positioning with emotion instead of sass.

* Calendar: Made sure we send the dates in the correct order to the calendar.

* TimePicker: fixed theme.

* TimePicker: fixed positioning of the content.

* TimePicker: positioning of narrow.

* TimePicker: added some simple tets.

* TimePicker: fixed issue with invalid and added error message.

* TimePicker: added history.

* TimePicker: cleaned up snapshot data.

* TimePicker: fixed so we keep the quick values in the input.

* TimePicker: fixed the missing styling on UTC.

* TimePicker: added missing caret icon.

* TimePicker: fixed formatting on recent time ranges.

* TimePicker: added missing -.

* TimePicker: refactorings after feedback.

* TimePicker: renamed reserved prop name.

* TimePicker: added missing onChange call.

* TimePicker: removed alternative return type.

* TimePicker: fixed the sorting order on the recent list.

* TimePicker: added useCallback for the onEvent functions.

* TimePicker: moving away from default export.

* TimePicker: used the isMathString instead of private function.

* TimePicker: minor refactoring simplify the code.

* TimePicker: Added empty container that will expand when less then 4 recent searches.

* TimePicker: changed the top to be absolute relative to the container.

* TimePicker: updated snapshots for failing tests.

* Fixed shadow

* Move it down a bit

* added some more tests.

* Fixed so we change the anchor point of the time picker in really small screens.

* removed memo.

* fixed snapshot.

* Make sure that we always use the correct timeZone when formatting output.

* Fixed form background.

* Some minor fixes after demo.

* Making sure that empty info box is centered.

* updated snapshots for timepicker after css changes.

* fixed so we don't overflow when input validation error.

* adjusted final things on the time picker.

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2019-12-20 15:31:58 +01:00
Ryan McKinley
104c2e3636 Metrictank: fix bundled dashboard (#21209)
* update metrictank dashboard

* Restored dashboard datasource variable, and improved error handling in the import api handler

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2019-12-20 11:42:47 +01:00
Marcus Andersson
05d831df29
Tooltip: preventing xss injections via the colors variable. (#21203)
* Tooltip: preventing xss injections via the colors variable.

* added xss check for single series tooltop color.

* added sanitize to the hoverInfo.value.
2019-12-20 11:28:10 +01:00
Ivana Huckova
14b2dad9da
Livetailing: set table withd to 100% (#21213) 2019-12-20 11:21:04 +01:00
Hugo Häggmark
f1b675b12e
e2e: Waits for login before moving forward (#21185) 2019-12-19 07:51:32 +01:00
Torkel Ödegaard
0676189291
PanelChrome: Mini refactor (#21171) 2019-12-19 07:01:35 +01:00
Torkel Ödegaard
10413c4aa5
DashboardGrid: Change grid margin to 8, to align to 8px grid (#21167) 2019-12-18 14:30:17 +01:00
Peter Holmberg
2e60752258
Panel: Show inspect panel in Drawer instead of Modal (#21148) 2019-12-18 13:57:07 +01:00
David
34c1433ba4
Prometheus: Fix typehead after binary operators (#21152)
- no longer do right-trim to prevent suggestions after space
- rely on splitting on syntax elements to identify relevant prefix
- added tests
2019-12-18 13:35:31 +01:00
Hugo Häggmark
05cb85feba
Table: Matches column names with unescaped regex characters (#21164)
* Table: Matches column names with unescaped regex characters
Fixes #21106

* Chore: Cleans up unused code
2019-12-18 12:38:39 +01:00
Dominik Prokop
26aa1f0cca
DataLinks: Sanitize data/panel link URLs (#21140)
* Sanitize html in panel links

* Add sanitize-url package

* Enable config mocking

* Sanitize datalinks urls

* Update public/app/core/config.ts

* Minor test update

* Remove sanitize-url dependency

* Remove typings

* Review update

* Revert "Remove sanitize-url dependency"

This reverts commit c4f38e6de6.

* Revert "Remove typings"

This reverts commit 676d47e8c2.

* Sanitaze, don't escape html when sanitizing URL
2019-12-18 11:31:11 +01:00
Torkel Ödegaard
475bd7ad09
Dashboard: Only show resize-handle on hover (#21160) 2019-12-18 11:15:59 +01:00
Peter Holmberg
e9079c3faa
grafana/ui: New table component (#20991)
* first working example

* Support sorting, adding types while waiting for official ones

* using react-window for windowing

* styles via emotion

* sizing

* set an offset for the table

* change table export

* fixing table cell widths

* Explore: Use new table component in explore (#21031)

* Explore: Use new table component in explore

* enable oncellclick

* only let filterable columns be clickable, refactor renderrow

* remove explore table

* Keep using old merge tables logic

* prettier

* remove unused typings file

* fixing tests

* Fixed explore table issue

* NewTable: Updated styles

* Fixed unit test

* Updated TableModel

* Minor update to explore table height

* typing
2019-12-18 08:38:50 +01:00
Hugo Häggmark
841cffbe9a
e2e: Migrates query variable CRUD tests to new framework (#21146)
* Refactor: Adds params to visit

* Refactor: Restructures exported Pages somewhat

* Refactor: Moves more into new framework but holdup because of bugs in digest

* Refactor: Finish migrating templating e2e tests to new framework

* Refactor: Changes after merge with master

* Refactor: Removes weird change

* Refactor: Adds duplication test

* Refactor: Adds move down and move up variable asserts

* Refactor: Adds some test to value select dropdown
2019-12-18 06:13:58 +01:00
Boyko
331bc173cc Chore: Upgrade react, react-dom, react-test-renderer versions (#21130)
* Chore: Upgrade react, react-dom, react-test-renderer versions

* Chore: Normalize windows path for webpack plugin test

* Chore: Replace deprecated react-testing-hooks-library
2019-12-17 13:42:30 +01:00