Commit Graph

333 Commits

Author SHA1 Message Date
Ivan Ortega Alba
5460d75e74 QueryVariableEditor: Select a variable ds does not work (#83144) 2024-02-21 17:57:53 +02: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
Dominik Prokop
f016f95298 GroupBy variable core integration (#82185)
* Bump scenes

* Make GroupByVariableModel a VariableWithOptions

* Serialise/deserialise group by variable

* WIP: Group by variable editor

* WIP tests

* Group by variable tests

* add feature toggle and gate variable creation behind it

* Fix types

* Do not resolve DS variable

* Do not show the message if no DS is selected

* Now groupby has options and current

* Update public/app/features/dashboard-scene/settings/variables/components/GroupByVariableForm.test.tsx

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

* don't allow creating groupby if toggle is off + update tests

* add unit tests

* remove groupByKeys

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-02-14 09:18:04 -08:00
Ivan Ortega Alba
3d86d101b7 Dashboards: Use auto and only use AdHocFiltersVariable to manage filters (#81318) 2024-02-13 22:38:26 +02:00
Ashley Harrison
af8ea896d0 GroupBy: add new groupby variable type and optional groupByKeys (#81717)
* add new groupby type

* rename to groupByKeys + introduce GroupByVariableModel

* fix unit test

* update scenes package

* update interface

* update fixture

* update unit test

* bump to scenes 2.6.2

* remove baseFilters for now
2024-02-07 11:14:04 +00:00
Ashley Harrison
28b336ac80 DockedMegaMenu: Clean up toggle and old code (#81878)
* remove toggle

* remove code not behind toggle

* remove old MegaMenu

* rename DockedMegaMenu -> MegaMenu and clean up go code

* fix backend test

* run yarn i18n:extract

* fix some unit tests

* fix remaining unit tests

* fix remaining e2e/unit tests
2024-02-06 13:43:11 +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
Ivan Ortega Alba
a9f17a3f24 QueryVariable: Be able to edit the variable using scenes (#80847) 2024-01-31 13:31:08 +01:00
Alexa V
e3a648e107 Dashboard: Migration - EditVariable Settings: Implement Interval Variable (#81259)
* Extract logic from core IntervalEditor and create a new Form to be shared between scenes and core
* Implement IntervalVariableEditor and refactor some utils functions
* Add unit test
2024-01-29 16:53:09 +01:00
Alexa V
2774e0d023 Dashboard: Migration - EditVariable Settings: Implement DataSource Variable (#80885)
* Extract DatasourceVariableForm logic and use it in core grafana

* Implement DataSourceVariable editor in scenes

* Refactor VariableSelect and add unit test for DataSourceVariableEditor

* Refactor old unit test to use userEvent and mock getDataSourceSrv
2024-01-25 12:56:37 +01:00
Alexa V
4b113f87f9 Dashboard: Migration - EditVariable Settings: Implement Constant Variable (#80743)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-01-18 11:04:29 +01:00
Ivan Ortega Alba
3b401d0d4d CustomVariable: Be able to edit them using scenes (#80193)
---------
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2024-01-17 19:14:01 +02:00
Alexa V
6c609051a0 Dashboard: Migration - EditVariable Settings: Implement TextBox Variable (#80293)
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-01-16 12:38:34 +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
Jamin
66c85d9826 Frontend: Migrate LoadingIndicator.tsx from aria-label e2e selectors to data-testid (#79664)
* refactor: update component to use data-testid

* refactor: update loading indicator e2e selector

* oops - forgot to update betterer results

* update loading indicator in variable picker

---------

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2024-01-12 18:30:11 +02:00
Ivan Ortega Alba
e9f1b41d23 EditVariable: Add base form to edit variables (#80172) 2024-01-12 12:01:11 +02:00
Jára Benc
315dd75767 Dashboards: Skip inherited object variable names (#79567) 2023-12-19 15:08:28 +01:00
Torkel Ödegaard
f7429b79ba Variables: Interpolate variables used in custom variable definition (#78800)
* Variables: Interpolate variables used in custom variable definition

* Update

* Fixing tests
2023-12-19 14:23:57 +01:00
kay delaney
31d79c0502 Templating: Json interpolation of single-value default selection does not create valid json (#79137) 2023-12-14 11:42:36 +01:00
Leon Sorokin
09cef892a5 OptionsPicker: Use fuzzy search and improve ranking of matches (#79286) 2023-12-12 16:41:50 -06:00
Dominik Prokop
c30098e772 QueryVariable: Always run queries with dashboard time range (#79056) 2023-12-05 06:06:26 -08:00
Ivan Babrou
860b3bbce7 Dashboards: Implement natural sort for query variables (#78024) 2023-11-21 10:17:38 +01:00
Torkel Ödegaard
f7e5689305 Variables: Add support for aliasIDs to datasource variables (Fixes issue with Postgres datasource variables) (#78170)
* Variables: Add support for aliasIDs to datasource variables

* remove file
2023-11-15 11:18:21 +01:00
Josh Hunt
2f2be24e01 Chore: Remove unnecessary type assertions (#78009)
* Chore: Remove unnecessary type assertions

* betterer
2023-11-14 09:17:29 +00:00
Josh Hunt
4a3c148298 Chore: Stricter typing in type guards (#77809)
* Stricter typing in type guards

* create utility isObject fn

* better isAlertStateWithReason

* better name

* restore "data !== undefined"
2023-11-13 16:11:54 +00:00
Ashley Harrison
40fd80c46f Chore: Various type improvements (#77877)
* more datasource type fixes

* more type updates
2023-11-09 17:39:02 +00:00
kay delaney
375dcc3813 Chore: Change VariableModel to TypedVariableModel in most places (#76690) 2023-11-08 22:15:29 +00: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
Alex Khomenko
25779bb6e5 Stack: Use the component from grafana/ui (#77543)
* grafana/ui: Move Stack out of unstable

* grafana/ui: Replace imports

* Replace the import from experimental

* Cleanup

* Remove invalid prop

* Add flexGrow

* Remove Stack used in Field

* Remove import
2023-11-06 18:15:52 +02:00
Jacob Zelek
6bf4d0cbc6 DashboardGrid: Add support to filter panels using variable (#77112)
* DashboardGrid panel filter

* Missed segment and changes per PR discussion

* Hide feature flag from docs

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2023-11-03 05:15:54 -07:00
Joao Silva
f183e68b1c GrafanaUI: Move Box out of unstable and into GrafanaUI (#77080) 2023-10-26 13:46:11 +01:00
Ashley Harrison
5f2fd8935d Spinner: Fix so that the size property is correctly applied (#77135)
* correctly apply spinner sizes, refactor to have standard sizes

* better prop definitions so constant values show in IDEs

* 12 is xs, not sm
2023-10-25 15:39:32 +01:00
Torkel Ödegaard
b01cbc7aef Dashboard: Fixes save drawer always comparing changes against first loaded version (#76506)
* Dashboard: Fixes save changes diff after first save

* Lots of type issues

* better fix

* Update some more places to use new function

* Fix

* Update

* Update

* remove console.log

* Update
2023-10-13 16:23:23 +02:00
Dominik Prokop
d00410560a Custom variable: Initialize options from query if not present in persisted model (#76403)
* Custom variable: Initialize options from query if not oresent in persisted model

* Test update
2023-10-12 01:30:29 -07:00
Torkel Ödegaard
963049e2b7 Loki: Fixes chained template variable queries for scene apps (#75880)
* Loki: Fixes chained template variable queries for scene apps

* Remove bit
2023-10-04 12:47:25 +02:00
Ashley Harrison
a2964731eb Navigation: Change dashboard settings to use tabs when dockedMegaMenu is enabled (#75463)
* kinda working

* return to selected parents

* feature toggle everything

* fix toggling of annotations

* use Trans instead of Text

* kick drone
2023-09-28 16:15:00 +01:00
Isabella Siu
4cc72a22ad OpenSearch: Add timeRange to parameters passed to getTagValues (#74952) 2023-09-25 09:57:39 -04: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
Andreas Christou
c78d5fa4e3 Update QueryVariableEditor layout (#75099)
* Allow setting legend header style and add container

* Use Box and Text components

* Minor element update

* Use box instead of div
2023-09-22 11:04:22 +01:00
Alexa V
ae32d43e2b Dashboard: Fix Regression detected in time range variables under the refactorVariablesTimeRange feature flag (#74125) 2023-09-20 11:00:46 +02:00
Torkel Ödegaard
6a37a56d68 AdHocFilters: Clean-up unused prop from type (#74960)
* AdHocFilters: Clean-up unused prop from type

* Fix test
2023-09-19 16:01:30 +02:00
Torkel Ödegaard
1105b93104 AdhocFilters: Improve typing and signature of getTagKeys and getTagValues and behaviors (#74962)
* Add adhocFilters to DataQueryRequest

* More changes

* Progress

* Working

* added baseFilters to picker

* Remove unused code

* minor fix
2023-09-19 08:24:45 +02:00
Andrej Ocenas
f6f47678a4 QueryRunners: Bind the query function where it is passed on (#73399) 2023-09-18 17:00:43 +02: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
kay delaney
3777ae0275 AdHocVars: Allow selecting datasource variable from data source picker (#74192) 2023-09-04 18:10:15 +03:00
Andrej Ocenas
dc6675cade Template Variables: Fix conversion from non standard data to dataFrame (#73486) 2023-08-30 10:01:32 +02:00
Alexa V
97c3cd1af3 Dashboard: Fix Variable Dropdown to Enforce Minimum One Selection when 'All' Option is Configured (#69839) 2023-08-28 14:38:32 +02:00
Yelmor
8e7fa50775 Dashboard: Variables Dropdown - Fix Flickering on Refresh (#72566) 2023-08-16 17:32:48 +02:00
Fabrizio
0f402347aa Fix error message for variable names (#72580) 2023-08-14 11:34:54 +02:00