Commit Graph

44 Commits

Author SHA1 Message Date
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