Commit Graph

40 Commits

Author SHA1 Message Date
Brendan O'Handley
0a9240aeba
Prometheus: Configuration page overhaul (#66198)
* organize layout, make design uniform, add doc link

* fix e2e test

* move overhauled config parts into prometheus code

* update tooltips with doc links

* clean component styles for section padding, top and bottom 32px

* make additional settings subsection headers h6

* use secondary gray for section descriptions

* fix merge issues

* change inlineswitch to switch only in prom settings because the other components are shared

* remove legacy formfield and input, replace with inlinefield and input from grafana-ui

* find more formfield and UI design fixes like changing inlineformlabel to inlinefield

* remove unused inline form label

* replace legacy duration validations with <FieldValidationMessage>

* fix styles secondary gray from theme

* change language, headings and datasource -> data source

* update alert setting styles with new component

* update prom url heading and tooltip

* update default editor tooltip and set builder as default editor

* update interval tooltip

* update prom type tooltip

* update custom query params tooltip

* update exemplar internal link tooltip

* fix inline form styling inconsistency

* allow for using the DataSourceHTTPSettings component without the connection string

* remove overhaul component, re-use dshtttps comp, and use connection input in config editor

* make tooltips interactive to click links

* consistent label width across the elements we can control for now, fix exemplar switch

* make connection url a component

* refactor onBlur validation

* remove unused component

* add tests for config validations

* add more meaningful health check

* fix e2e test

* fix e2e test

* fix e2e test

* add error handling for more url errors

* remove unnecessary conversion

* health check tests

* Clean up the health check

* health check unit tests

* health check unit tests improved

* make pretty for drone

* lint check go

* lint check go

* add required attr to connection component

* Update public/app/plugins/datasource/prometheus/configuration/Connection.tsx

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>

* fix read only issue for provisioned datasources

* validate multiple durations for incremental query setting

* use sentence case for headers

* use className consistently for styles

* add tests for url regex

* remove console logs

* only use query as healthcheck as the healthy api is not supported by Mimir

* fix exemplar e2e test

* remove overhaul prop from custom headers setting component

* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip

* add spaces back

* spaces

---------

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2023-04-27 09:43:54 -04:00
Adela Almasan
2beee35567
Timeseries: Time regions migration (#66998)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2023-04-27 05:28:58 +03:00
Adela Almasan
c4c747cca6
e2e: Update annotation marker selector (#67135) 2023-04-24 18:51:15 +00:00
Brendan O'Handley
c5ea3cd7e0
Prometheus: remove part of flaky e2e test (#67116)
remove elements of flaky e2e test

This test only checks 'undo' in the code editor and then checks if the query builder is present. The test is timing out when looking for the query builder. There should be a second test to check if undo works in the query builder so I'm removing the query builder check. I will add an issue to create a test for 'undo' in the query builder.
2023-04-24 10:28:57 -04:00
Joey
94294a72c8
Tracing: Update e2e test (#66960)
Update e2e test
2023-04-21 14:44:48 +01:00
Ryan McKinley
9452c0d718
Annotations: Support filtering the target panels (#66325)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2023-04-18 15:39:30 -05:00
Matias Chomicki
d3a1faad1a
Loki Config: Add missing section header + minor improvements (#66216)
* Loki config: add missing section title to max lines

* Loki config: minor improvements to datasource test messages

* Chore: remove new line

* Loki: further improve error messages

* Alerting Settings: Add missing tooltip

* Update packages/grafana-ui/src/components/DataSourceSettings/AlertingSettings.tsx

* Update alerting label and tooltip

* Update packages/grafana-ui/src/components/DataSourceSettings/AlertingSettings.tsx

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Alerting settings: Increase label width

* Loki config: update success message

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-04-14 12:39:54 +03:00
Marcus Andersson
c3fee5881f
E2E: Fixed so openPanelMenuItem flow works with new/old panel chrome without breaking changes (#66118)
Fixed so the openPanelMenuItem works with both angular and react panels.
2023-04-14 09:11:15 +02:00
Torkel Ödegaard
4ea7677bff
Explore: Start using PanelChrome as container (#66370)
* Explore: Start using PanelChrome as container

* fix test

* Fixing issue with test and timerange
2023-04-12 18:58:08 +02:00
Ashley Harrison
1261345b81
Chore: Upgrade to react 18 (#64428)
* update react 18 related deps

* fix some types

* make sure we're on react-router-dom >= 5.3.3

* Use new root API

* Remove StrictMode for now - react 18 double rendering causes issues

* fix + ignore some @grafana/ui types

* fix some more types

* use renderHook from @testing-library/react in almost all cases

* fix storybook types

* rewrite useDashboardSave to not use useEffect

* make props optional

* only render if props are provided

* add correct type for useCallback

* make resourcepicker tests more robust

* fix ModalManager rendering

* fix some more unit tests

* store the click coordinates in a ref as setState is NOT synchronous

* fix remaining e2e tests

* rewrite dashboardpage tests to avoid act warnings

* undo lint ignores

* fix ExpanderCell types

* set SymbolCell type correctly

* fix QueryAndExpressionsStep

* looks like the types were actually wrong instead :D

* undo this for now...

* remove spinner waits

* more robust tests

* rewrite errorboundary test to not explicitly count the number of renders

* make urlParam expect async

* increase timeout in waitFor

* revert ExplorePage test changes

* Update public/app/features/dashboard/containers/DashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx

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

* skip fakeTimer test, ignore table types for now + other review comments

* update package peerDeps

* small tweak to resourcepicker test

* update lockfile...

* increase timeout in sharepublicdashboard tests

* ensure ExplorePaneContainer passes correct queries to initializeExplore

* fix LokiContextUI test

* fix unit tests

* make importDashboard flow more consistent

* wait for dashboard name before continuing

* more test fixes

* readd dashboard name to variable e2e tests

* wait for switches to be enabled before clicking

* fix modal rendering

* don't use @testing-library/dom directly

* quick fix for rendering of panels in firefox

* make PromQueryField test more robust

* don't wait for chartData - in react 18 this can happen before the wait code even gets executed

---------

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2023-04-11 10:51:54 +01:00
Galen Kistler
38482c90bf
Build URL params and include requestId (#65742)
* add requestId and ds_type to datasource request url
2023-04-06 14:43:10 -05:00
Kristina
8dded022ec
Explore: Run test datasource default selection when mounted (#65864)
* Run test datasource query when mounted

* Auto running test-datasource creates more query history entries

* Make exemplar query intercept more robust

* Delete unrelated query history queries

* Revert "Run test datasource query when mounted"

This reverts commit 28b37e4df9.

* Add default query to testdata and grafana datasources
2023-04-05 09:08:03 -05:00
Alexa V
2b0c0d4b95
Dashboards: Enable feature flag newPanelChromeUI by default (#65593) 2023-04-03 13:50:43 +02:00
Ashley Harrison
7005b7bf8a
Navigation: Update e2e tests to work with topnav (#60910)
* turn on topnav toggle in e2e tests

* fix variable e2e tests

* fix remaining tests + remove some hardcoded waits

* speculative fixes

* wait for error to disappear

* use new selector, turn toggle back off
2023-01-04 14:59:53 +00:00
Giordano Ricci
785c857ec7
QueryHistory: prevent query history tests from failing if the suite is rerun (#60462)
remove all queries from query history after running suite
2022-12-19 14:21:00 +00:00
Gareth Dawson
94372f5f23
Loki: Remove raw query toggle (#59125)
* set default query expression

* always show raw query

* remove raw query title

* remove test for raw query toggle

* remove raw query toggle

* remove default expression

* hide raw query preview if empty

* remove e2e test for raw query toggle

* update test name
2022-11-23 16:07:59 +00:00
Matias Chomicki
463f993186
feat(loki-monaco-editor): update e2e test with autocomplete steps (#58455)
* feat(loki-monaco-editor): update e2e test with autocomplete steps

* Chore: replace typing method

* Test simpler POC test

* Chore: refactor test

* Chore: use selector to get the editor value
2022-11-09 13:37:00 +01:00
Matias Chomicki
25f79ef2b9
Loki: enable Monaco Query Editor by default (#58080)
* feat(loki-monaco-editor): update tests

* chore(loki): use unified datasource mock function in tests

* chore: enable monaco feature flag in tests

* feat(loki-monaco-editor): add test case for disabled feature

* feat(loki-monaco-editor): enable by default

* Revert "feat(loki-monaco-editor): enable by default"

This reverts commit 08904f94a707a4fa32aa1e7f3f0de377575a7636.

* feat(loki-monaco-editor): enable from registry

* feat(loki-monaco-editor): make feature flag frontend only
2022-11-08 10:22:40 -05:00
Ashley Harrison
871d98e550
hopefully improve slate test reliability (#58171) 2022-11-04 09:20:03 +00:00
Galen Kistler
f93c3acc51
Prometheus: Flavor/version configuration (#57554)
* Revert "Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)"
This reverts commit 2432ce619a.
* Adds new fields and documentation for Prometheus datasource configuration: prometheus type, and version
2022-10-24 14:53:11 -05:00
Galen Kistler
2432ce619a
Revert "Prometheus: Type and flavor configuration (#56496)" (#57552)
This reverts commit 7ecbc98b3e.
2022-10-24 12:33:11 -05:00
Galen Kistler
7ecbc98b3e
Prometheus: Type and flavor configuration (#56496)
* Adding two new fields to the data JSON in the prometheus datasource configuration: prometheusType, and prometheusVersion.
* Version field will attempt to auto-detect via buildinfo API when prometheus Type is selected
2022-10-24 09:26:32 -05:00
kay delaney
ed71b7b884
Chore/React18: Remove enzyme slate tests and replace with e2e tests (#57095) 2022-10-17 16:31:59 +01:00
Gareth Dawson
2338660a62
Loki: Add more assertions to loki-query-builder.spec.ts (#56044)
* Add more assertions to loki-query-builder.spec.ts

* Update assertions in loki-query-builder.spec.ts
2022-09-30 14:27:48 +01:00
Ivana Huckova
c0ecdf6783
Loki: Redesign and improve query patterns (#55097)
* WIP

* WIP

* Query patterns: Redesign and improve feature

* Remove duplicated pattern

* Remove empty line

* Refactor

* Add tests

* Update docs and e2e test

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Use capitalize

* Refactor to use QueryPatternsCard component

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Matias Chomicki <matyax@gmail.com>

* Update feature tracking for v2

* QueryPatternsCard: Remove unnecessary key

* Update naming for card

* Mock reportInteraction in tests

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2022-09-26 14:03:13 +02:00
Adela Almasan
5a3ae293cf
Geomap: Layer types e2e (#54666) 2022-09-07 13:29:03 -05:00
Adela Almasan
cea2b4b7b8
Geomap: Spatial operations location options transform e2e test (#54162) 2022-08-25 17:34:24 -04:00
Ivana Huckova
8813cbfb62
Loki: Update copy for missing label filter error message (#53449)
* Loki: Update copy for missing label filter

* Update
2022-08-11 17:57:10 +02:00
Connor Lindsey
83c1756251
Tracing: Send tags, events, and references as raw json (#52245)
* Tracing: Send tags, events, and references as raw json

* Update tempo fixture
2022-07-21 10:00:47 -06: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
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
Josh Hunt
5dabb55b39
Navigation: Enable new navigation by default (#48447) 2022-05-03 16:28:40 +02:00
Torkel Ödegaard
e10c4397dc
Prometheus: Enable new visual query builder by default (#46634)
* Prometheus: Enable new query builder by default

* Updated e2e test

* Fixed e2e
2022-03-23 07:28:19 +01:00
Kristina
773da0e330
Explore: Add t * keybindings to change time range (#45020)
* Add keybindings to explore, allow override of dashboard model update for explore update

* Remove edits to Dashboard Model, add definition when url params should be updated

* Add tests

* Add and expose util function instead of bringing in unrelated library do not define explicit path to library file

* Use more generic model for TimeSrv

* Remove url utility functions, use javascript function instead

* Break out TimeModel into new type and bring it in

* condense object creation
2022-02-17 07:39:02 -06:00
Santiago
7ed82ac049
Check for empty URLs when creating/updating a data source (#42837)
* checks for empty URLs added

* check for TimeSeriesTypeNot to fix InfluxDB alerts

* log a warning when a data frame is ignored

* fix: add brittle Prometheus URL input selector

needs a proper aria-label or test-data-id selector

* test: add URL input aria-label

needs to use the grafana/e2e-selectors package

* test: run ci

* add URL validation for specific data sources, e2e tests

* Update pkg/api/datasource/validation.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* delete duplicated logs

* delete unnecessary leading newline

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-01-31 12:39:55 -03:00
Ashley Harrison
c3ca46d5f6
Chore: Login via the API by default in Cypress (#43167)
* Use the api to login in cypress by default

* export getBaseUrl

* Revert "export getBaseUrl"

This reverts commit ae7eecea37.

* just use BASE_URL from the env

* fix exemplars test

* move into separate functions
2021-12-16 09:28:37 +00:00
Torkel Ödegaard
9f4aa472cf
Select: Fix input cursor position so that it is at the start for single value selects (#41693)
* Select: Fix input cursor position so that it is at the start for single value selects

* Fixing e2e tests

* Fixes cursor issue

* Fixing e2e tests

* e2e fix

* Select: ensure input always overlays singleValue, update pa11y config

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-26 15:38:48 +00:00
Torkel Ödegaard
0f6ae272e9
E2E: Fix running any suite locally (#42210)
* e2e: Fix running any suite locally

* Fixed issue with testFiles filter when specifying suite name

* unrelated

* fixed import paths to shared

* Moving dashboards to root
2021-11-24 15:16:51 +01:00
Ivana Huckova
1b4f6b19cb
Prometheus: Fix running of health check query based on access mode (#42189)
* Prometheus: Use this.query for health check

* Update alertMessage in e2e tests
2021-11-24 12:43:39 +01:00
Dimitris Sotirakis
db122e9b2c
CI: Run e2e tests in parallel using multiple suites (#41748)
* Split suite1 to multiple e2e test suites

* Update drone yaml

* Add missing arg

* Extract cypress install step

* Change image on e2e tests step

* Sync with main

* Add cypress cache volume

* Try with grafana/ci-e2e:12.19.0-1 image

* Update grabpl version to 2.7.2

* Revert a11y failure back to 'always'
2021-11-24 11:20:11 +01:00