Commit Graph

284 Commits

Author SHA1 Message Date
Alexander Emelin
b4204628e4
Live: optionally send queries over websocket connection (#41653)
Co-authored-by: ArturWierzbicki <artur.wierzbicki@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-01-05 08:02:12 -08:00
renovate[bot]
bfecbdc0bd
Update dependency rxjs to v7.5.1 (#43718)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-05 15:53:40 +00:00
renovate[bot]
9e5a7b056c
Update dependency rollup to v2.63.0 (#43711)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-05 14:58:56 +00:00
renovate[bot]
0ad440069f
Update dependency @types/jest to v27.4.0 (#43643)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-04 10:06:17 +00:00
Ryan McKinley
4233a62aeb
DashboardPreviews: add dashboard previews behind feature flag (#43226)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Artur Wierzbicki <artur@arturwierzbicki.com>
2021-12-23 09:43:53 -08:00
Connor Lindsey
70c0a9d117
A11y: Fix Fastpass issues for tracing query editors and config pages (#42759)
* Add aria-labels to Jaeger config page

* Fix fastpass issues for Tempo config page

* Fix fastpass issues for other tracing query types like search
2021-12-17 11:49:21 -07:00
Artur Wierzbicki
84ae13fe5d
Live: keep stream history on 'refresh' (#41492)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-15 11:01:55 -08:00
renovate[bot]
12d7c98932
Update dependency @rollup/plugin-node-resolve to v13.1.1 (#43037)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-13 16:12:35 +00:00
Torkel Ödegaard
8828d5e8d7
BarChart: Use new data error view component to show actions in panel edit (#42474) 2021-12-08 11:45:56 +01:00
Ashley Harrison
a345b06095
Chore(dependencies): Tidy up deps in our packages (#42085)
* Chore(dependencies): Tidy up deps in root package

* Tidy up dependencies in @grafana/data

* Tidy up dependencies in @grafana/e2e

* Tidy up @grafana/e2e-selectors packages

* Tidy up packages in @grafana/runtime

* tidy up packages in @grafana/ui

* tidy up packages in jaeger-ui-components

* Readd regenerator-runtime in @grafana/data
2021-12-06 17:32:55 +00:00
Ashley Harrison
cc9151d382
Dependencies: Jest 27 (#42681)
* Update jest monorepo

* Update version of marked so it doesn't throw an error, set testEnvironment

* Fix some unit tests

* Remove all these tests that aren't actually working...

* use spyOn instead of mocking the whole module

* Fix linting

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-03 17:09:25 +00:00
renovate[bot]
e89c9b9194
Update dependency @types/angular to v1.8.3 (#42471)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-30 16:26:18 +00:00
Torkel Ödegaard
1f8336e5fe
DataSourceVariable: Fixes issue repeating panels by data source variable (#42462) 2021-11-29 20:32:18 +01:00
Torkel Ödegaard
070344943c
PanelEditor: Present actionable suggestions when panel cannot visualize current data (#42083)
* PanelDataError: Show actions when current panel cannot visualize data

* Fixed so that suggestions tab is opened from action

* Cleanup

* Fixed tests

* Fix tests

* Fixing tests

* Fixed ts issues
2021-11-25 09:41:03 +01:00
renovate[bot]
0ab4afa2b7
Update sentry-javascript monorepo to v6 (#41991)
* Update sentry-javascript monorepo to v6

* Pass fetch implementation to FetchTransport and stub in unit tests

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-23 15:59:32 +00:00
Jack Westbrook
8b3725b9f2
Chore: Bump versions to 8.4.0-pre (#42116) 2021-11-23 11:23:02 +01:00
renovate[bot]
f97b7858b4
Update dependency @types/react to v17 (#42035)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 11:27:33 +01:00
Andrej Ocenas
e237ff20a9
CloudWatch Logs: Add retry strategy for hitting max concurrent queries (#39290)
* Add error passing and retry strategy

* Change generic error to specific one

* Make the error more generic

* Refactor retry strategy

* Add retry that handles multiple queries

* Rollback some backend changes

* Remove simple retry strategy

* Add comments

* Add tests

* Small test fixes

* Add log timeout config

* Fix tests

* Fix tests

* Add validation

* Remove commented code and add comment

* Fix snapshots

* Remove unnecessary cast
2021-11-17 21:46:13 +01:00
Ryan McKinley
e5811ad106
Query: send datasourceId along with datasource ref (#41830) 2021-11-17 21:00:50 +01:00
Ryan McKinley
bce7cb3ebf
DatasourceRef: keep uid/type ref when using template variables (#41785) 2021-11-17 07:55:12 +01:00
Domas
c60933b49b
Alerting: Fix rule editor issues with Azure Monitor data source (#41317)
* properly set query type

* set default unit from data when found

* make AlertQueryRunner take into account ds.filterQuery

* fix tests

* feedback after pr

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-11-16 14:02:32 +01:00
Andrew Hackmann
53905f2d4a
recorded queries/enable recorded queries option (#41670) 2021-11-15 15:04:45 -06:00
Ryan McKinley
c780854a18
Live: remove hardcoded frontend channel support (#41584) 2021-11-15 07:54:14 -08:00
Levente Balogh
4219e4f107
Plugins Catalog: hide plugins based on the Grafana config (#41679)
* refactor(pkg/api/frontendsettings): group plugin catalog settings

* feat(plugins/admin): add a default config value for `pluginCatalogHiddenPlugins`

* chore(grafana/config): add type for `pluginCatalogHiddenPlugins`

* feat(plugins/admin): hide plugins from the catalog based on the grafana config

* fix(plugins/admin): fix a rebase typo

* fix(plugins/admin): remove unnecessary filtering
2021-11-15 15:51:16 +01:00
Giordano Ricci
13db125558
Explore: Use PageToolbar component & some cleanup (#41318)
* Explore: Use PageToolbar component & some cleanup

* remove unneeded getStyles

* remove unneeded fragment

* restore cancelQueries action handler in reducer

* avoid nested ternary operator

* Clean up explore e2e
2021-11-12 10:09:25 +00:00
Marcus Andersson
e5421dd53e
Chore: Change so we cache loading plugins by its version (#41367)
* making it possible to cache plugins based on the version.

* feat(plugincache): introduce function to invalidate entries

* removed todo's

* added tests for the cache buster.

* fixed tests.

* fixed failing tests.

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-11-10 11:54:58 +01:00
Piotr Jamróz
7d2e9aa979
Elasticsearch: Enable full range log volume histogram (#41202)
* Rename "Logs volume" labels to "Log volume"

Code references are kept intact as there's a lot of them, it could be renamed in a separate PR just with renaming

* Add log level docs

* Remove feature flag to enable log volume by default

* Update error message

* Update docs

* Fix unit test

* Fix unit test

Queries are now run automatically

* Add extra param for Loki API

* Remove "Load volume" button

* Update documentation about log volume

* Move comment

* Make reload button more accessible

* Update docs/sources/explore/logs-integration.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Hide full range log volume for Loki behind the feature toggle

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-10 11:20:30 +01:00
Gilles De Mey
2bc30daa49
Alerting: allows clearing the datasource selection in rule list (#41264) 2021-11-09 18:20:36 +01:00
Artur Wierzbicki
f45eb309ef
Live: move centrifuge service to a web worker (#41090)
* Fix: make webpack pickup workers written in TS

* Add comlink to dependencies

* Temporary fix: copy paste `toDataQueryError` from @grafana/runtime to avoid web dependencies

* Implemented comlink-based centrifuge worker & worker proxy

* Temporary fix: implement comlink transferHandlers for subscriptions and streamingdataframes

* Move liveTimer filtering from CentrifugeService into GrafanaLiveService

* Switch from CentrifugeService to CentrifugeServiceWorkerProxy in GrafanaLive

* Naming fix

* Refactor: move liveTimer-based data filtering from GrafanaLiveService to CentrifugeServiceWorker

* observe dataStream on an async scheduler

* Fix: - Unsubscribe is now propagated from the main thread to the worker, - improve worker&workerProxy types

* Fix: Prettify types

* Fix: Add error & complete observers

* Docs: Add comment explaining the `subscriberTransferHandler`

* Fix: Replace `StreamingDataFrameHandler` with explicitly converting StreamingDataFrame to a DataFrameDTO

* Refactor: move liveTimer filtering to service.ts to make it easy to implement a `live-service-web-worker` feature flag

* Feat: add `live-service-web-worker` feature flag

* Fix: extract toDataQueryError.ts to a separate file within `@grafana-runtime` to avoid having a dependency from webworker to the whole package (@grafana-runtime/index.ts)

* Update public/app/features/dashboard/dashgrid/liveTimer.ts

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>

* Fix: fixed default import class in worker file

* Fix: cast worker as Endpoint

* Migrate from worker-loader to webpack native worker support v1 - broken prod build

* Fix: Use custom path in HtmlWebpackPlugin

* Fix: Loading workers from CDNs

* Fix: Avoid issues with jest ESM support by mocking `createWorker` files

* Fix: move the custom mockWorker rendering layout to `test/mocks`

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-09 21:05:01 +04:00
Gábor Farkas
9d82111a1a
prometheus: enable new monaco-based query field (#41357)
* prometheus: enable new monaco-based query field

* updated test

* updated tests

* fix e2e tests

* updated comment
2021-11-08 14:20:48 +01:00
Ryan McKinley
3489721ed6
api/ds/query: simplify data sources lookup for queries and expressions (#41172) 2021-11-05 08:12:55 -07:00
Jack Westbrook
f2f31f60f2
Chore: Bump rollup and rollup plugins to latest (#40800) 2021-11-02 11:10:32 +01:00
Ryan McKinley
340ed4125e
DataSourceWithBackend: implement interpolateVariablesInQueries by default (#41152) 2021-11-02 00:29:52 -07:00
Ryan McKinley
7319efe077
Dashboard: replace datasource name with a reference object (#33817)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Elfo404 <me@giordanoricci.com>
2021-10-29 10:57:24 -07:00
kay delaney
3a7c5a0755
Chore: Switch yarn 2 to plug-n-play strategy (#40300) 2021-10-27 14:21:07 +01:00
Torkel Ödegaard
54af57b8e6
VisualizationSelection: Real previews of suitable visualisation and options based on current data (#40527)
* Initial pass to move panel state to it's own, and make it by key not panel.id

* Progress

* Not making much progress, having panel.key be mutable is causing a lot of issues

* Think this is starting to work

* Began fixing tests

* Add selector

* Bug fixes and changes to cleanup, and fixing all flicking when switching library panels

* Removed console.log

* fixes after merge

* fixing tests

* fixing tests

* Added new test for changePlugin thunk

* Initial struture in place

* responding to state changes in another part of the state

* bha

* going in a different direction

* This is getting exciting

* minor

* More structure

* More real

* Added builder to reduce boiler plate

* Lots of progress

* Adding more visualizations

* More smarts

* tweaks

* suggestions

* Move to separate view

* Refactoring to builder concept

* Before hover preview test

* Increase line width in preview

* More suggestions

* Removed old elements of onSuggestVisualizations

* Don't call suggestion suppliers if there is no data

* Restore card styles to only borders

* Changing supplier interface to support data vs option suggestion scenario

* Renamed functions

* Add dynamic width support

* not sure about this

* Improve suggestions

* Improve suggestions

* Single grid/list

* Store vis select pane & size

* Prep for option suggestions

* more suggestions

* Name/title option for preview cards

* Improve barchart suggestions

* Support suggestions when there are no data

* Minor change

* reverted some changes

* Improve suggestions for stacking

* Removed size option

* starting on unit tests, hit cyclic dependency issue

* muuu

* First test for getting suggestion seems to work, going to bed

* add missing file

* A basis for more unit tests

* More tests

* More unit tests

* Fixed unit tests

* Update

* Some extreme scenarios

* Added basic e2e test

* Added another unit test for changePanelPlugin action

* More cleanup

* Minor tweak

* add wait to e2e test

* Renamed function and cleanup of unused function

* Adding search support and adding search test to e2e test
2021-10-25 13:55:06 +02:00
renovate[bot]
f496c31018
Update dependency @types/jest to v27 (#40403)
* Update dependency @types/jest to v27

* Fix type errors

* Linting!

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-22 17:44:01 +01:00
Piotr Jamróz
f86fa876f2
Logs: Add a feature toggle to run logs volume query automatically (#40579)
* Add a feature toggle to run logs volume query automatically

* Add missing default value

* Move feature toggle after moving auto-load button

* Remove unused import
2021-10-21 15:56:31 +02:00
Ryan McKinley
ad69de4a10
AppEvents: export appEvents in @grafana/runtime and support copy panel (#40715) 2021-10-20 13:01:21 -07:00
renovate[bot]
39866d4a7f
Update dependency @types/rollup-plugin-visualizer to v4 (#40484)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 15:40:54 +01:00
Hugo Häggmark
30c1e7fa5c
A11y: Fix fastpass issues for /explore with gdev-testdata (#40309)
* A11y: Fix fastpass issues for /explore with gdev-testdata

* Chore: changes after PR feedback

* Chore: revert file to main

* Tests: fix for e2e tests
2021-10-13 06:09:35 +02:00
Giordano Ricci
0ac81e9e47
Chore: remove volta references (#40275) 2021-10-12 12:39:54 +01:00
kay delaney
b2e94d0733
Chore: Migrate yarn from v1 to v2 (#39082)
* Chore: Migrate yarn from v1 to v2

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-10-08 15:19:10 +01:00
dependabot[bot]
697a90699b
Chore: Remove pretty-format since it's not used (#39980)
* Bump pretty-format from 25.1.0 to 27.2.4

Bumps [pretty-format](https://github.com/facebook/jest/tree/HEAD/packages/pretty-format) from 25.1.0 to 27.2.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.2.4/packages/pretty-format)

---
updated-dependencies:
- dependency-name: pretty-format
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Chore(dependencies): Remove pretty-format as it's not currently used

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-05 11:58:16 +01:00
Guilherme Caulada
706a665240
Auth: add name parameter to auth.saml (#39883)
* add name parameter to auth.saml

* Create constant to store default SAML name
2021-10-04 09:58:16 -03:00
An
fffbdf4c82
feature: allow delete request to accept body (#39817) 2021-09-30 10:59:53 -04:00
Piotr Jamróz
124e9daf26
Loki: Full range logs volume (#39327)
* Basic implementation of getLogsVolumeQuery method

* Add todos

* Add a switcher to automatically load logs volume

* De-scope dismissing logs volume panel

* De-scope logs volume query cancellation

* Remove todo

* Aggregate logs volume components in single panel

* Show logs volume only when it's available

* Aggregate logs volume by level

* Simplify aggregation

* Handle no logs volume data

* Add error handling

* Do not show auto-load logs volume switcher when loading logs volume is not available

* Remove old logs volume graph

* Clean up

* Make getting data provider more generic

* Provide complete logs volume data (error, isLoading)

* Display more specific error message

* Add missing props to mocks

* Remove setRequest method

* Mark getQueryRelatedDataProviders as internal

* Add missing dataQueryRequest and add a todo

* Remove redundant loading state

* Do not mutate existing queries

* Apply fix for zooming-in from main

* Post-merge fixes

* Create collection for data provider results

* Use more generic names

* Move aggregation logic to Loki logs volume provider

* Move LogsVolume to common types

* Update tests

* Post-merge fixes

* Fix mapping related data values

* Simplify prop mappings

* Add docs

* Fix property name

* Clean-up

* Mark new types as internal

* Reduce number of providers to logs volume only

* Simplify data structure to DataQueryResponse

* Move Logs Volume panel to a separate component

* Test logsVolumeProvider.ts

* Add observable version of datasource mock

* Test getLogsVolumeDataProvider method

* Test LogsVolumePanel

* Test logs volume reducer

* Clean up

* Clean up

* Fix test

* Use sum by to use level field directly

* Fix strict type errors

* Fix strict type errors

* Use "logs" instead of "unknown" if only one level was detected

* Add docs about logs volume

* Rename histogramRequest to logsVolumeRequest

* Use LogsVolumeContentWrapper all content types

* Move `autoLoadLogsVolume` local storage handling

* Fix strict error

* Move getting autoLoadLogsVolume to initial state

* Cancel current logs volume subscription

* Test cancelling subscriptions

* Update docs/sources/datasources/loki.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update packages/grafana-data/src/types/explore.ts

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Inline container styles

* Ensure logs volume is aggregated per each subscription separately

* Simplify logs volume provider

* Type-guard support for logs volume provider

* Simplify event handlers to avoid casting

* Clean up and docs

* Move auto-load switcher to logs volume panel

* Fix test

* Move DataSourceWithLogsVolumeSupport to avoid cross referencing

* Simplify interface

* Bring back old histogram and hide the new one behind a feature flag

* Add missing props to logs histogram panel

* Clean up the provider when it's not supported

* Simplify storing autoLoadLogsVolume

* Remove docs

* Update packages/grafana-data/src/types/logsVolume.ts

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>

* Skip dataframes without fields (instant queries)

* Revert styles changes

* Revert styles changes

* Add release tag

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-09-30 15:46:11 +02:00
Levente Balogh
c2754eb9cc
Plugins Catalog: Make the catalog the default way to interact with plugins (#39779)
* chore(Plugins/Admin): make the Plugins Catalog the default way to interact with plugins

* chore(defaults.ini): change the default value for `plugin_admin_enabled`

* test(Plugins): make the tests pass
2021-09-30 08:34:03 +02:00
kay delaney
75a55379f1
A11y: Fixes some fastpass errors for /datasources/* routes (#39577)
* A11y: Fixes some fastpass errors for /datasources/* routes
See #39429
2021-09-29 16:16:30 +01:00
Sofia Papagiannaki
012d4f0905
Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746)
* Remove `ngalert` feature toggle

* Update frontend

Remove all references of ngalert feature toggle

* Update docs

* Disable unified alerting for specific orgs

* Add backend tests

* Apply suggestions from code review

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Disabled unified alerting by default

* Ensure backward compatibility with old ngalert feature toggle

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-29 16:16:40 +02:00