Commit Graph

349 Commits

Author SHA1 Message Date
Tobias Skarhed
1c2065af60
PanelChrome: Improve accessibility landmark markup (#85863)
* Add section and use Text component to get h2 for panel

* Remove heading when collapsible

* Make button text truncate

* Update test

* Remove labelledby as it is not needed anymore

* Use testid selectors in test

* Remove async
2024-04-17 16:44:07 +02:00
renovate[bot]
c1b8ee8453 Update dependency typescript to v5.4.5 2024-04-12 15:06:30 +02:00
renovate[bot]
a5cd88c67e
Update dependency typescript to v5.4.3 (#84470)
* Update dependency typescript to v5.4.3

* refactor: solve TS errors

* refactor: update yarn.lock

* refactor: return type

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Laura Benz <laura.benz@grafana.com>
2024-04-12 14:46:47 +02:00
renovate[bot]
b1ad46e426 Update dependency @types/node to v20.12.7 2024-04-10 15:26:09 +00:00
Kristina
5305316f5a
Explore: Move Query History to be screen wide (#84321)
* WIP

* Use splitpanewrapper for drawer

* Get rich history pulling from multiple datasources

* highlight pane

* Fix datasource data handling

* create ds/explore map, move around ds lookup

* Handle no filters

* Fix tests and some errors

* Fix context menu issue

* (Poorly) enable scrolling, fix onClose to function

* Remove highlighting, use legacy key, fix casing

* fix filtering to handle non-simple data

* Fix linter, add translations

* Fixing tests~~

* Move to explore drawer and fix some more tests

* Kinda fix drawer stuff?

* Fix remaining card tests

* Fix test

* Fix tests

* Partially fix starred tab tests

* Fix integration tests

* Fix remaining tests 🤞

* Add a test and a clarifying comment behind a couple hooks

* Remove unused code

* Fix button styling and fix animation (but break width)

* Make Drawer using parent width (100%)

* Fix tests and some small catches

* Add tests for selectExploreDSMaps selector

---------

Co-authored-by: Piotr Jamroz <pm.jamroz@gmail.com>
2024-04-09 07:36:46 -05:00
Bogdan Matei
9d44c8e8cf
Add auto to refresh picker (#85584) 2024-04-05 18:31:40 +03:00
Nick Richmond
559fab9dc6
Prometheus: Fuzzy search for metric names in Code Mode (#85396)
* perf: limit metric names in Code Mode suggestions

* feat: configurable metric names limit

* feat: code mode autocomplete info/disclaimer

* chore: put new functionality behind new feature toggle

* refactor: avoid type assertions

* refactor: avoid explicit `any`

refactor: type guards

* refactor: type guards

* chore: add testdata results

* fix: add missing feature toggle guard

* perf: prefer array access to `Array.prototype.at`

* test: add missing config override

* test: refactor for brevity & clarity

* perf: avoid unnecessary mapping

* chore: undo testdata changes

* fix: use correct limit; perf optimizations

* refactor: avoid unnecessary `async`s

* types: simplify

* test: add missing tests

* fix: avoid hardcoding

* test: update mock path

* docs: fix typo

style: remove formatting artifact

style: remove formatting artifact

style: remove formatting artifact

* fix: event scope regression

* style: refactor for clarity

* refactor: prefer `useCallback` to in-effect handler

* refactor: simplify & broaden `filter`

* refactor: rename file to keep with conventions

* chore: mirror Prometheus package changes in app

* refactor: prefer no `@ts-ignore`

* chore: update betterer results

* docs: use type in TSDoc `@link` without `@ts-ignore`

* test: add missing provider

* test: fix jest mock path

* fix: display disclaimer in empty input case
2024-04-04 23:38:23 +03:00
renovate[bot]
a360cf0c85
Update dependency @types/node to v20.12.2 (#85480)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-02 18:47:56 +03:00
grafana-delivery-bot[bot]
99b5671fbe
Release: Bump version to 11.1.0-pre (#85115)
"Release: Updated versions in package to 11.1.0-pre"

Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
2024-03-25 21:44:28 +02:00
Juan Cabanas
8d4ca72f2a
PublicDashboards: Scene migration (#84409) 2024-03-22 11:48:21 -03:00
Laura Benz
d8a116e696
ReturnToPrevious: Add e2e test (#83115)
* feat: add incomplete unit test

* refactor: add idea for unit test

* feat: create new e2e test

* feat: add some steps

* feat: add comment

* feat: complete prep work

* feat: complete clean up

* rebase

* feat: add more steps to test flow

* refactor: remove unit test

* refactor: clean up

* refactor: create a provisioned alert rule

* refactor: change location and content

* refactor: e2e test

* refactor: betterer

* refactor: move provisioned alert rule

* refactor: make provisioning file available remote

* refactor: clean up test

* refactor: move provisioned alert rule

* refactor: remove wait()

* feat: restructure first test and add more tests

* feat: add another provisioned alert rule

* feat: add a new test

* feat: complete new test

* refactor: replace data-testid in alert rules

* refactor: replace data-testid

* refactor: fix tests for drone

* refactor: fix third test after review

* refactor: fix last test

* temp

* refactor: improve some things

* refactor: adjust unit tests

* refactor: remove assertions for alert rule details view

* refactor: remove assertions

* refactor: add check for button text

* refactor: remove session storage

* refactor: apply changes from code review

* refactor: add codeowner

* refactor

* refactor

* refactor: clean up

* refactor: clean up

* refactor: clean up

* refactor: increase pa11y threshold for /alerting/list
2024-03-21 09:05:51 +01:00
Zoltán Bedi
a4fe7f39ea
E2E: Rewrite mysql tests to playwright (#83424)
* E2E: Rewrite mysql tests to playwright

* Fix lint

* Add more selectors and address comments

* Scope locators when locating text

* Don't run it 20 times

* Update new-datasource-variable to assert mysql
2024-03-19 23:07:48 +01:00
renovate[bot]
97156bb759 Update dependency @types/node to v20.11.30 2024-03-19 15:36:35 +00:00
Ashley Harrison
b1b65faf02
Variables: Support static keys in AdHocFiltersVariable (#83157)
* initial start

* don't use getTagKeysProvider

* some cleanup

* undo kinds adjustment

* simplify

* remove async declaration

* add description and a couple of unit tests

* add transformSaveModelToScene test

* add tests for AdHocVariableForm

* add tests for AdHocFiltersVariableEditor

* update to defaultKeys

* fix snapshots

* update to 3.13.3
2024-03-18 16:12:00 +00:00
Erik Sundell
ebcca97052
Annotation query: Render query result in alert box (#83230)
* add alert to annotation result

* cleanup

* add tests

* more refactoring

* apply pr feedback

* change severity

* use toHaveAlert matcher
2024-03-18 14:26:56 +01:00
Jack Westbrook
0acb400248
Chore: Remove unused rollup plugin dependencies (#84492)
* chore(runtime): remove unused rollup-plugin-terser dependency

* chore(packages): remove more unused rollup plugins
2024-03-15 12:02:27 +01:00
renovate[bot]
a8432aad3d Update dependency @types/node to v20.11.28 2024-03-15 10:28:53 +00:00
renovate[bot]
2420c5aa4d Update dependency @types/node to v20.11.27 2024-03-13 15:17:45 +00:00
renovate[bot]
3085d53802 Update dependency @types/node to v20.11.26 2024-03-12 09:32:25 +00:00
Erik Sundell
8c06c0dea7
Panel edit: Add e2e selectors to input fields (#83246)
add selectors for input fields
2024-03-12 09:17:41 +01:00
Ivan Ortega Alba
4a81a0388b
Playlist: run on Scenes (#83551)
* DashboardScene: Implement playlist controls

* Mock the runtime config properly

* PlaylistSrv: with state you can subscribe to (#83828)

---------

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-03-11 13:33:32 +01:00
renovate[bot]
534855d086 Update dependency @types/node to v20.11.25 2024-03-11 10:39:32 +00:00
Erik Sundell
a722b2608a
TimeZonePicker: Add e2e selector to change time zone settings button (#83248)
add selector to change time zone settings
2024-03-07 07:25:48 +01:00
renovate[bot]
e9a1150b35 Update dependency @types/node to v20.11.20 2024-02-26 17:19:05 +00:00
Jack Westbrook
15d83960ec
Chore: Align usage of tsconfig in yarn workspaces to 1.3.0-rc1 (#83160)
chore(tsconfig): align all usage in workspaces to 1.3.0-rc1
2024-02-22 15:30:20 +01:00
grafana-delivery-bot[bot]
8f3d49687e
Release: Bump version to 11.0.0-pre (#83119)
"Release: Updated versions in package to 11.0.0-pre"

Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
2024-02-20 19:02:36 +00:00
renovate[bot]
23a3fddca4 Update dependency @types/node to v20.11.19 2024-02-15 17:31:16 +00:00
renovate[bot]
749a31738d Update dependency @types/node to v20.11.18 2024-02-15 11:03:03 +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
Victor Marin
1fe32479d7
Scenes: Annotations functionality in settings (#81361)
* wip listing/viewing annotations

* list annotations in settings

* fix tests

* wip edit mode

* PR mods

* move, delete, edit, add new

* edit annotation in settings

* Annotations functionality

* revert change

* add ui tests, move angularEditorLoader

* remove flaky test

* refactor

* bump scenes version, refactor getVizPanels, refactor edit page

* fix nav breadcrumbs

* annotation set dirty flag, add overlay to edit view

* PR mods

* PR mods

* remove flaky test

* change dirty flag setting logic for anotations

* change button variants
2024-02-12 16:06:46 +02:00
renovate[bot]
ed9e26122a Update dependency @types/node to v20.11.17 2024-02-09 10:47:01 +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
a30f8645d1
Chore: Migrate frontend platform code to use data-testid for selectors (#81787)
* migrate some stuff from aria-label to data-testid

* convert styles to objects

* fix unit tests

* empty commit to kick drone now enterprise branch is there
2024-02-02 13:26:37 +00:00
renovate[bot]
ab6aa8fe2f Update dependency @types/node to v20.11.16 2024-02-02 09:54:54 +00:00
Ivan Ortega Alba
a9f17a3f24
QueryVariable: Be able to edit the variable using scenes (#80847) 2024-01-31 13:31:08 +01:00
renovate[bot]
ae7d8624e9 Update dependency @types/node to v20.11.13 2024-01-31 00:36:16 +00: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
renovate[bot]
34e88077aa Update dependency @types/node to v20.11.10 2024-01-29 10:19:19 +00:00
Nathan Marrs
138079bbd8
Transformations: Fix regression where disabling single transformation would display "No data" (#81320) 2024-01-26 09:14:59 -08:00
renovate[bot]
2febbec758 Update dependency @types/node to v20.11.7 2024-01-26 10:36:43 +00:00
renovate[bot]
7dd89134dc
Update dependency typescript to v5.3.3 (#81096)
* Update dependency typescript to v5.3.3

* update ApiKeysPage

* fix remaining conflict in lockfile

* update sdk

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-01-24 15:33:54 +00:00
renovate[bot]
3656657afc
Update dependency @types/node to v20.11.6 (#81133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-24 13:27:02 +00:00
Oscar Kilhed
57ba8dc75d
Scenes: Add transformation flow for panel edit (#80738)
* Adding transformations works

* Use source data as data input for transformation settings, add search box suffix

* remove useCallback that are probably not needed, fix tests

* remove unused import

* add tests for adding and removing transformations

* use view all constant

* Add reordering functionality

* Fix removing one transformation removes all consecutive transformations

* use closeDrawer function

* Add tests for changing transformations

* Remove any

---------

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2024-01-24 14:14:48 +01:00
Brendan O'Handley
639bf3036d
Prometheus: Add e2e tests for decoupling (#80333)
* update selectors for prom

* add selector to switch component, needs id instead of testid

* add testid and ids to Prom settings

* add e2e tests for prom config

* add config to editor test

* export select function

* start query editor spec

* clean up describe

* add selectors for general query editor

* add selectors to components in options in best locations

* wrap header switch in id because component doesn't accept testid nor id

* add id to wrap legend components in one selector

* update selector in shared folder component, note to change in shared library

* update selector in shared folder component, note to change in shared library

* add notes for selectors in shared folder

* add tests and file for query editor

* add selectors for metrics browser in code editor

* add selector to component to open metrics browser

* add selectors to components within the metrics browser

* add tests for metrics browser and stub resource calls

* add selectors to query builder components

* add e2e tests for query builder

* generic query builder test with hints

* add selectors for more code editor parts

* add test for code and update selector

* fix tests with selector

* remove shared folder changes and use data-testid where possible

* remove unused import

* share getResources

* create variable query editor selectors

* add selectors to the variable query editor

* add e2e tests for the Prometheus variable query editor

* fix test function

* refactor add data source method

* add annotation selectors

* add selectors to annotation components

* add annotation e2e tests

* commit for yarn i18n:extract error in drone
2024-01-22 08:42:24 -06:00
Kyle Cunningham
4d6069583e
Transformations: Move transformation help to drawer component (#79247)
* Move help to drawer component

* Update component name

* Flip hierarchy of transformation name and help description
2024-01-19 12:47:05 +02:00
Haris Rozajac
f285eb6717
Time Range: Copy-paste Time Range (#80107)
* Working copy-paste functionality with validation

* WIP; uses 't c' shortcut to copy time range

* shortcuts working for explore and dashboards

* cleanup

* Don't update url when pasting in explore

* Error handling, sync pane functionality, add to help modal

* cleanup

* add tests

* fix i18n

* Diferrentiate between explore and dashboard paste events; make on error prop generic

* Fix

* extract getting the copied time range logic into a function

* Remove comments

* Make error handling generic; markup for translations

* Additional translation markup

* markup for aria-label

* Fix test

* Replace fireEvent with userEvent

* fix translations to match the standard pattern

* Refactor keybindingSrv and TimeSrv to remove PasteTimeContext

* Fix test

* Remove unneccessary aria labels; update icons; buttons inline
2024-01-18 14:06:27 -07:00
renovate[bot]
3903d3eb94
Update dependency @types/node to v20.11.5 (#80813)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-18 14:33:36 +00: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
renovate[bot]
dd7259b77e Update dependency tslib to v2.6.2 2024-01-17 13:41:12 +00:00