Commit Graph

10290 Commits

Author SHA1 Message Date
Torkel Ödegaard
6acc7d37da Singlestat: fixes issue with value placement and line wraps (#17249)
Fixes #17237
2019-05-24 08:52:47 +02:00
Utkarsh Bhatnagar
8e434ad163 CloudWatch: Made region visible for AWS Cloudwatch Expressions (#17243)
Fixes #14933
2019-05-23 12:02:19 +02:00
Filip Barl
a04bf0cded Panel: Pass transparency prop down to React panels. (#17235) 2019-05-23 11:58:50 +02:00
Ryan McKinley
9e7fa74682 DataSourcePlugin: Avoid anuglar injector if only one parameter (#17239) 2019-05-23 11:56:00 +02:00
Dominik Prokop
a9c94ec93b
Explore: Update the way Loki retrieve log context (#17204)
* Move log's typings into grafana/ui
* Update the way context is retrieved for Loki

Major changes:

1. getLogRowContext expects row to be of LogRowModel type
2. getLogRowContext accepts generic options object, specific to a datasource of interest. limit option has been removed, and now it's a part of Loki's context query options (see below)
3. LogRowContextProvider performs two queries now. Before, it was Loki ds that performed queries in both directions when getLogRowContext.
4. Loki's getLogRowContext accepts options object of a type:

interface LokiContextQueryOptions {
    direction?: 'BACKWARD' | 'FORWARD';
    limit?: number;
}

This will enable querying in either direction independently and also slightly simplifies the way query errors are handled.

LogRowContextProvider maps the results to a Loki specific context types, basically string[][], as raw log lines are displayed in first version.
2019-05-22 23:10:05 +02:00
Filip Barl
87688930a2 Panels: Show Drilldown links in top-left corner of custom React panels (#17142) 2019-05-22 14:21:43 +02:00
Torkel Ödegaard
e421723992
Search: removed old not working search shortcuts (#17226) 2019-05-22 12:23:30 +02:00
Daniel Lee
577beebcca
azuremonitor: revert to clearing chained dropdowns (#17212)
* azuremonitor: revert to clearing chained dropdowns

After feedback from users, changing back to clearing
dropdowns to the right in the chain. E.g. if the user
changes the subscription dropdown which is first in
the chain then all the dependent dropdowns to the right
should be cleared (reset to default values).

Also, now triggers getting subscriptions every time the
dropdown menu is shown rather than just the first time.
It is apparently common to add subscriptions while
building queries.
2019-05-22 11:34:54 +02:00
Torkel Ödegaard
a96b522a42
Search: changed how search filter on current folder works (#17219) 2019-05-22 11:28:11 +02:00
Ryan McKinley
1033f0f905 DataSourceMeta: add an option to get hidden queries (#17124)
* add an option to get hidden queries

* make sure you have meta

* supportsHiddenQueries

* remove spaces

* DataSources: hidden queries flag
2019-05-21 13:46:19 +02:00
Dominik Prokop
73e4178aef Panel: Apply option defaults on panel init and on save model retrieval (#17174)
* Apply panel options defaults on panel init and on save model retrieval

* Remove unnecessary argument, added tests

* Make FieldPropertiesEditor statefull to enable onBlur changes

* Remove unnecessary import

* Post-review updates

Fixes #17154
2019-05-21 13:19:19 +02:00
Daniel Lee
fa9ffe38d2
Azuremonitor: multiple subscription support for alerting (#17195)
* fix: azuremonitor adds multi-sub support to alerting

* fix: AzureMonitor missing parameter in metadata func

getMetricMetadata function when called in the query ctrl
was missing a parameter for Subscription Id.

Also, made some tweaks to what happens when a chained
dropdown is changed to not reset all the fields that
are dependent on it.
2019-05-21 12:28:30 +02:00
Ryan McKinley
744682e648 AppPlugin: add types for jsonData (#17177)
* add types for App jsonData

* add types for App jsonData

* add value as possible type

* make it extend {}
2019-05-21 10:39:29 +02:00
Marcus Efraimsson
5414a31101 explore: fix null checks (#17191) 2019-05-21 09:37:31 +02:00
Hugo Häggmark
3b35e9d5e8 Fix: Fixes so new data is pushed during live tailing (#17189)
Fixes: #17188
2019-05-21 09:34:41 +02:00
Marcus Efraimsson
3b008d06b4
testdata: logs scenario (#17182)
Adds logs scenario which is quite basic and not that smart 
to begin with. This will hopefully ease development of 
Explore and support for logs in Grafana.
2019-05-21 09:21:59 +02:00
Shavonn Brown
b695dcd0eb TablePanel: Check for table using keys (#17185)
* Fix: the type is not set so can check for columns and rows to validate is table (#16996)

* Fix: the type is not set so can check for columns and rows to validate is table (#16996)

* Fix: fix no table check and tests (#16996)
2019-05-21 08:56:34 +02:00
Ryan McKinley
7e3ac4ebde
AppPlugin: add an init function (#17150) 2019-05-20 13:05:23 -07:00
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