Commit Graph

10272 Commits

Author SHA1 Message Date
Hugo Häggmark
458bb3b0e3 Fix: Changes WebSocket protocol to wss:// for https (#17173) 2019-05-20 15:24:48 +02:00
Hugo Häggmark
db48ec1f08
Explore: Adds Live option for supported datasources (#17062)
* Wip: Initial commit

* Refactor: Adds support in Loki datasource for streaming

* Refactor: Adds Live option to RefreshInterval

* Refactor: Adds styles to logrows

* Style: Reverses the order of Explore layout on Live

* Refactor: Adds LiveLogs component

* Tests: Adds tests for epics

* Style: Adds animation to Live in RefreshPicker

* Refactor: Adds ElapsedTime and progress line to LiveLogs

* Style: Adds specific colors to each theme

* Refactor: Adds support for Lokis new API

* Fix: Adds null to resulting empty array

* Refactor: Limits the rate of incoming messages from websockets

* Refactor: Throttles messages instead for simplicity

* Refactor: Optimizes row processing performance

* Refactor: Adds stop live button

* Fix: Fixes so that RefreshPicker shows the correct value when called programmatically

* Refactor: Merges with master and removes a console.log

* Refactor: Sorts rows in correct order and fixes minor UI issues

* Refactor: Adds minor improvments to sorting and container size
2019-05-20 13:28:23 +02:00
Marcus Efraimsson
a564a54b13
chore: mocks plugin loader for DataSourceSettingsPage tests (#17157)
Properly mocks the plugin loader in DataSourceSettingsPage tests 
and by that removes console logs.
2019-05-20 11:41:22 +02:00
Marcus Efraimsson
0e210dc271
Explore: Fix selection/copy of log lines (#17121)
This adds some logic to identify if the user is selecting 
text and if so disables parsing of log messages on hover. 
This should resolve the issue of selecting log lines to be 
copied and the selection is truncated.

Fixes #17072
2019-05-20 09:51:57 +02:00
Marcus Efraimsson
2b32e768bd
Explore: Fix empty space in toolbar on smaller devices (#17110)
Removes the empty space in Explore toolbar when on mobile/tablet.

Co-Authored-By: Hugo Häggmark <hugo.haggmark@gmail.com>
2019-05-20 09:38:41 +02:00
Dominik Prokop
12e0616413
Explore: display log line context (#17097)
* Extend DataSourceAPI to enable log row context retrieval

* Add react-use package

* Display log row context in UI

* Make Loki datasource return "after" log context in correct order

* Don't show Load more context links  when there are no more new results

* Update getLogRowContext to return DataQueryResponse

* Use DataQueryResponse in log row context provider, filter out original row  being duplicated in context
2019-05-20 08:44:37 +02:00
Ryan McKinley
ae1df1cf89
Plugins: expose rxjs matching 6.4.0 (#17148)
* expose rxjs

* remove super old observable export
2019-05-18 08:31:25 -07:00
Marcus Efraimsson
1a80885180
explore: fix issues when loading and both graph/table are collapsed (#17113)
Removes the functionality of being able to collapse/expand the logs 
container.
When both graph and table are collapsed and you reload the page 
then the start page should not be displayed.
When both graph and table are collapsed and you reload the page 
then the graph and table panels should be displayed.
Fix so that reducer tests are run. On of the test used fit() instead of 
it() which had the consequence of only 1 reducer test was executed 
and the rest skipped. There was some failing tests that now is 
updated and now passes.

Fixes #17098
2019-05-17 12:45:11 +02:00
Marcus Efraimsson
32cdab4cbf
explore: make sure datasource is added to target (#17116)
Fixes a regression introduced in #16959 which removed datasource 
property from changed query for angular query editors having the 
result of loading explore URL's without datasource loaded the 
default query in query editor and Explore.

Ref #16808
2019-05-17 10:11:55 +02:00
Shavonn Brown
0a9863a8b4 GraphPanel: Don't sort series when legend table & sort column is not visible (#17095)
* Fix: if current sort key is not active column, do not use for sort and select next available active (#16980)

* Fix: only sort if sortkey is active column and table is active (#16980)

* Fix: sorting stacked series as legend. current descending order test (#16980)

* Fix: existing sort tests and added additional to prevent bug from resurfacing (#16980)
2019-05-16 21:16:05 +02:00
Johannes Schill
b11eeadbd9 fix: Initial url update in Explore should replace existing url history #17030 (#17061) 2019-05-16 11:02:21 +02:00
Marcus Efraimsson
e6001f57a2
Explore: Allow switching between metrics and logs (#16959)
Adds basic support for switching between Metrics and Logs in Explore. 
Currently only test datasource that supports both Metrics and Logs.
Summary of changes:
* Moves mode (Metric, Logs) selection to the left of datasource 
picker and add some quick styling.
* Only trigger change in ToggleButton if not selected
* Set correct mode if datasource only supports logs

Closes #16808
2019-05-16 09:52:22 +02:00
Hugo Häggmark
fdd421e24c Explore: Fixes filtering in Prometheus queries when clicking in Table (#17083)
Fixes: #17071
2019-05-15 11:43:27 +02:00
Ryan McKinley
d8280b895d InputDataSource: better empty value support (#17075) 2019-05-15 07:20:27 +02:00
Torkel Ödegaard
238a929262
Panels: Fixed alert icon position in panel header (#17070) 2019-05-14 18:47:35 +02:00
Ryan McKinley
a0b6ef4d01 GraphPanel: use SeriesData directly (skip legacy transformation) (#17037)
* support streaming in angular panels

* keep the same dashboard number

* skip the legacy data conversion

* fix tests
2019-05-14 18:43:26 +02:00
Ryan McKinley
7333f7ca17 Streaming: support streaming in MetricsPanelCtrl (#17034)
* support streaming in angular panels

* keep the same dashboard number
2019-05-14 17:47:41 +02:00
Torkel Ödegaard
68ad93f410
Gauge: Fix switching orientation issue when switching from BarGauge to Gauge (#17064) 2019-05-14 16:33:47 +02:00
Torkel Ödegaard
6c7224c74d
InfoPopover: Fixes transclude undefined error (#17063) 2019-05-14 15:28:09 +02:00
Torkel Ödegaard
74a31bd9b4
Dashboard: Fixes lazy loading & expanding collapsed rows on mobile (#17055)
* Dashboard: Fixes lazy loading & expanding collapsing rows on mobile

Fixes #16978

* Updated dashboard tags
2019-05-14 14:41:24 +02:00
Daniel Lee
4bc1a66fe4
fix: Azure Monitor adds missing closing div tag to query editor (#17057) 2019-05-14 14:27:47 +02:00
Johannes Schill
ceb21bd653 Search: Set element height to 100% to avoid Chrome 74's overflow (#17054)
Fixes #16981
2019-05-14 11:08:36 +02:00
Dominik Prokop
34f9b3ff2b
Explore: use @grafana/ui legend (#17027) 2019-05-14 08:46:35 +02:00
Ryan McKinley
a87a763d83 DataSourcePlugin: support custom tabs (#16859)
* use ConfigEditor

* add tabs

* add tabs

* set the nav in state

* remove actions

* reorder imports

* catch plugin loading errors

* better text

* keep props

* fix typo

* update snapshot

* rename tab to page

* add missing pages
2019-05-14 07:55:49 +02:00
Johannes Schill
1001cd7ac3 Dashboard: Fixes scrolling issues for Edge browser (#17033)
* Fix: Only set scrollTop on CustomScroll element when it's needed and move arrow functions out of the props

* Fix: Update snapshots

* Minor refactoring to reuse same functions when rendering custom scrollbar

Fixes #16796
2019-05-14 07:36:19 +02:00
Marcus Efraimsson
01a7c1f098
chore: remove x character in explore 2019-05-13 16:33:27 +02:00
Torkel Ödegaard
3ce2f3b58d
Dashboard: show refresh button in kiosk mode (#17032)
Fixes #16945
2019-05-13 15:49:54 +02:00
David
927e1cbd27
(feat/explore): Support for new LogQL filtering syntax (#16674)
* (feat/explore): Support for new LogQL filtering syntax

Loki is adding syntax to support chained filtering.
This PR adapts Grafana to support this.

- Send only `query` parameter in loki request
- Automatically wrap search text in simple syntax, e.g., `{} foo` is
sent as `{} |~ "foo"`.


* Adapted to regexp parameter staying on in Loki

* Dont wrap single regexp in new filter syntax

* Fix datasource test

* Fallback regexp parameter for legacy queries

* Fix search highlighting

* Make highlighting work for filter chains

* Fix datasource test
2019-05-13 09:58:26 +02:00
David
bf5b60f74a
fix(explore): Prevent double querying for Prometheus and Loki (#17004)
* fix(explore): Prevent double querying for Prometheus and Loki

- queries were triggered twice because two Enter handlers existed
- removed runner plugin from Loki and Prom query fields (runner plugin
is still being used in azure)

Part of #16995

* Set loki's mtrics capability to false

Loki is not a metrics store. Explore was using the `metrics` field in
the plugin definition to issue a second query run. But Loki shows only
one result viewer.

Fixes #16995
2019-05-13 09:55:20 +02:00
Torkel Ödegaard
e0b760e08e
Chore: No implict any fixes (#17020) 2019-05-13 09:38:19 +02:00
Torkel Ödegaard
ce38de4ad7 Chore: Updated snapshot 2019-05-12 20:18:58 +02:00
Torkel Ödegaard
f12d47ef52
Chore: Typescript no-implicit any fixes progress (#17018)
* Chore: Typescript no-implicit any fixes progress

* Fixed tests

* Updated snapshot
2019-05-12 14:15:23 +02:00
Ryan McKinley
813e3ffc15 GraphPanel: show results for all SeriesData (#16966)
* Graph panel should support SeriesData

* Graph panel should support SeriesData

* same path for all series

* merge master

* support docs

* add test for processor

* Graph: removed old unused data processing logic

* Graph: minor refactoring data processing

* fix histogram

* set Count as title
2019-05-11 07:41:32 +02:00
Andrej Ocenas
cf39a264ca
Fix: Wrap value of multi variable in array when coming from URL (#16992)
*  Wrap variable value in array if multi

* Fix typo

* Fix case with multiple custom values
2019-05-10 22:19:46 +02:00
Ryan McKinley
37011dd8f3
GettingStarted: add key and remove ng-class (#17007) 2019-05-10 11:48:27 -07:00
Marcus Efraimsson
e7930a27b5
explore: add some extra time for angular query editors to update query (#16955)
Now when loading a query editor which changes the default query in the
constructor this will result in the actual updated query is used in
explore when running the query. Without this, the query used is sort
of out of sync between query editor and executed query.
2019-05-10 14:09:07 +02:00
Hugo Häggmark
6dbaa704bc
Explore: Align Explore with Dashboards and Panels (#16823)
* Wip: Removes queryTransactions from state

* Refactor: Adds back query failures

* Refactor: Moves error parsing to datasources

* Refactor: Adds back hinting for Prometheus

* Refactor: removed commented out code

* Refactor: Adds back QueryStatus

* Refactor: Adds scanning back to Explore

* Fix: Fixes prettier error

* Fix: Makes sure there is an error

* Merge: Merges with master

* Fix: Adds safeStringifyValue to error parsing

* Fix: Fixes table result calculations

* Refactor: Adds ErrorContainer and generic error handling in Explore

* Fix: Fixes so refIds remain consistent

* Refactor: Makes it possible to return result even when there are errors

* Fix: Fixes digest issue with Angular editors

* Refactor: Adds tests for explore utils

* Refactor: Breakes current behaviour of always returning a result even if Query fails

* Fix: Fixes Prettier error

* Fix: Adds back console.log for erroneous querys

* Refactor: Changes console.log to console.error
2019-05-10 14:00:39 +02:00
Marcus Efraimsson
8eb78ea931
Explore: Fix empty result from datasource should render logs container (#16999)
Make sure to return an empty logs model instead of undefined so that 
the logs container renders an empty graph and log result in Explore.

Fixes #16997
2019-05-10 12:45:26 +02:00
Hugo Häggmark
d5a35f3631
Explore: Fixes zoom exception in Loki/Graph (#16991)
Fixes: #16986
2019-05-10 12:10:32 +02:00
Torkel Ödegaard
675d43c753
PanelEditor: Fix queries tab now showing, wrong skipDataQuery logic (#16994) 2019-05-10 11:38:18 +02:00
Ryan McKinley
1d7bb2a763 DataSourceApi: convert interface to abstract class (#16979)
* DataSourceApi as class

* add diff signature

* Prometheus: moved directUrl to jsonData
2019-05-10 11:37:43 +02:00
Torkel Ödegaard
5573d28582
Panels: Fixed error panel tooltip (#16993)
Fixes #16989
2019-05-10 11:35:55 +02:00
Ryan McKinley
f617cd8975 GettingStarted: convert to react panel plugin (#16985)
* getting started

* getting started
2019-05-10 07:48:31 +02:00
Ryan McKinley
56702902a1 Plugins: Remove dataFormats key and add skipDataQuery (#16984) 2019-05-10 07:46:14 +02:00
Torkel Ödegaard
4a9aff0b00 AlertList: removed icon 2019-05-10 07:33:33 +02:00
Ryan McKinley
3c733638ee MetricsPanelCtrl: use shared queryRunner to support query execution (#16659)
* move queryRunner to panelModel

* remove isEditing from PanelChrome

* move listener to QueriesTab

* use queryRunner on MetricsPanelCtrl

* Added interval back as prop, not used yet

* QueryRunner: worked on tests

* PanelQueryRunner: Refactoring, added getQueryRunner to PanelModel

* PanelQueryRunner: interpolatel min interval

* merge master and remove grafana-live
2019-05-10 07:09:48 +02:00
Ryan McKinley
30bf9bf00f
TableData: support name (#16983) 2019-05-09 10:29:24 -07:00
Ryan McKinley
edcbc11774
TestData: stream via fetch (#16963)
Stream from fetch CSV
2019-05-09 09:42:35 -07:00
Marcus Efraimsson
0c1530c7a8
plugins: fix how datemath utils are exposed to plugins (#16976)
Fixes a regression accidentally introduced by #16890 so that datemath 
utils are exposed to plugins in a backward-compatible way.

Fixes #16962
2019-05-09 15:27:52 +02:00
Torkel Ödegaard
10098082b5 NewDataSource: Updated page header title 2019-05-09 14:21:02 +02:00