Commit Graph

10248 Commits

Author SHA1 Message Date
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
tolwi
f0109be2bc fix(prometheus): issue with click label to filter for recording rules in Explore 2019-05-09 13:54:48 +02:00
Hugo Häggmark
a04b3a13e0
Explore: Removes Promise.All from runQueries thunk (#16957) 2019-05-09 12:24:48 +02:00
Ryan McKinley
7b92c56055 DataSourcePlugins: more generics improvements (#16965)
* more types for query editor

* generic datasources

* update

* change ComponentClass to ComponentType

* more types

* remove input
2019-05-09 11:48:13 +02:00
Torkel Ödegaard
e1d408a66f
AddDataSource: Updated page design & categories (#16971)
* minor refactoring

* Added category

* Minor progress

* Progres

* Updated descriptions

* Added custom sort

* NewDataSource: progress

* Updated design

* NewDataSource: Updated design

* Updated link

* Feedback changes
2019-05-09 11:45:39 +02:00
r66ad
99c754c4a5 Templating: Support selecting all filtered values of multi-value variable (#16873)
* Closes #15821

* sorry, now prettier

* select and deselect on filtered values works with Selected option now. Should the clearSelections function rather be renamed to selectOrClearValues? Selected should have another name too.
2019-05-09 07:51:14 +02:00
Dominik Prokop
1ef15283a4
FieldDisplay: Don't use group ui elements in field editors (#16953)
* FieldDisplay editor - minor refactor not to use panel group ui elements
* FieldPropertiesEditor - minor refactor not to use panel group ui elements
2019-05-08 17:25:41 +02:00
Torkel Ödegaard
a9e01d8b04
GettingStarted: Fixes layout issues, fixes #16926 (#16941) 2019-05-08 17:22:25 +02:00
Torkel Ödegaard
f58ab7945b
PanelModel: Fix crash after window resize, fixes #16933 (#16942) 2019-05-08 17:21:46 +02:00
Torkel Ödegaard
e97853abc9
Singlestat: fixed centering issue for very small panels (#16944) 2019-05-08 17:21:17 +02:00
Hugo Häggmark
a4d287d2e1
Tests: Adds end-to-end tests skeleton and basic smoke test scenario (#16901)
* Chore: Adds neccessary packages

* Wip: Initial dummy test in place

* Feature: Downloads Chromium if needed

* Fix: Adds global config object

* Refactor: Adds basic e2eScenario

* Build: Adds end to end tests to config

* Build: Changes end to end job

* Build: Adds browsers to image

* Build: Adds failing test

* Refactor: Adds first e2e-test scenario

* Fix: Ignores test output in gitignore

* Refactor: Adds compare screenshots ability

* Refactor: Removes unnecessary code

* Build: Removes jest-puppeteer

* Fix: Replaces test snapshots

* Refactor: Creates output dir if missing

* Refactor: Changes aria-labels to be more consistent

* Docs: Adds section about end to end tests

* Fix: Fixes snapshots

* Docs: Adds information about ENV variables
2019-05-08 16:50:21 +02:00
Hugo Häggmark
ceb9f0855b
Chore: Replaces moment with Grafanas DateTime (#16919)
* Wip: Initial commit

* Refactor: Replaces moment.utc(

* Refactor: replaces the last isMoment statements

* Refactor: Removes almost all moment imports

* Refactor: Moves moment_wrapper to grafana/ui

* Refactor: Renames momentWrapper

* Refactor: Removes one more moment import

* Refactor: Removes unitOfTime import

* Fix: Fixes Prettier error

* Refactor: Renames DateTimeType to DateTime

* Refactor: Renames isDateTimeType to isDateTime

* Refactor: Renames dateTime to dateTime

* Feature: Bans moment imports and types
2019-05-08 13:51:44 +02:00
Stephen SORRIAUX
e7a9afe983 InfluxDB: Fix HTTP method should default to GET (#16949)
Fixes #16929
2019-05-08 13:02:39 +02:00
Ryan McKinley
1d8786e3a6 DataSource Plugins: consistent generics order <TQuery,TOptions> (#16936)
* consistent TQuery,TOptions

* add json for azure

* cloudwatch
2019-05-08 09:37:50 +02:00
Ryan McKinley
b08cf1e7ac
Plugins: update beta notice style (#16928) 2019-05-07 15:58:03 -07:00
Daniel Lee
befa40ef3a
AzureMonitor: adds support for multiple subscriptions per datasource (#16922)
* chore: AzureMonitor typescript typings

Removes some types and using @grafana/ui types instead.
Adds some typing for the AzureMonitor query.

Also adds a getSubscriptions function that will used in the query
editor.

* fix: AzureMonitor adds back editor for annotation queries

This must have been broken for a month or more. Now possible to
edit annotation queries again.

* feat: Azure Monitor - support for multiple subscriptions

Adds a new dropdown for subscriptions in the query editor.

Defaults to the subscription id in jsonData for queries
that have no subscription id.

* feat: adds Azure Logs multi subscriptions support

The subscription id is needed for fetching the list of
workspaces. Adds support to the Log Analytics datasource
and to the annotations for Log Analytics to be able to
choose between multiple subscriptions.

* feat: AzureMonitor config page with multiple subs

Adds support for multiple subscriptions for the different
variations of configuring Azure Monitor and Azure Logs.

To be able to show a list of subscriptions, the config
has to be saved first - the plugin route fetches the
tenant id, client id and client secret from the database
so a call to get subscriptions requires that those
fields are saved first. If the page has not saved then
the use can manually paste in a subscription id.

* feat: support for multi subs in Azure Monitor variables

Adds an optional subscription parameter to the template
variable macros. Also adds a Subscriptions macro.

* fix: remove some implicit anys from tests
2019-05-07 15:45:15 +02:00
Torkel Ödegaard
6d6242c153
BarGauge: New multi series enabled gauge like panel with horizontal and vertical layouts and 3 display modes (#16918)
* BarGauge: switched to beta and updated beta notice design

* Updated snapshot
2019-05-07 12:18:08 +02:00
Torkel Ödegaard
108eb5f07c
BarGauge: Updated test dashboards and threshold fix (#16911) 2019-05-07 06:07:33 +02:00
Torkel Ödegaard
f8393fb339
PanelModel: Clear queryRunner on destroy (#16906)
* PanelModel: Clear queryRunner on destroy

* fix test asumptions
2019-05-06 19:35:10 +02:00
Torkel Ödegaard
48ae93048b
Panels: No title will no longer make panel header take up space (#16884)
* Panels: Initial poc of no panel titles

* moving panel-container to DashboardPanel

* Starting to work

* Gauge fix

* Panels: tweaked panel padding and title z-index stuff

* Panels: changed panel padding a bit and simplified it by having same padding in vertical and horizontal

* Lots of tweaks to panel padding related stuff

* Updated snapshot

* Added test dashboard

* Final refactorings

* Trim title befgor applying panel-container--no-title class

* Remove unnecessary type annotation

* Panels: hasTitle no need to trim

* Gauge: fixed font family
2019-05-06 15:26:09 +02:00
Torkel Ödegaard
575fe7ad5a
Gauge: Better handling of gauge repeat title (#16886)
* Gauge: began looking at gauge title

* Gauge: title improvements

* Minor progres

* Gauge: title improvements, still needs more tweaking

* Gauge: title is starting to work ok

* Use selectThemeVariant

* Remove unused type
2019-05-06 13:50:17 +02:00
Ryan McKinley
d881976c9d Refactor: move datemath to grafana/ui (#16890)
* move datemath to grafana/ui

* don't reference @grafana/ui from its own component
2019-05-06 12:36:42 +02:00
Ryan McKinley
513c79d392 PanelQueryState: check for existing running query (#16894)
Fixes #16880
2019-05-06 12:09:53 +02:00
psschand
d5245a98b1 Alert: Support variables in Alert List filters (#12583) (#16892) 2019-05-06 09:21:08 +02:00
Ryan McKinley
073c84179f FieldDisplay: shared options model for singlestat panels (#16703)
* update single stat data model

* update single stat data model

* update single stat data model

* show limit default

* merge master

* change stat selector to single until #15954

* add tooltip

* begin children

* move options under display

* align gauge options

* add migration tests

* Docs: Updated changelog

* SingleStatPanels: show title if manual specified

* FieldPropEditor: Max should change max

* change stats to calcs in config

* remove prefix/suffix

* add test

* abort field cycle when passed the limit

* stub a better test

* move title to Field

* remove title
2019-05-04 10:08:48 +02:00