Commit Graph

280 Commits

Author SHA1 Message Date
Ashley Harrison
b321dc7280
Chore: Migrate from react-beautiful-dnd to @hello-pangea/dnd (#90328)
* migrate from react-beautiful-dnd to @hello-pangea/dnd

* revert comment
2024-07-12 10:23:29 +01:00
Andres Martinez Gotor
2b7338f8b6
Add optional APIVersion to DatasourceRef (#90076) 2024-07-08 13:12:56 +02:00
Ashley Harrison
47f8717149
React: Use new JSX transform (#88802)
* update eslint, tsconfig + esbuild to handle new jsx transform

* remove thing that breaks the new jsx transform

* remove react imports

* adjust grafana-icons build

* is this the correct syntax?

* try this

* well this was much easier than expected...

* change grafana-plugin-configs webpack config

* fixes

* fix lockfile

* fix 2 more violations

* use path.resolve instead of require.resolve

* remove react import

* fix react imports

* more fixes

* remove React import

* remove import React from docs

* remove another react import
2024-06-25 12:43:47 +01:00
Ashley Harrison
396e75dadf
Chore: Type improvements (#87634)
* improve typings in opentsdb datasource

* couple of influx improvements

* couple more

* more

* more more more

* 3 more

* changes to variables/inspect/utils

* some graphite improvements
2024-05-10 17:28:44 +01:00
kay delaney
cbe868b118
Chore: Use getNextRefId instead of deprecated getNextRefIdChar (#87460) 2024-05-10 12:00:17 +01:00
Sonia Aguilar
4b720206d4
Alerting: Reduce number of request fetching rules in the dashboard view using rtkq (#86991)
* Reduce number of request fetching rules in the dashboard view using rtkq

* Fix UnifiedAlertStatesWorker work

* refactor ungroupRulesByFileName

* Address review comments and fix test

* fix DashboardQueryRunner test

* Fix tests

* Update AlertStatesDataLayer to use RTKQ

* Fix PanelAlertTabContent test

* Fix PanelAlertTabContent test after adding RTKQ

* fix test and address PR review comments

* Update useCombinedRuleNamespaces to have both dashboardUID and panelId as optional params and rename the hook

* Address review pr comment

* remove test about template variables

* Use poll interval in useCombinedRules
2024-05-10 12:27:06 +02:00
Alexa V
eae1cafebd
Dashboard Scene: Chore - Add missing unit test to PanelDataQueryTab (#87139)
* Create basic structure PanelDataQueriesTab unit test

* Add more test cases to the PanelDataQueriesTab test

* Update public/app/features/dashboard-scene/panel-edit/VizPanelManager.tsx
2024-05-02 15:54:50 +02:00
Krishna Dhakal
deb6d27406
Core: Replace deprecated jest matcher toBeCalledWith (#86635)
* Replace depredated matcher from jest

* perform rechecks

---------

Co-authored-by: joshhunt <josh@trtr.co>
2024-05-01 15:33:26 +01:00
Haris Rozajac
649c456eab
Explore: Nested Content Outline (#80688)
* indentation levels

* Highlight parent section when child is selected

* Fix context, add rotation to toggle button

* Merge single child logic; fix styling

* Fix collapsed logic, make elipsis work, reorganize for better readability;

* Add connector

* Tooltip placement

* Update tests so they test components the same way users would interact with them

* Clean up indendation levels

* Support collapsing logic for multiple section; highlight all items in a section of an active child - parent is active only when section is collapsed and child inside of it is active

* Simplify making ellipsis work

* Show tooltip if the text overflows in expanded mode

* The whole button container should have same background when section is expanded in mini view

* Fix a bug where root items were not being sorted by document position

* Update query order when query rows are changed through dragging and dropping

* Fix the issue where chaning the title of a query row would remove the query
2024-03-28 09:06:52 -06:00
Erik Sundell
86bb91e1ce
Datasources: Fix expressions that reference hidden queries (#84977)
call expression ds before filter query
2024-03-22 12:19:31 +01:00
Erik Sundell
29d4f6a217
Datasource: Change query filtering (#84656)
* call filterQuery from queryrunner

* test query hide filtering

* fix more broken tests

* lint errrors

* remove redundant filterQuery call

* skip filter in variable queries

* fix broken cypress test

* change tooltip text

* fix translations

* fix comments

* do not execute query is targets are empty

* add more tests

* remove unsued import

* update translations

* revert id change

* change header text

* update comment for hide prop

* rename hide query prop

* change tooltip and introduce different toggle state text

* update tests

* update comment and regenerate types

* run extract again

* fix broken e2e test

* track event

* fix build issues

* revert changes in wire file
2024-03-21 13:39:39 +01:00
Polina Boneva
fce78aea2c
Variables: Multi-select DataSource variables are inconsistently displayed in the Data source picker (#76039)
Always show multi-select DataSource(DS) variables in the DS picker, and display a warning in the panel when a DataSource variable holds multiple values and is not being repeated.

---------

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-03-18 10:30:27 +01:00
Gilles De Mey
8765c48389
Alerting: Remove legacy alerting (#83671)
Removes legacy alerting, so long and thanks for all the fish! 🐟

---------

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Co-authored-by: Sonia Aguilar <soniaAguilarPeiron@users.noreply.github.com>
Co-authored-by: Armand Grillet <armandgrillet@users.noreply.github.com>
Co-authored-by: William Wernert <rwwiv@users.noreply.github.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-03-14 15:36:35 +01:00
ismail simsek
240480ac9b
Chore: Add a key prop to warning component to prevent "should have a unique key prop" error (#83340)
add a key prop to prevent "should have a unique key prop" warning/error on the browser console
2024-02-23 23:57:12 +02:00
Torkel Ödegaard
64e0a4282e
DataQuery: Track panel plugin id not type (#83091) 2024-02-21 09:38:42 +01:00
Ashley Harrison
ffb9a4de4a
Chore: some test type fixes (#82889)
* some test type fixes

* ignore table-old since it's an angular panel that will be removed
2024-02-16 14:35:26 +00:00
Ashley Harrison
765a1f8533
Chore: fix some bad uses of userEvent (#82191)
* fix some bad uses of userEvent

* wrap advance call in act

* don't use act

* remove skip

* need act here (see https://kentcdodds.com/blog/fix-the-not-wrapped-in-act-warning#1-when-using-jestusefaketimers)

* remove test that isn't correct anymore

* implement same change in grafana-prometheus
2024-02-09 10:04:35 +00:00
Sergej-Vlasov
3605d85c4c
Dashboards: Remove advancedDataSourcePicker feature toggle (#81790)
* remove advancedDataSourcePicker feature toggle from DataSourcePickerWithPrompt

* remove advancedDataSourcePicker toggle from DataSourcePicker and adjust tests that relied on old picker

* adjust failing tests in QueryVariableEditorForm

* move DataSourceDropdown to DataSourcePicker file

* covert style declaration syntax to object style in DataSourcePicker

* remove advancedDataSourcePicker  feature flag from registry

* remove .only from test

* adjust QueryVariableEditor test to avoid console.error
2024-02-06 09:20:07 +00:00
Ashley Harrison
dcf58555e8
Chore: Some test type fixes (#81812)
some test type fixes
2024-02-05 09:47:30 +00:00
Piotr Jamróz
572c182a81
Unify frontend monitoring (#80075)
* Unify frontend monitoring

* Add missing mock

* Add missing mock

* Keep source:sandbox

* Create separate logger for plugins/sql package

* chore: rename "logAlertingError" to "logError"

* Use internal Faro logging for debugging instead of redundant browser logging

* Post-merge fix

* Add more docs about debug levels

* Unify logger names

* Update packages/grafana-runtime/src/utils/logging.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Update packages/grafana-runtime/src/utils/logging.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2024-02-01 15:08:40 +01:00
Dominik Prokop
f77c831e3f
Data query: Allow logging panel plugin id when executing queries (#81164)
* Data query: Allo logging panel plugin id when executing queries

* Update tracing header middleware

* Test fix

* Add panelPluginType to query analytics

* Cleanup
2024-01-30 00:06:31 -08:00
Nathan Marrs
138079bbd8
Transformations: Fix regression where disabling single transformation would display "No data" (#81320) 2024-01-26 09:14:59 -08:00
Fabrizio
522519f671
Tempo: Decouple Tempo from Grafana core (#79888) 2024-01-16 11:36:40 +01:00
Torkel Ödegaard
8157711893
DashboardDataSource: Implement sharing logic inside the data source (#80526)
* Make dashboard data source query actually use DashboardDataSource

* remove commented out bit

* Always wrap SceneQueryRunner with SceneDataTransformer

* Update Dashboard model compat wrapper tests

* DashboardQueryEditor test

* VizPanelManager tests update

* transform save model to scene tests update

* Betterer

* PanelMenuBehavior test update

* Few more bits

* Prettier

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-01-15 16:43:30 +01:00
Ashley Harrison
d5db67a073
Chore: type improvements (#80464)
* type improvements

* some more fixes

* add TODOs to remove type assertions
2024-01-15 14:29:39 +00:00
Jo
c60a1dddc2
Analytics: Fix metanalytics sending 'undefined' to backend (#80127)
* fix metanalytics sending 'undefined'

* revert panelId defined

* Update public/app/features/query/state/queryAnalytics.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* finish fix

---------

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2024-01-08 17:06:06 +01:00
Ida Štambuk
a255058ccf
Query Editor: Display error even if error field is empty (#79943) 2024-01-03 11:31:59 +01:00
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
Dominik Prokop
73eab8fcd6
DashboardScene: Data source and query options edit for a panel (#79267)
* Scenes bump

* Refactor query group components so that they are reusable

* Basic queries rendering and datasource change

* Store last used ds in local storage

* maxDataPoints and minInterval queries options

* Progress on query options

* Query options tests

* Allow panel inspection / queries inspection from panel edit

* Add counters to data pane tabs

* Betterer update

* Handle data source changes

* Minor fixes

* Data source change tests

* Handle scenario of data source change when transformations are in place

* Review comment

* Fix test
2023-12-19 05:51:19 -08: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
Giuseppe Guerra
da117aea1c
Plugins: Allow disabling angular deprecation UI for specific plugins (#77026)
* Plugins:Allow disabling angular deprecation UI for specific plugins

* add backend test

* changed test names

* lint

* Removed angular properties from DataSourceDTO

* Update tests

* Move angularDetected and hideAngularDeprecation in angularMeta property

* Fix angular property name in AppPluginConfig

* Fix reference to angularMeta.detected

* Fix hide_angular_deprecation not working for core plugins

* lint
2023-11-10 11:44:54 +01:00
Aditi Patel
95f5bab39b
i18n: Markup QueryEditorRow Component for translations (#76312)
* feat: added markup for query operation header

* chore: generated markup files

* feat: markup PostpreSql cheat sheet

* chore: generated markup files

* chore: removed markup from cheatsheet file

* chore: generated markup files

* chore: added i18n for Data source plugin does not export any Query Editor component

* chore: updated i18n markup files.

* fix: added prefix for for drag and drop label
2023-11-10 09:46:32 +01: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
Torkel Ödegaard
73a675af02
DashboardScene: Inspect panel data tab (#74646)
* Refactor data tab to be usable from scenes

* DashboardScene: Inspect data tab

* Everything seem to work now

* don't change drawer size in this PR

* Remove uncommented code

* Fix layout issues for data actions

* Added comment explaining retry
2023-09-11 16:11:22 +02: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
Giordano Ricci
53867e3fcd
Dashboards: relabel add query button (#73607) 2023-08-22 14:47:45 +01:00