Commit Graph

448 Commits

Author SHA1 Message Date
Joey Tawadrous
5aacc7cc2a
Traces: More feature tracking (#51686)
* Added tracing for json upload, service graph, loki queries

* Tracking for node graph expand/collapse

* Tracking for traceID expand/collapse

* Updated betterer.results

* Update tests

* Updated betterer.results

* Fixed?

* Fix for test

* Update report interaction key for loki expr

* Change grafana_traces_search_queried limit to resultLimit as limit is reserved keyword
2022-07-11 10:21:24 +01:00
Leon Sorokin
fda7f064ad
GraphNG: uPlot 1.6.22 (#51945) 2022-07-08 09:45:16 -04:00
Josh Hunt
0c88850070
Chore: Sync betterer results (#51963) 2022-07-08 14:19:17 +01:00
Ieva
0c33b9f211
Access control: Allow organisation admins to add existing users to org (#51668)
* check users with user add permission to access the invite endpoint

* undo unneeded changes

* tests and cleanup

* linting

* linting

* betterer

* betterer again

* fix prettier issue

Co-authored-by: jguer <joao.guerreiro@grafana.com>
2022-07-08 12:07:00 +01:00
Isabella Siu
8dd8c50dc4
CloudWatch: Add default log groups to config page (#49286)
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
2022-07-07 13:03:02 -04:00
ismail simsek
885c517983
Plugins: InfluxDB variable interpolation fix (#51917)
* Don't use regex on flux mode while applying template variables
2022-07-07 17:16:35 +02:00
Torkel Ödegaard
849134b5dd
Scene: Small refactorings and name changes (#51866)
* Rename onMount and onUnmount and some other small refactorings

* More refactorings fixing typescript issues
2022-07-07 16:49:05 +02:00
Ivana Huckova
10cb84e401
Loki: Implement hints for query builder (#51795)
* Loki: Implement hints for query builder

* Update name of file

* Update imports

* Refactor

* Remove unused import

* Unify

* Revert "Unify"

This reverts commit 78da0e27e3.

* Unify

* Fix types

* Fix tests

* Fix type error

* Simplify

* Update test

* Add documentation

* Update comment

* Add tests for addParserToQuery

* Smaller updates
2022-07-07 15:49:31 +02:00
Levente Balogh
99de3313f7
Datasources: Refactor the list page (#51438)
* refactor(Data Sources): rename file to follow naming convention

* refactor: use react-redux hooks for interacting with the store

* tests: update data-sources list related test files

* refactor: extract datasource list page contents

* refactor: pass dataSources to the DataSourcesList as a prop

* refactor: use proper typing for navIndex mocks
2022-07-07 11:15:34 +02:00
Torkel Ödegaard
935334cbda
Scene: POC for a future dashboard model and runtime (#50980)
* Playing around

* This is getting interesting

* Updates

* Updated

* Observable experiments

* This is tricky

* VizPanel panel renderer

* New model progress

* Maybe this could be something

* Updated

* Rename

* updates

* Updated

* Query runners? not sure

* Updated

* updates

* flex box layout starting to work

* Testing

* Tested an action

* Parent context sort of working

* Progress

* Progress

* Updated

* Starting to work

* Things are working

* Scene list, nested scene demo

* Progress on repeats

* Moving things

* Pretty big progress

* More things working

* Great progress

* Progress

* Name changing

* Minor tweaks

* Simplified sizing

* Move toggleDirection to SceneFlexLayout

* add feature flag (#50990)

* removed new useObservable hook

* Rename folder and feature toggle to scenes

* Caching scenes so you can go back to another scene without having to re-query data

* Fix issue with subs on re-mount

* Fixing test

* Added SceneCanvasText to play around with layout elements with size based on content

* Scene: Edit mode and component edit wrapper that handles selection  (#51078)

* First step for scene variables

* Started playing around with a scene edit mode

* Better way to set component

* Progress on edit mode

* Update

* Progress on edit mode

* Progress on editor

* Progress on editor

* Updates

* More working

* Progress

* Minor update

* removed unnessary file

* Moving things around

* Updated

* Making time range separate from time picker

* minor rename of methods

* The most basic variable start

* Minor renames

* Fixed interpolate issue if not found at closest level

* An embryo of event model and url sync handling

* Update url sync types

* Removed unnessary any type arg

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-07-07 08:53:02 +02:00
Torkel Ödegaard
4f931afe29
Betterer: Rebuild better results file as it was corrupt (#51861) 2022-07-07 08:32:56 +02:00
owensmallwood
0b4af38bfa
Public Dashboards: Query Caching (#51403)
* passes id and uid to PublicDashboardDatasource

* betterer results

* If for a public dashboard, return the PublicDashboardDataSource first or else getDatasourceSrv.get() will fail bc of no authed user.

Added some unit tests for resolving the uid from the many possible datasource types.

* updates betterer

* Exports DashboardService. Adds method to DashboardService to build anonymous user for use with public dashboards where there is no authed user. Adds method on dashboard_queries to get all dashboard uids from a dashboard.

* refactors to get unique datasource uids

* Adds tests for getting all unique datasource uids off a dashboard

* adds test for building anonymous user with read and query actions that are scoped to each datasource uid in the dashboard

* updates casing of DashboardService

* updates test case to have additional panel with a different datasource

* gives default interval to public dashboard data source
2022-07-06 12:42:39 -06:00
Kevin Yu
b5eef488ce
Cloud Monitoring: Update LabelFilter to use experimental UI components (#51342)
* add label filter

* add tests

* define labels once

* update betterer results
2022-07-06 11:28:54 -04:00
Torkel Ödegaard
1e85a6f4fd
TopNav: New page layouts (#51510)
* First stab at new page layouts behind feature toggle

* Simplifying PageHeader

* Progress on a new model that can more easily support new and old page layouts

* Progress

* rename folder

* Progress

* Minor change

* fixes

* Fixing tests

* Make breadcrumbs work

* Add tests for old Page component

* Adding tests for new Page component and behavior

* fixing page header test

* Fixed test

* AppChrome outside route

* Renaming folder

* Minor fix

* Updated

* Fixing StoragePage

* Fix for banners

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-06 17:00:56 +02:00
Joey Tawadrous
45a00bdc94
Traces: Move towards using OTEL naming conventions (#51379)
* Updates names

* Update tests

* Update betterer results

* Updated betterer.results

* Updated tests
2022-07-06 11:12:53 +01:00
Joey Tawadrous
01130f22b7
Traces: Span bar label (#50931)
* Add SpanBarSettings

* Add SpanBarSettings to Jaeger

* Add SpanBarSettings to Zipkin

* Updated title

* Add dropdown to select identifer and make duration a default option

* Show duration by default

* Add option to hide

* Move identifers into constants

* Add process

* Update text

* Update placeholders

* Text/meta data updates

* Added tests

* Added docs

* Update find

* Merge tag and prcoess options

* Update docs

* Updated tests

* Update betterer results and trace view to match

* Updated docs
2022-07-06 08:14:03 +01:00
Alexander Zobnin
21591be469
Geomap: Support shared crosshair for route layer (#51495) 2022-07-06 10:08:55 +03:00
Josh Hunt
ffd9d9d0c5
Chore: Refactor logs_model to clean up types (#51201)
* Chore: Minor refector of logs_model to clean up types

* undo a change i didn't commit to

* use isObservable instead

* fix type
2022-07-06 08:49:45 +02:00
Ryan McKinley
4a00c7ebde
Storage: Add basic file upload management (#50638) 2022-07-05 10:53:41 -07:00
eledobleefe
13fbe6ed28
Storybook: Add documentation to PluginSignatureBadge story (#51645)
* Import the mdx documentation file to PluginSignatureBadge.story.tsx and add to its export defaul

* Create the mdx file of PluginSignatureBadge with its information

* Fix signed PluginSignatureBadge status

* Modify text according to reviewer suggestions

* betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-05 09:38:26 -04:00
Seyaji
500010e0b6
Chore: Convert QueryOperationRow test to RTL (#51290)
* Convert QueryOperationRow test to RTL

* Convert QueryOperationRow test to RTL

* Convert QueryOperationRow test to RTL

* Convert QueryOperationRow test to RTL

* Update QueryOperationRow.test.tsx

* update betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-05 08:10:20 -04:00
kay delaney
d4eef3bd76
TimeSrv: Don't modify refresh interval when editing panel (#51718) 2022-07-05 05:25:07 -04:00
Pawan Verma
920bd1e88d
Chore: Improve SecretInput story (#51665)
* Added mdx file for secret input

* Chore: Improve SecretInput story

* review related changes in docs

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-07-05 09:32:51 +01:00
Sriram
f78b7f1f17
TestDataDB: update CSV wave scenario ui (#51719)
* update testdb csv wave

* support enter key

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-07-05 04:57:32 +01:00
Ashley Harrison
986b766ca0
Chore: Make betterer tests more stable (#51703)
* rewrite eslint test to not care about position of errors

* changing file contents shouldn't require a betterer.results update

* fix up eslint test

* fix the undocumented stories test

* ignore .test.ts files as well
2022-07-04 12:13:20 +01:00
Ivan Ortega Alba
f8ac160545
DashboardRow: collapse shortcut doesn't allow to move the row (#51589) 2022-07-04 12:32:21 +02:00
Zoltán Bedi
ebb9025669
StateTimeline: Try to sort time field (#51569)
* StateTimeline: Try to sort time field

* Sort frame earlier
2022-07-04 10:11:33 +02:00
Seyaji
e88514beea
Chore: Convert SpanDetailsRow test to RTL (#51345)
* Convert SpanDetailsRow test to RTL

* Convert SpanDetailsRow test to RTL
2022-07-04 10:30:03 +03:00
Alexander Emelin
a2478c3a32
Search: Sort by updated at and created at (#50416)
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-30 16:33:30 -07:00
Scott Lepper
fa560d96b6
sql plugins - angular to react - base sql datasource (#51655)
* base sql datasource and components
2022-06-30 16:38:48 -04:00
Ryan McKinley
281ed419a8
Chore: add generics to backendSrv (#51606) 2022-06-30 14:34:23 -04:00
Ryan McKinley
c0f10af545
SearchV2: Use the same components for both SQL and bluge backends (#50125) 2022-06-30 12:45:45 -04:00
Gilles De Mey
d63ffa314e
Alerting: Fix normalization of alert states for panel annotations (#51637)
A bug introduced by #49259 would crash the annotations view of a panel with a linked alert rule. States are now normalized so crashes won't occur and the base state is used instead.
2022-06-30 10:46:54 -04:00
Ivana Huckova
66b4a9e6a1
Loki: Remove unused prop from query builder (#51504) 2022-06-30 16:02:27 +02:00
Gilles De Mey
a1fb73c503
Alerting: Adds contact point template syntax highlighting (#51559) 2022-06-30 14:01:02 +02:00
Konrad Lalik
117bac71f5
Alerting: Use folders' RBAC permission to control rules actions (#51434)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-30 13:00:29 +02:00
Ashley Harrison
2a6b32598d
Chore: some low-hanging type assertion fruit (#51618)
* some low-hanging type assertion fruit

* results
2022-06-30 10:40:00 +01:00
Leon Sorokin
3bd2bdcebb
DataFrame: more thorough detection of unsorted values (#51602) 2022-06-29 18:08:42 -05:00
user10x
39bd3e2fe3
rename logs_model.ts->logsModel.ts; update references (#51468) 2022-06-29 21:04:30 +02:00
Leon Sorokin
1f939f64e9
ColorScale: prevent vertical scrollbar in container during hover (#51591) 2022-06-29 14:34:12 -04:00
Nathan Marrs
b0f1d35708
Search: Refine clear tags UI #51590 2022-06-29 14:16:49 -04:00
Nathan Marrs
35240f6d5a
Annotations: Fix custom tag functionality (#51537) 2022-06-29 13:37:50 -04:00
Nathan Marrs
66c911f263
Canvas: Stop selecto box from triggering when programmatically selecting elements (#51579)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-29 13:19:48 -04:00
Nathan Marrs
5d9ffe54ee
Canvas: Enable multi-select via shift key 2022-06-29 10:00:58 -07:00
Seyaji
2473dc68f6
Chore: Convert KeyValuesTable to RTL (#51278)
* Convert KeyValuesTable to RTL

* Update data-testid

* Update data-testid

* Convert KeyValuesTable to RTL

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 16:44:48 +01:00
kay delaney
8053f770c1
Export: Fix export/import of dash with library panels (#49319) 2022-06-29 16:18:27 +01:00
Ashley Harrison
67802e64e6
keep the betterer message generic (#51563) 2022-06-29 15:57:49 +01:00
ismail simsek
0de544f3a2
Handle scalar and string resultType separately (#51411) 2022-06-29 16:43:33 +02:00
Michael Mandrus
7ef21662f9
Plugins: Show that Secrets Manager Plugin is active in the UI (#50953)
* add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not

* show disabled badge in front end if the plugin is not enabled

* Only show error in disabled badge hover if one is present (otherwise it shows "undefined")

* refactor to make use of fields already available in the DTO

* fix typo

* if there is no error returned for the plugin, just show 'disabled'

* fix typo

* Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* Update frontendsettings.go

add clarifying comment

* fix unit test

* rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled

* Update helpers.test.ts

revert test change

* fix unit test

* bogus commit to trigger precommit

* undo commit

* run precommit manually

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 08:48:23 -04:00
Polina Boneva
f83f05d6b3
Variables: variables in Markdown links are not interpolated (#51392)
* on a text panel first interpolate, then markdown, then sanitize;

* update devenv dashboard + e2e tests

* fix typo and undo changes in grafana/data

* handling of config option disableSanitizeHtml more readable when preparing markdown in text panel

* betterer

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-29 15:26:31 +03:00
Ashley Harrison
688164bbd6
Chore: add a betterer test for undocumented stories (#51444)
* add a betterer test for undocumented stories

* update results

* Update .betterer.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* update results

* prettier

* slightly nicer regexp

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-29 12:25:31 +01:00
Ivana Huckova
60454192b7
Loki: Add e2e test for query builder (#51314)
* Loki: Add e2e test for query builder

* Update

* Update test

* Update test

* Update test

* Update test

* Add more checks in test

* Update betterer

* Update betterer
2022-06-29 11:04:27 +02:00
Ashley Harrison
683bbc7373
Templating: Changing between variables with the same name now correctly triggers a dashboard refresh (#51490)
* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.ts

* user essentials mob! 🔱

lastFile:public/app/features/variables/pickers/OptionsPicker/actions.test.ts

* linting

* update betterer

Co-authored-by: kay delaney <kay@grafana.com>
2022-06-29 09:10:55 +01:00
Leon Sorokin
d32ec75661
HeatmapNG: expand log y axis min/max config to full powers (#51472)
also fix x bucket count setting for calculate (regressed in #51089)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-28 19:13:13 -05:00
Dominik Prokop
daf0e3cb4e
Bar chart: Fix stacking bug when data produces 0 accumulators (#51450)
* Don't divide by 0 ...

* Add test panel to gdev dashboard
2022-06-28 07:21:18 -07:00
Torkel Ödegaard
f047f7dcf6
TopNav: A possible approach having a TopNav that lives outside route (#51301)
* Add topnav in Route

* TopBar: Good progress on a approach that looks promising

* Added some elements to top level

* Get page nav from route

* Progress

* Making breadcrumbs slightly more real

* Updates

* Memoize selector

* Removed some console.log

* correctly type iconName

* betterer updates

* Change setting to hideNav

* Rename again

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-28 09:47:12 -04:00
Seyaji
37c6a0b3cb
Chore: Convert AccordianReferences test to RTL (#51274)
* Convert AccordianReferences test to RTL

* Convert AccordianReferences test to RTL

* Convert AccordianReferences test to RTL

* Convert AccordianReferences tests to RTL

* Convert AccordianReferences test to RTL

* fix betterer

* Convert AccordianReferences test to RTL

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-28 11:20:37 +01:00
Gilles De Mey
97c9b25d44
Alerting: Skip the default data source if incompatible (#51452) 2022-06-28 10:05:53 +02:00
Timur Olzhabayev
7c886fb6f9
Frontend Logging: Integrate grafana javascript agent (#50801)
Add Grafana Javascript Agent integration to Grafana
2022-06-28 03:25:30 -04:00
Ryan McKinley
b6a9b9804d
Plugin admin: Add a page to show where panel plugins are used in dashboards (#50909) 2022-06-27 20:23:43 -04:00
Leon Sorokin
fd6c7d518d
TimeSeries: Improved constantY rendering parity with Graph (old) (#51401)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-27 19:02:05 -05:00
Leon Sorokin
89b150ab58
HeatmapNG: pre-allocate arrays during calc (#51465) 2022-06-27 18:43:59 -05:00
Ryan McKinley
cfbfacb152
Heatmap: migrate old zero gap to one (#51467) 2022-06-27 19:13:09 -04:00
Ezequiel Victorero
99f921cf32
Public Dashboards: adding telemetry for Sharing Modal options and Public Dashboards events (#50834)
* Public Dashboards: adding telemetry for Sharing Modal options and Public Dashboards events
2022-06-27 12:33:30 -03:00
Ashley Harrison
ee3f4f1709
Navigation: Display Starred dashboards in the Navbar (#51038)
* remove feature toggle, add empty state and fix bug with initial starring

* Extract empty message into lingui

* remove full stop

* add empty message in the backend

* remove unused import

* translate starred + empty starred states

* betterer changes
2022-06-27 15:41:00 +01:00
Daniel Lee
292b24e30d
Piechart: Implements series override -> hide in area for the legend or tooltip (#51297)
* piechart: support series override for hiding legend item

* piechart: add support for hiding values in multi tooltip

* tidy up variable names

* piechart: typing for hideFrom variable

* betterer fixes
2022-06-27 15:13:19 +02:00
Dominik Prokop
b2b0be7b93
Table panel: Add multiple data links support to Default, Image and JSONView cells (#51162)
* Table panel: Support multiple data links in default cell

* Table panel: Show data links for Image and JSONView cells

* Simplify DataLinksContextMenu api

* Betterer
2022-06-27 05:23:29 -07:00
Dominik Prokop
4a397c9c24
Time series panel: Hide axis when series is hidden from the visualization (#51432)
* Time series panel: Hide axis when series is hidden from the visualization

* Fix snap
2022-06-27 08:17:46 -04:00
Joao Silva
f2d8b1ceee
Dashboards: Fixes issue with the initial panel layout counting as an unsaved change (#51315) 2022-06-27 12:30:59 +01:00
Nathaniel Saxe
683f31f2c6
Variables: improve performance of transformMetricFindResponse (#49360)
* improve performance of transformMetricFindResponse

* use lodash uniqBy for postgres

* use lodash uniqBy for mysql

* use lodash uniqBy for mssql

* hopefully conform to import linting rules

* Added .betterer.results

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Victor Marin <victor.marin@grafana.com>
2022-06-27 14:26:46 +03:00
Ashley Harrison
0124dc8e6b
Chore: reintroduce type assertion test + change emitted metric names (#51375)
* reintroduce type assertion test + change emitted metric names

* rename test to better eslint to be more generic
2022-06-25 07:45:38 -04:00
Ryan McKinley
c8f814196a
CommandPalette: Populate dashboard search when the palette is opened (#51293)
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2022-06-24 23:08:29 +02:00
Ivana Huckova
d3dd3042d6
Loki: Fix support of ad-hoc filters for specific queries (#51232)
* Loki: Refactor ad-hoc filters to use parser

* Remove renaming of files for easier review

* Update

* Update

* Add previously buggy test

* Fix tests

* Fix typos

* Update, improve typing

* Move reused code up

* Update order

* Update betterer statss
2022-06-24 22:29:22 +02:00
Artur Wierzbicki
c496b3e712
Search: Fix pagination in the new search page (#51366)
* Fix pagination in the new search

* update betterer betterer betterer betterer betterer betterer

* revert packagejson
2022-06-24 21:21:59 +04:00
Todd Treece
342344bb03
Variables: Selectively reload panels on URL update (#51003) 2022-06-24 13:06:36 -04:00
Leon Sorokin
7e1667ce87
HeatmapNG: explicitly pass scales for cursor sync config (#51389) 2022-06-24 11:42:39 -05:00
Connor Lindsey
620309ced5
Explore: Sort trace process attributes alphabetically (#51261)
* Explore: Sort trace process attributes alphabetically

* Update betterer?
2022-06-24 08:20:23 -06:00
Jguer
9a82ed7105
Remove LDAP specific example from team sync (#51368)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-24 15:29:50 +02:00
ismail simsek
c804639b53
Hide datalink button when datasource for exemplar is undefined (#51236) 2022-06-24 15:26:52 +02:00
Ashley Harrison
fa466e2134
Chore: comment out type assertions check due to bug (#51371)
* comment out type assertions check due to bug

* forgot to push the merge 🤦
2022-06-24 11:56:31 +01:00
Joey Tawadrous
adfe4ef564
Update betterer tests (#51370) 2022-06-24 11:21:03 +01:00
Ryan McKinley
588bd43e49
Chore: update betterer.results for heatmap rename (#51361) 2022-06-24 00:10:03 -07:00
Isabella Siu
497310a9cb
CloudWatch: Factor LogGroupSelector into a separate component (#50829) 2022-06-23 14:40:43 -04:00
Isabella Siu
8ba8e1df83
CloudWatch: fix variable query migration with json template variables (#51207)
* CloudWatch: fix variable query migration with json template variables

* fix error messages

* changes for reviews

* fix lint

* fix betterer
2022-06-23 14:23:56 -04:00
Ryan McKinley
a093250dd5
Chore: avoid implicit any by using inline functions (#51338) 2022-06-23 11:19:08 -07:00
Seyaji
91ee019140
Convert TimelineCollapser test to RTL (#51281) 2022-06-23 18:20:16 +01:00
Ezequiel Victorero
25d4ddf959
PublicDashboards: disable annotations (#50984)
* PublicDashboards: disable annotations
2022-06-23 13:09:30 -03:00
Ashley Harrison
64356509b5
upate betterer results again.... (#51336) 2022-06-23 17:49:28 +02:00
Josh Hunt
78ee9ffa37
Chore: Remove CI stats that are also reported by betterer (#51318)
* Chore: Remove CI stats that are reported by betterer

* update betterer results
2022-06-23 14:20:45 +02:00
Seyaji
ec1480b964
Chore: Convert DataSourceDashboards test to RTL (#51294)
* Convert DataSourceDashboards test to RTL

* Convert DataSourceDashboards test to RTL

* Convert DataSourceDashboards test to RTL

* Update public/app/features/datasources/DataSourceDashboards.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Convert DataSourceDashboards test to RTL

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-23 14:39:00 +03:00
Ashley Harrison
2705edf5f5
update betterer cache (#51317) 2022-06-23 13:26:31 +02:00
Ashley Harrison
ded3d53d89
Chore: Additional betterer tests for type assertions and explicit any (#45901)
* Add betterer tests to prevent adding more type assertions and explicit any's into the codebase

* update betterer results file

* better glob matching

* updated results

* update results again...

* use more up to date betterer packages

* they're devdeps...

* Commit latest betterer results

* latest .betterer.results

Co-authored-by: joshhunt <josh@trtr.co>
2022-06-23 11:36:20 +01:00
Polina Boneva
496c2e26f4
I18n: User and Org Preferences allow change of Language (#51175)
* add locale selection settings under preferences; Alpha feature toggle;

* extract components' ids for internationalisation references

* migrate OrgDetailsPage tests from Enzyme to RTL

* test locale selection in shared preferences

* fix OrgDetailsPage needing a fetch polyfill; "Real fetch shouldn't be being hit." - Josh

* remove snapshot

* remove snapshot
2022-06-23 11:20:31 +03:00
Seyaji
0b1a886b9d
Chore: Convert GraphTicks test to RTL (#51203)
* Convert GraphTicks test to RTL

* Convert GraphTicks test to RTL
2022-06-23 10:55:38 +03:00
Seyaji
a0949314ef
Convert AccordianLogsTest to RTL (#51260)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-22 19:00:04 +02:00
Seyaji
fe5416508a
Chore: Convert TracePageHeader test to RTL (#51216)
* Convert TracePageHeader test to RTL

* Convert TracePageHeader test to RTL

* Convert TracePageHeader test to RTL
2022-06-22 17:46:36 +01:00
Seyaji
d760b03784
Convert AccordianKeyValues test to RTL (#51257) 2022-06-22 17:42:04 +01:00
Seyaji
5ad3d10016
Convert CanvasSpanGraph test to RTL (#51180) 2022-06-22 14:46:01 +03:00
Seyaji
0bfd48c164
Chore: Convert DataLinks tests to RTL (#51137)
* Convert DataLinks tests to RTL

* Convert DataLinks test to RTL

* Convert DataLinks test to RTL

* Convert DataLinks test to RTL
2022-06-21 15:55:10 +01:00
Seyaji
bab017799e
Chore: Convert QueryOperationAction test to RTL (#51139)
* Convert QueryOperationAction test to RTL

* Convert QueryOperationAction to RTL

* Convert QueryOperationAction test to RTL
2022-06-21 15:53:10 +01:00
Seyaji
3710c9a7c8
Chore: Convert DataSourcesListPage test to RTL (#51138)
* Convert DataSourceListPage test to RTL

* Convert DataSourceListPage test to RTL
2022-06-21 11:47:54 +01:00
Seyaji
902101c524
Chore: Convert PanelHeaderCorner test to RTL (#51074)
* export props

* Convert PanelHeaderCorner test to RTL

* Update public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-20 14:54:13 +02:00
Seyaji
606732dd5e
Chore: Converts ButtonRow tests to RTL (#51068) 2022-06-20 15:46:11 +03:00
Seyaji
e4f4cc4a32
Chore: Convert pageActionBar test to RTL (#51073)
* Convert pageActionBar test to RTL

* add test for conditional render of button
2022-06-20 15:42:56 +03:00
Seyaji
244650835e
Refactor 'Basic Settings' test to RTL from Enzyme (#51059)
* Refactor 'Basic Settings' test to RTL from Enzyme

* Update public/app/features/datasources/settings/BasicSettings.test.tsx

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Refactor 'Basic Settings' test to RTL from Enzyme

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-18 13:13:51 +03:00
Ashley Harrison
3430928294
Convert InviteesTable test to RTL (#50674) 2022-06-15 09:54:26 +01:00
Joey Tawadrous
f87927c82e
Traces: Add absolute time to span details (#50685)
* Show absolute time

* Add test
2022-06-14 11:13:33 +01:00
Alex Khomenko
701edcdc46
UserListPage: Convert tests to RTL (#50717) 2022-06-14 11:39:43 +03:00
Ashley Harrison
d23bc5c390
Convert ApiKeysAddedModal test to RTL (#50669) 2022-06-13 14:52:17 +01:00
Alex Khomenko
fd239f94e8
TeamSettings: Convert tests to RTL (#50513) 2022-06-10 09:50:53 +02:00
Ashley Harrison
6da4feb2a9
Convert OrgProfile test to RTL (#50525) 2022-06-09 16:07:40 +01:00
Alex Khomenko
ffb8ae4900
TeamPages: Convert tests to RTL (#50429)
* TeamPages: Setup tests

* TeamPages: Finalise tests

* TeamPages: Add missing test
2022-06-08 19:05:27 +03:00
Kevin Yu
8bd56b8226
Chore: convert Cloud Monitoring Aggregation enzyme tests to RTL (#50326) 2022-06-08 10:03:58 +02:00
Zoltán Bedi
aa74371008
Chore: Convert ReferenceLink.test.js to RTL (#50338) 2022-06-07 17:40:04 +02:00
Connor Lindsey
c65d62c95b
Tracing: Fix links to traces in Explore (#50113)
* Tracing: Fix links to traces in Explore

* Fix links in dashboard

* Fix references and tracetimelineviewer tests

* Remove hard-coded references to fix tests

* Add noopener
2022-06-07 07:21:01 -06:00
Joey Tawadrous
d20608ab84
Convert packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.test.js to RTL (#49992)
* Added new selectors

* Added selector to UIFindInput

* Added selectors to TracePageSearchBar

* Convert tests

* Remove next/prev button test ids

* Remove uiFindInput selector

* Remove tracePageSearchBar selector

* Remove tracePageSearchBarSuffix selector

* Update TraceViewContainer test
2022-06-06 16:31:51 +01:00
Ashley Harrison
6fcb2cd307
remove exported test globals from test/lib/common (#50256) 2022-06-06 15:38:37 +01:00
Ashley Harrison
22fbcebabf
Chore: convert DashboardsTable test to RTL (#50252)
* convert DashboardsTable test to RTL

* ensure render does not throw
2022-06-06 15:27:40 +01:00
Marcus Efraimsson
36c3398c6d
Datasource: Remove support for unencrypted passwords (#49987)
* Datasource: Remove support for unencrypted passwords

* regenerate swagger

* [WIP] Remove references to datasource password and basic auth password fields (#50015)

* try delete moar tings

* delete provisioning stuff

* remove from yaml

* update snapshots

* remove lingering snapshot fields

* fix ds http settings

* Re-generate swagger and fix swagger-api-spec make target

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-03 17:38:22 +02:00
Ashley Harrison
0de9808008
Draggable: only set drag handle props on the drag handle itself (#50025) 2022-06-02 13:34:05 +02:00
Joey Tawadrous
6703722278
Updated test (#50041) 2022-06-02 09:47:02 +01:00
Joey Tawadrous
3d26502db1
Convert packages/jaeger-ui-components/src/common/UiFindInput.test.js to RTL (#49994)
* Add selector

* Add test

* Remove snapshot

* Remove uiFindInput selector
2022-06-02 09:46:31 +01:00
Kevin Yu
dca0453c2e
CloudWatch: Add multi-value template variable support for log group names in logs query builder (#49737)
* Add multi-value template variable support for log group names

* add test for multi-value template variable for log group names

* add test
2022-06-01 10:23:31 -07:00
polibb
a19c3dae5a
Convert Enzyme UsersTable test to RTL (#49836)
* Convert Enzyme UsersTable test to RTL

* Fixes on UsersTable test; no additions

* remove snapshot of UsersTable test
2022-05-31 18:58:59 +03:00
Joao Silva
a91ecc566b
Chore: Converts DashboardRow tests to RTL (#49722) 2022-05-31 16:51:44 +01:00
Alex Khomenko
0a48b92d28
TeamMembers: Refactor test to RTL (#49922) 2022-05-31 17:11:12 +03:00
Zoltán Bedi
8e0342bc74
Chore: convert NewWindowIcon test to rtl (#49830) 2022-05-31 14:34:46 +02:00
Alex Khomenko
bfbe856319
TeamMemberRow: Convert tests to RTL (#49875)
* TeamMemberRow: Remove legacy select

* TeamMemberRow: Update attributes

* TeamMemberRow: Refactor tests to RTL
2022-05-31 10:33:27 +02:00
Zoltán Bedi
f87c1b0eb9
Chore: Convert FolderPicker test to rtl (#49838) 2022-05-30 17:36:16 +02:00
kay delaney
bae9a60089
Chore: Convert legacy Input test to RTL (#49713) 2022-05-26 17:10:35 +01:00
Ashley Harrison
a12cdf8283
convert PartialHighlighter test to RTL (#49708) 2022-05-26 17:09:44 +01:00
Ashley Harrison
43249464bb
convert bargauge test to RTL (#49701) 2022-05-26 14:58:01 +01:00
Ashley Harrison
ec65332c82
convert Typeahead test to RTL (#49509) 2022-05-25 16:53:55 +01:00
Ashley Harrison
970c395fb1
Cue: Use BarGauge, DashList and Gauge panel cue schemas (#49580)
* user essentials mob! 🔱

* Wip

* user essentials mob! 🔱

lastFile:public/app/plugins/panel/bargauge/module.tsx

* user essentials mob! 🔱

* update betterer results file

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
2022-05-25 14:18:21 +01:00
Karl Persson
ef6b53ed23
AccessControl: Pass current org id to UsersTable (#49584)
* Pass current org id to UsersTable

* Mock contextSrv and update snapshot
2022-05-25 13:56:36 +02:00
Piotr Jamróz
f93ad85b08
Chore: Convert a test from enzyme to testing library (#49492) 2022-05-25 12:19:51 +02:00
Alex Khomenko
5557d2e666
TeamList: Convert test to RTL (#49567) 2022-05-25 13:01:40 +03:00
Joao Silva
71ffa5e5db
Chore: Converts SaveDashboardAsForm tests to RTL (#49436) 2022-05-24 10:17:40 +01:00
Joao Silva
51bc1bad1b
Chore: Converts SaveDashboardForm tests to RTL (#49434) 2022-05-23 18:17:25 +01:00
Alex Khomenko
18727f0bf5
TeamGroupSync: Refactor tests to use RTL (#49417) 2022-05-23 16:45:36 +02:00
Piotr Jamróz
060f0e5633
Query History: Results pagination (#49217)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Basic pagination

* Show load more only if there are items to load

* Post-merge fixes

* Change initial page limit to 100

* Fix unit tests

* Fix linting errors

* Test pagination

* Fix query migration

* Fix unit tests

* Fix prettier

* Remove full stop

* Do not show number of queries with partial results to avoid confusion

* Show number of displayed results when partial results are shown
2022-05-23 14:43:38 +02:00
svennergr
2949ebc264
Traces: Fixed missing CopyButton on KeyValueTables and overlapping of panels (#49271)
* rewrote `CopyIcon` to an functional component

- fixed missing `CopyIcon` on `KeyValuesTable`

* added fixed height of `30px` to `KeyValuesTable` to fix overlapping

* removed unused CopyIcon snapshot

* KeyValuesTable: moved `30px` height from `tr` to `td` to fix vertical alignment
2022-05-20 20:24:33 +02:00
Alex Khomenko
f1f5f01309
CreateTeam: Refactor test to RTL (#49306) 2022-05-20 13:28:59 +03:00
Chrysa Dikonimaki
7623f6ac64
Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js and packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js to RTL (#49148)
* convert AccordianText and TestList tests to RTL

* convert AccordianText and TestList tests to RTL

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/TextList.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianText.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix TextList and AccordianText tests

* remove getrow function

* readd TextList props

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 11:02:43 +01:00
Ashley Harrison
b864442717
Gauge: convert tests to RTL (#49251)
* Move logic into utils file, add EXTREMELY basic RTL test

* initialise array with value
2022-05-20 10:51:11 +01:00
Chrysa Dikonimaki
a113fcaca3
Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js to RTL (#49119)
* convert SpanBarRow tests to RTL

* remove comments

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix and replace

* fix last test

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 17:18:24 +01:00
Chrysa Dikonimaki
6b4353f890
Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js to RTL (#49107)
* convert SpanBar tests to RTL and add testing-library/react dependency

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBar.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix

* use e2e selector everywhere

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 13:00:44 +01:00
Ashley Harrison
bddbed4e21
Convert FormField tests to RTL (#49068) 2022-05-17 13:26:48 +01:00
Piotr Jamróz
f252e89339
Query History: Implement RemoteStorage methods: get all, add new (#48330)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Simplify testing DataSourceSettings

* Update betterer results

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Reuse sort order options

* Reuse sort order options

* Fix footer spacing
2022-05-17 12:59:16 +02:00
Ashley Harrison
3b0cd8b6f1
Convert NamedColorsPalette tests to RTL (#49064) 2022-05-17 11:34:15 +01:00
Chrysa Dikonimaki
b33c1bf4fd
Convert packages/grafana-ui/src/components/Logs/LogRows.test.tsx to RTL (#48982)
* convert LogLabels tests toRTL

* convert LogMessageAnsi tests to RTL

* convert LogMessageAnsi to RTL fix

* remove comment from LogMessageAnsi tests

* convert LogRows tests to RTL

* Delete LogRow import
2022-05-17 08:56:14 +01:00
tomxwang
a51c2774b8
convert UsersActionBar tests to RTL (#48737) 2022-05-12 13:16:22 -07:00
Chrysa Dikonimaki
ab91af202c
Convert packages/grafana-ui/src/components/Logs/LogMessageAnsi.test.tsx to RTL (#48918)
* convert LogLabels tests toRTL

* convert LogMessageAnsi tests to RTL

* convert LogMessageAnsi to RTL fix

* remove comment from LogMessageAnsi tests
2022-05-12 13:11:35 -07:00
Chrysa Dikonimaki
7e5ea3f5a0
convert LogLabels tests toRTL (#48887) 2022-05-10 15:53:14 -07:00
Connor Lindsey
c1b5ea3e54
Tracing: Add trace to metrics config behind feature toggle (#46298)
* Add trace to metrics behind feature flag
2022-05-05 14:46:18 -06:00
L-M-K-B
a98fae32fc
Laura/chore/refactor test of secondary actions (#48745)
* Chore: transfer three tests to testing-library

* Chore: transfer last test to testing-library

* chore: add suggestion from code review

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

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-05 15:55:59 +02:00
L-M-K-B
83a5ca95c7
Chore: transfer LiveLogs.test to testing-library (#48678)
* Chore: transfer LiveLogs.test to testing-library

* Chore: improve readability and third test

* Chore: improve test and component after code review
2022-05-05 08:40:21 +02:00
Joey Tawadrous
09634b518c
Traces Panel: Add new Traces Panel visualization (#47534)
* Panel

* Support tempo dash variables

* Support tempo explore variables

* Only show span links for explore

* Cleanup

* Added tests

* apply variables to search

* Tests for search variables

* Handling no data

* Interpolation and tests

* TracesPanel tests

* More tests

* Fix for backend test

* Manager integration test fix

* Traces doc and updated visualizations index doc

* Logs for this span

* Search, scrollToTop, other improvements

* Refactor to extract common code

* Removed TopOfViewRefType optional

* Remove topOfViewRef optional

* Removed another optional and fixed tests

* Test

* Only show search bar if trace

* Support traces panel in add to dashboard

* Self review

* Update betterer

* Linter fixes

* Updated traces doc

* Ahh, moved the for more info too

* Updated betterer.results

* Added new icon

* Updated expectedListResp.json
2022-05-03 17:42:36 +01:00
Ashley Harrison
806ea058ed
Chore: convert Slider tests to RTL (#48262)
* convert Slider tests to RTL

* slight update

* don't need to check they're in the document

* Update packages/grafana-ui/src/components/Slider/Slider.test.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* check below minimum value as well

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-05-03 13:33:30 +01:00
Ashley Harrison
d774deab99
convert test to RTL (#48291) 2022-05-03 08:45:50 +01:00
L-M-K-B
b8460051a6
Chore: transfer TimeSyncButton.test to testing-library (#48404) 2022-05-02 11:20:12 +02:00
Timur Olzhabayev
17eca4505c
Making FileUpload component accessible via keyboard (#47497) 2022-04-29 09:47:33 +02:00
Ashley Harrison
b9787db68e
Chore: Convert AbstractList tests to RTL (#48284) 2022-04-28 11:30:19 +02:00
L-M-K-B
ab144bf05e
Chore: Refactor run button and remove component incl. test (#48348) 2022-04-28 11:07:49 +02:00
Andres Martinez Gotor
6edefe5147
AzureMonitor: Remove deprecated code (#48328) 2022-04-28 10:27:39 +02:00
Piotr Jamróz
361cc18b45
Query History: Move filtering to service layer (#48008)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Fix betterer conflicts

* Fix imports

* Fix imports

* Simplify test setup

* Simplify assertion

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests
2022-04-27 15:07:44 +02:00
Josh Hunt
3c6e0e8ef8
Chore: ESlint import order (#44959)
* Add and configure eslint-plugin-import

* Fix the lint:ts npm command

* Autofix + prettier all the files

* Manually fix remaining files

* Move jquery code in jest-setup to external file to safely reorder imports

* Resolve issue caused by circular dependencies within Prometheus

* Update .betterer.results

* Fix missing // @ts-ignore

* ignore iconBundle.ts

* Fix missing // @ts-ignore
2022-04-22 14:33:13 +01:00
Shirley
4f26129aa4
CloudWatch: Run query on blur in logs query field (#47454)
* Cloudwatch: add test to ensure RunQuery is fired onBlur of LogQuery

Also remove the `onBlur` prop for the `QueryField` in `LogsQueryField` since `QueryField` is configured to re-run
queries `onBlur` by default.

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Isabella Siu <isabella.siu@grafana.com>
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-04-18 18:05:10 +00:00
Piotr Jamróz
5cb5141c72
Query History: Move local storage specific settings to persistence layer (#47500)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions
2022-04-12 18:55:39 +02:00
kay delaney
f10047b708
Dashboard: Refactor panel cleanup (#47323) 2022-04-12 14:12:03 +01:00
Kristina
b9e6ed3a8a
Convert Rich History tests to RTL (#47220)
* Migrate enzyme tests to RTL

* Convert rich history card tests

* Fix Lint errors

* Fix tests based on feedback

* Fix second await
2022-04-06 10:26:33 -05:00
Piotr Jamróz
88ec750728
Query History: Load history when QueryHistoryContainer is opened (#46457)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup
2022-04-06 13:49:25 +02:00
Ashley Harrison
3d23722b30
Update @types/lodash everywhere (#47020)
* Update @types/lodash everywhere

* Update @grafana/e2e as well
2022-03-31 10:19:33 +01:00
Joey Tawadrous
58922d78df
Traceview find: background color and prev/next (#46527)
* Next/prev buttons

* expand

* Sticky search bar

* Removed anys

* testing

* testing

* Tests for next/prev/suffix

* More tests

* Span bar row color

* Add clear to input and update search bar styles

* Update test

* PR changes

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-03-31 09:43:59 +01:00
Alex Khomenko
114704e2e2
Feature Highlights: update components (#46920)
* Apply new upgrade styles

* Add caption/update pro badge color

* Update team sync upgrade page

* Add UpgradeContentVertical

* Update public/app/core/components/Upgrade/UpgradeBox.tsx

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update screenshots

* Update screenshots[2]

* Scroll screenshot if doesnt fit

* Add missing target prop

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-03-30 14:46:56 +02:00
kay delaney
f1c3177e79
Chore: Add type info for grafana boot data (#45322)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-30 10:48:58 +01:00
Piotr Jamróz
bf977ac245
Explore: Fix time interpolation (#46737)
* Ensure TemplateService is updated with new time range on each time range change.

* Fix linting errors

* Fix explorePane.test.ts

* Reuse createDefaultInitialState

* Remove unused imports

* Add a test for left/right split

* Silence console.error in tests

* Silence console.error in tests
2022-03-29 15:10:40 +02:00
myml
23a1dbc264
feat: Bar Gauge Support scrolling (#46819)
* feat: Bar Gauge Support scrolling

* Update public/app/plugins/panel/bargauge/module.tsx

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update public/app/plugins/panel/bargauge/module.tsx

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* docs: Bar gauge add 'min-width' and 'min-height'

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
2022-03-29 11:21:45 +01:00
Kristina
1afd278bd0
Fix tests for Explore - ErrorContainer, MetaInfoText & cleanup (#46744)
* Move ErrorContainer.test.tsx to RTL

* Remove snapshots and unnecessary tests, change enzyme tests to RTL

* Add fixes to tests
2022-03-18 14:44:51 -05:00
Ryan McKinley
15ca294be0
Dashboards: show changes in save dialog (#46557)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-03-16 09:28:09 -07:00
Karl Persson
7966e3583e
Access control: Dashboard and folder permissions frontend (#45094) 2022-03-03 15:18:27 +01:00
Giordano Ricci
09f48173fe
Explore: allow users to save Explore state to a new panel in a new dashboard (#45148)
* Add Button & Form

* Save to new dashboard

* minor adjustements

* move modal to a separate component

* handle dashboard name related errors

* pick visualization based on query results

* lift state

* fix types

* Add Open & Close tests

* Add submit test

* add navigation tests

* add tests for API errors

* remove console log

* create wrapper component for AddToDashboardButton

* remove unused mapped prop

* add wrapper test

* rename isActive to isVisible

* invert control over save & redirect logic

* remove leftover commented code

* cleanup setup parameters

* reorganize code & improve tests

* Remove option to add to existing dashboard

* UI tweaks

* disable button if no queries

* Fix tests

* better accessible tests

* handle submission errors

* improve addToDashboard types

* use dashboardSrv' saveDashboard

* remove leftover test helper

* fix typo

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

* Apply suggestions from code review

Co-authored-by: Kristina <kristina.durivage@grafana.com>

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Kristina <kristina.durivage@grafana.com>
2022-03-03 08:54:06 +00:00
Connor Lindsey
9067715d1d
UI: Add focus styles to QueryField component (#45933)
* Add focus styles to QueryField component
2022-03-02 16:33:14 +01:00
Andres Martinez Gotor
d4b05f9421
AzureMonitor: Remove deprecated configuration parameters (#45860) 2022-03-02 15:42:30 +01:00
Shachi Solanki
190757b3c6
Tempo / Trace Viewer: Support Span Links in Trace Viewer (#45632)
* Support Span Links in Trace Viewer

* Update ReferencesButton styles

* Remove datasource prop

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-02-25 11:14:13 -07:00
Giordano Ricci
9307cc86f2
UI: Improve modal a11y by setting role & using title as label (#45472)
* UI: Improve modal a11y by setting role & using title as label

* remove wrapping div for cutom title components

* Fix typo
2022-02-22 14:12:34 +00:00
kay delaney
d134740bba
Redux: Factor Invites out to separate slice (#45552) 2022-02-21 11:37:49 +00:00
Hugo Häggmark
c6470be34c
Chore: Replace enzyme with RTL in ConfirmModal.test.tsx (#45651) 2022-02-21 08:25:52 +01:00
Hugo Häggmark
2f63d7b1c4
Chore: Replace enzyme with RTL in BigValue.test.tsx (#45650) 2022-02-21 08:21:06 +01:00
Hugo Häggmark
dbec2b02fd
Variables: move state tree into a keyed state (#44642)
* Variables: move state tree into a keyed state

* Update public/app/features/variables/state/transactionReducer.ts

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

* Chore: fix prettier error

* Chore: renamed slices and lastUid

* Chore: rename toUidAction

* Chore: rename dashboardVariableReducer

* Chore: rename state prop back to templating

* Chore renames variable.dashboardUid

* Chore: rename toDashboardVariableIdentifier

* Chore: rename getDashboardVariable

* Chore: rename getDashboardVariablesState

* Chore: rename getDashboardVariables

* Chore: some more renames

* Chore: small clean up

* Chore: small rename

* Chore: removes unused function

* Chore: rename VariableModel.stateKey

* Chore: rename KeyedVariableIdentifier.stateKey

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-18 06:06:04 +01:00
Connor Lindsey
6e07b30048
Chore: Clean up logs and deprecated library in tracing tests (#45486)
* Fix logs and errors from tracing tests

* Refactor SpanBar to remove recompose

* Fix NodeGraph tests
2022-02-17 16:34:16 +01:00
Hugo Häggmark
ae8c8a2910
Chore: Replace enzyme with RTL (#45434) 2022-02-16 00:49:06 -08:00
Hugo Häggmark
5760a18da5
Chore: Replace enzyme with RTL in OrgSwitcher.test.tsx (#45439) 2022-02-16 00:48:13 -08:00
Hugo Häggmark
6584735bef
Chore: Replaces enzyme with RTL in ConfirmButton.test.tsx (#45435) 2022-02-16 09:46:46 +01:00
Marcus Andersson
9a12b3ea00
TemplateSrv: exposing a function to detect if a target contains a template (#45214)
* exposing a function to check if a target contains variables.

* fixed tests.

* renamed function

* updated betterer result.
2022-02-15 08:53:42 +01:00
Piotr Jamróz
e7605ad974
Query History: Split data and view models (#44922)
* Remove unused properties

* Fix unit tests

* Fix unit tests

* Split data models

* Simplify updating items in rich history

* Update tests

* Fix starring an item and add a unit test

* Move the converter to a separate file and add unit tests

* Convert a private function to an inline function

* Add more docs and clean up the code

* Update public/app/core/history/localStorageConverter.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/core/utils/richHistory.test.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Use template literals over explicit casting

* Split updateRichHistory to three separate functions

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-10 13:59:43 +01:00
Hugo Häggmark
192572174e
Chore: Removes console output LogDetails.test.tsx and refactors to RTL (#45193) 2022-02-10 11:06:29 +01:00
Ashley Harrison
d3d7411e36
Chore: Add betterer test to track conversion of enzyme tests (#45055)
* Add betterer test for number of enzyme tests

* emit metric for number of enzyme tests

* update frontend metrics script

* Merge...

* Switch order of betterer/lint

* Update version of betterer

* kick levitate

* Update lockfile
2022-02-09 12:41:39 +00:00