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
* 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
* (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
* 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
* 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
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.
* 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
* 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
* 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.
* 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