Commit Graph

129 Commits

Author SHA1 Message Date
Leon Sorokin
fb79be4a43
Transformations: Add frame source picker to allow transforming annotations (#77842)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2024-01-02 23:33:31 -06:00
Todd Treece
e28bbd50d8
PanelQueryRunner: Skip shallow diff when streaming (#79860) 2023-12-26 16:23:41 -05:00
Torkel Ödegaard
82af0d6230
PanelQueryRunner: Fix loading state (#79690) 2023-12-19 15:13:11 +01:00
Leon Sorokin
19cda38f1b
PanelQueryRunner: Shallow diff series DataFrames (#79257) 2023-12-12 16:11:17 -06:00
Torkel Ödegaard
d03b291eed
Explore: Fixes issue with adhoc filters when coming from dashboards (#78339) 2023-11-20 20:22:01 +01:00
Giordano Ricci
42a3f36c18
Explore: Fix queries (cached & non) count in usage insights (#78097)
* Fix: Fix queries (cached & non) count in usage insights

* also keep deprecated error property

* Fix & refactor tests
2023-11-15 16:32:28 +00:00
Dominik Prokop
a3ae9d418d
DashboardScene: Alert states data layer (#77945)
* Add AlertStates data topic

* DashboardScene: Alert states data layer

* TMP package json

* Remove duplicated function

* Use latest scenes canry

* Use latest scenes and add transformation test
2023-11-14 00:08:06 -08:00
Esteban Beltran
0b03344baa
Chore: Update to typescript 5 (#76511)
* Update dependency typescript to v5

* Update yarn.lock

* Fix typescript errors

* Update typescript version sdk

* Revert useDescription.ts

* Fix ts errors

* Fix Typescript errors after Symbol.unscopables type change

* Fix colormanipulator errors

* Update packages/grafana-data/src/vector/FunctionalVector.ts

* Fix ts errors in dashboardmigrator

* Fix sandbox component typescript error

* Update yarn

* Update to typescript 5.2

* Fix typescript error

* update typescript/vscode patch/sdk/whatever

* fix ts errors in elasticsearch

* Fix two errors in alerting

* Fix error in dashboard-scene

* Fix errors in dashboard tests

* Fix errors in explore tests

* Fix error in plugins sandbox

* fix error in DashboardQueryRunner

* fix errors in grafana-data

* fix errors in PanelChrome story

* update betterer

* better fix for cloud monitoring

* fix error in reducer tester

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
2023-11-07 13:20:20 +00:00
Leon Sorokin
56c2d8ff40
Snapshots: Fix breakage of some panel types due to missing structureRev (#76586) 2023-10-13 18:56:51 -05:00
Domas
b75b747881
Tempo data source: Fix service map query error when a duration data frame has no data (#76269)
* fix tempo service graph req when data frame is empty

* also report error to Faro
2023-10-10 17:57:05 +03:00
Jo
28c0fb1cfd
AccessControl: Remove legacy frontend AC checks (#76187)
* remove legacy ac checks

* fix RBAC disabled tests

* add permissions for tests to work

* fix unifiedalertstatesworker test
2023-10-09 18:10:06 +02:00
Torkel Ödegaard
2fe4ecde19
DataSourceAPI: Add adhoc filters to DataQueryRequest and make it not depend on global templateSrv (#75552)
* DataSourceAPI: Add adhoc filters to DataQueryRequest and some methods to make it not depend on global templateSrv

* Minor tweaks/fixes

* Renamed to filters

* Fix test

* Log deprecation warning

* I give up
2023-09-28 16:28:58 +02:00
Ashley Harrison
ff0642bf6e
Chore: Type improvements 🧹 (#75271)
* fix some e2e flows types

* some type fixes

* must... fix... more...

* MOAR

* MOREMOREMORE

* 1 more
2023-09-22 15:06:49 +01:00
Ryan McKinley
a1250632c3
Inspector: Show transformation query errors (#73344) 2023-09-20 09:09:51 -07:00
Ashley Harrison
0c44a6f9bb
Chore: Improve typings 🧹 (#74599)
* various type fixes

* candlestick panel type fixes

* few more fixes

* some fixes

* more :)

* moar!

* undo change to SilencesFilter

* undo change to configureStore
2023-09-13 09:17:07 +01:00
Sonia Aguilar
cad39b7397
Alerting: Revert "Alerting: Show annotations markers in TimeSeries panel when u… (#74576)
Revert "Alerting: Show annotations markers in TimeSeries panel when using Loki as … (#72084)"

This reverts commit de6ef53c8a.
2023-09-08 10:57:31 +02:00
Juan Cabanas
969ef5282c
PublicDashboards: Data discrepancy fix. Use real datasource plugin when it is a public dashboard. (#73708)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-08-30 09:38:13 -03:00
Torkel Ödegaard
3ee26df41e
PublicDashboards: Variables refactor (#73476)
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-08-25 13:56:02 -05:00
Ryan McKinley
e605c686f8
Transforms: Catch errors while running transforms (#73451) 2023-08-18 13:55:42 -07:00
Sonia Aguilar
de6ef53c8a
Alerting: Show annotations markers in TimeSeries panel when using Loki as … (#72084)
* WIP: Show annotations markers in TimeSeries panel when using Loki as alert state history

* WIP changes

* Fix converting log records to data frame for panel

* Move fetching alert state history with Loki to the PannelQueryRunner to keep the panel flow

* use dasboardUID and panelUID for requesting Loki ash

* fix wrong prettier change

* Only request loki ash when having alertstate

* Use panelID as param in history query

* Refactor: move getRuleHistoryRecordsForPanel and remove filtering code as is not used

* Adress PR review comments

* Add try catch for ash request

* Add tests for updatePanelDataWithASHFromLoki method

* Address PR review suggestions

* review suggestion

* Add test for logRecordsToDataFrameForPanel method

* pr Review nit suggestion

* Dont show toast messages from Loki request
2023-08-01 12:00:39 +02:00
Piotr Jamróz
2ae226de89
Explore: Decouple SplitOpen and getFieldLinksForExplore from Panel visualizations (#71811)
* Allow overriding internal data link supplier

* Remove SplitOpen and getFieldLinksForExplore dependencies

* Fix checking if row index is provided

* Fix unit test

* Add a comment

* Mark SplitOpen as deprecated

* Use Panel Context to provide internal data link supplier

* Update packages/grafana-ui/src/components/PanelChrome/PanelContext.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* Update packages/grafana-data/src/utils/dataLinks.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* Add missing eventsScope

* Fix infinite render loops

* Rename internal data link supplier to data link post processor

* Update packages/grafana-data/src/field/fieldOverrides.ts

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

---------

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-07-31 14:10:03 +02:00
Andres Martinez Gotor
987624f8cf
Chore: Move StreamingDataFrame to @grafana/data (#72014) 2023-07-24 13:30:52 +02:00
Andreas Christou
bf91fb76fa
QueryBuilder: Preserve queries when switching from Mixed (#71224)
* When switching from mixed to another datasource preserve relevant queries

- Update query refs
- Update tests

* Ensure templateVars are handled correctly

- Add test

* Comment

* Unused var

* For ds template variable only preserve if going from&to template

- Add test
2023-07-18 15:15:43 +01:00
Ashley Harrison
9852b24d61
Chore: Upgrade prettier to v3 (#71764)
* Update dependency prettier to v3 (#71586)

* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* unplug prettier

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-17 15:58:22 +01:00
Ashley Harrison
5ca382c88a
Revert "Update dependency prettier to v3 (#71586)" (#71755)
This reverts commit 2e8cd1c021.
2023-07-17 14:46:15 +01:00
renovate[bot]
2e8cd1c021
Update dependency prettier to v3 (#71586)
* Update dependency prettier to v3

* run prettier

* ignore prettier update in legacy select scss

* update command line arg

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2023-07-17 09:19:27 +01:00
Leon Sorokin
8ba1762618
PanelQueryRunner: Ensure same transformations before reusing lastProcessedFrames (#68498) 2023-05-15 15:48:03 -05:00
Torkel Ödegaard
32fafffed7
PanelQueryRunner: Return previous processed (transform+field config) series for loading state (#67768)
* Return same series for loading state

* Fix shared query issue

* include structureRev

* heatmap should depend on the series, not the wrapper

* fix more panels

* keep config for comparison

* fieldConfig.fieldConfig!

* cleanup

* cmon

---------

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-05-07 15:21:40 +02:00
Ryan McKinley
9452c0d718
Annotations: Support filtering the target panels (#66325)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-04-18 15:39:30 -05:00
Ryan McKinley
39c04a8e36
Chore: Remove deprecated dashboardId from panel query runner (#64786) 2023-04-14 16:50:10 -07:00
Gábor Farkas
4ded937c79
Show traceids for failing and successful requests (#64903)
* tracing: show backend trace ids in frontend

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* better trace id naming

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

* added feature flag

* bind functionality to the feature flag

* use non-generic name for traceid header

* fixed tests

* loki: do not create empty fields

* do not add empty fields

* fixed graphite test mock data

* added unit-tests to queryResponse

* added unit-tests for backend_srv

* more typescript-friendly check

* added unit-tests for runRequest

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2023-04-05 09:13:24 +02:00
Torkel Ödegaard
b7b608418d
Templating: Introduce macros to simplify and optimize some scopedVars (#65317)
* Templating: Introduce macros to simplify and optimize some scopedVars

* Fixing tests

* fix test

* minor fix

* refactoring so macros work with formatting

* remove breaking change and keep current inconsistency

* Rename valueIndex to rowIndex

* Minor fixes

* Added test dashboard

* Added tags to dashboard

* Update

* Added test to check it returns match

* Update

* Fixed dashboard

* fix
2023-03-28 19:22:34 +02:00
Alexa V
fef0ee913c
Panel Header: Add CancelQuery option to panel header (#64796)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2023-03-16 13:56:58 +01:00
Torkel Ödegaard
4bf23b7f5f
PanelData: move preProcessPanelData to @grafana/data (#63743) 2023-03-06 10:59:47 +01:00
Andres Martinez Gotor
c84cfd2b3f
Plugin query API: Handle multiple errors (#63553) 2023-03-02 11:25:50 +01:00
Ashley Harrison
f8d89eff56
Chore: fix type errors in tests (#63270)
* fix any's in tests

* fix more any's in tests

* more test type fixes

* fixing any's in tests part 3

* more test type fixes

* fixing test any's p5

* some tidy up

* fix template_srv
2023-02-14 16:46:42 +01:00
Michael Mandrus
7391793504
Query Caching: Add per-panel query caching TTL (#61968)
* *Create Caching Config interface and OSS impl
*Create front-end facing DS Cache config
*Populate Caching Config on Datasource DTO
*Update OSS wire deps

* fix unit test

* handle query caching TTL override on the frontend

* Make sure the override works with pubdash

* move caching config to the right place in the ds info

* move caching config logic to enterprise index hook

* move queryCachingTTL to pubdash query payload

* Remove  from metadata (not needed)

* rename struct and add comment

* remove invalid wire dependency

* manual revert of 395c74b

* fix frontend test

* fix backend test

* fix tests for real this time

* truly fix frontend test

* fix back end unit test for real
2023-02-02 23:39:54 -05:00
Andreas Christou
3ac97dd396
TemplateVariables: Fix custom variable function support (#62509)
Validate query values
2023-01-30 17:49:16 +00:00
Ida Štambuk
f1a2a76897
Datasources: Use getDefaultQuery in annotations editors (#61870)
+ Add Cloudwatch default annotation
2023-01-30 16:45:03 +01:00
Laura Benz
9400ccf478
Glue: Validate target query in correlations page (#57245)
* feat: add draft version of validate button

* feat: add some styling and basics

* temp: intermediate result

* refactor: solve TODOs

* refactor: replace string in state

* refactor: replace error message style

* refactor: set validate state on change in ds

* refactor: add QueryRunner

* refactor: add QueryRunner

* temp: temporary status

* Emit PanelData to check if the query is valid

* refactor: clean up

* refactor: improve a11y of error message and adjust test

* Remove deprecated property call, change equality

* refactor: add changes from code review

* refactor: remove memory leak

* refactor: replace query runner

* refactor: adjust error handling

* refactor: move testing to related unit test

* refactor: clean up test for QueryEditorField

* refactor: clean up test for CorrelationsPage

* refactor: repair test

* refactor: clean up

* refactor: add refId in order avoid errors when running Loki queries

* refactor: replace buildQueryTransaction + set query to invalid if query is empty

* refactor: add empty query value to test cases

* refactor: end handleValidation after setIsValidQuery()

* refactor: refactor test

* refactor: fix last two tests

* refactor: modify validation

* refactor: add happy path

* refactor: clean up

* refactor: clean up tests (not final)

* refactor: further clean up

* refactor: add condition for failing

* refactor: finish clean up

* refactor: changes from code review

* refactor: add response state to condition

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* refactor: fix prettier issue

* refactor: remove unused return

* refactor: replace change in queryAnalytics.ts

* refactor: remove correlations from query analytics

* refactor: remove unnecessary test preparation

* refactor: revert changes from commit 4997327

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2023-01-12 11:43:40 +01:00
Ezequiel Victorero
34a865ebf0
PublicDashboards: remove publicDashboardUID from insights event request (#60649) 2023-01-11 18:25:18 -03:00
Torkel Ödegaard
bd90a6e1be
Transformations: Add context parameter to transformDataFrame and operators (#60694)
* Transformations: Add context parameter to transformDataFrame and operators

* Remove unused queries prop

* Fixed test

* Fixed test
2023-01-05 17:34:09 +01:00
sam boyer
f86abf096d
schema: Use generated dashboard model in frontend (#55769)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
2022-12-20 15:04:14 +01:00
Josh Hunt
af719888d6
Chore: Remove any type assertion in PanelQueryRunner (#60096) 2022-12-14 14:07:22 +00:00
Josh Hunt
9a41277ecd
Dashboards: Show error when data source is missing (#60099)
Return caught exceptions to panel as error state
2022-12-14 12:37:31 +00:00
Ivana Huckova
e2077e9659
Dashboard: Run requests with correct app type (#60010)
Dashboard: Run quries with correct core app
2022-12-08 11:52:28 +01:00
Daniel Lee
74167b4d44
UsageInsights: Record events for Explore queries (#59931)
* usageinsights: record events for Explore queries

* usageinsights: make the source field optional

It is not logical to have it for an event like the dashboard-view

* usageinsights: add comment to Explore test

Explain why we are reversing a previous decision
2022-12-07 21:19:35 +01:00
Erik Sundell
32309a8373
Datasource: Fix - apply default query also to queries in new panels (#59625)
* apply default query also to new panels

* add comment

* add tests
2022-12-05 15:44:04 +01:00
renovate[bot]
e84a01e870
Update jest monorepo to v29 (#58261)
* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-11-24 14:00:41 +00:00
kay delaney
b49713d323
Chore: Remove unused files (#57515) 2022-10-25 23:34:53 +01:00