Commit Graph

128 Commits

Author SHA1 Message Date
Alex Khomenko
4e8b97b8ed
CI: Temporarily disable panel edit e2e test (#42517) 2021-11-30 13:46:23 +01: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
Hugo Häggmark
b164ce0c9b
E2E: fix verify release script after split (#42341) 2021-11-26 08:43:00 +01:00
Torkel Ödegaard
12d2b9e997
E2E: Skip running import dashboard test (#42270) 2021-11-25 09:43:24 +01:00
Armand Grillet
6523486122
Alerting: Make Unified Alerting enabled by default for those who do not use legacy alerting (#42200)
* update AlertingEnabled and UnifiedAlertingSettings.Enabled to be pointers
* add a pseudo migration to fix the AlertingEnabled and UnifiedAlertingSettings.Enabled if the latter is not defined
* update the default configuration file to make default value for both 'enabled' flags be undefined

Misc
* update Migrator to expose DB engine. This is needed for a ualert migration to access the database while the list of migrations is created.
* add more verbose failure when migrations do not match

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2021-11-24 14:56:07 -05: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
renovate[bot]
4f884a31de
Update dependency cypress to v9 (#41588)
* Update dependency cypress to v9

* Update e2e test to work with Cypress 9

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-19 17:19:53 +00:00
Hugo Häggmark
5498203507
Chore: Reduce pa11y-ci errors (#41787)
* Chore: moves alert to test-id

* Chore: moves Dashboard navigation to test-id

* Chore: moves Bar gauge value to data-testid

* Chore move Folder picker select container to data-testid

* Chore: moves Time zone picker select container to data-testid

* Chore: moves Choose starting day of the week to data-testid

* Chore: change tabIndex on search input

* Chore: moves various search related aria-lables to data-testid

* Chore: connects label to select input on alerting page

* Chore: connects TimeZonePicker and WeekStartPicker with labels

* Chore: moves CallToActionButton to data-testid

* Chore: move user home preferences select to data-testid

* Chore: lower all thresholds
2021-11-17 14:45:45 +01:00
Uchechukwu Obasi
e7fd41d779
RefreshPicker: make widget accessible (#40570)
* adds better aria-label for run and interval buttons

* enable refreshPicker to be keyboard navigable

* adds support for closing menu using esc key

* Fix: weird behaviour when navigating menu items

* adds focus trapping to refresh picker

* WIP: sanitize time interval values for screen readers to pronounce correctly

* WIP: improve sanitizeLabel function to work for all use cases

* Chore: move label sanitization to refreshPicker component instead

* Chore: add fallback label when ariaLabel prop is not set

* Chore: fix some type errors

* code cleanup

* update tests

* rename function to be more descriptive

* remove unnecessary type casting

* WIP: use cleaner solution

* WIP: use parseDuration util instead

* use more descriptive aria label

* fix: modify parseDuration util to output correct interval unit format

* fix: move interval unit format logic to refreshPicker

* Chore: add back old refreshPicker e2e selectors for backward compatibility

* Fix: improve refresh picker to voice out selected interval option

* Fix: use appropriate aria roles and states to aid screen reader a11y

* Fix: support dropdown expansion using down arrow key

* Chore: use better type construct

* Fix: add support for tab to close menu

* add more context to the deprecation warning message

* Chore: use formatDuration util instead to format interval labels

* Chore: small syntax fix

* chore: syntax fix

* syntax fix

* Chore: add back lockfile
2021-11-10 11:01:06 +01:00
Marcus Andersson
dce851e396
Chore: Fixed failing e2e due to day light saving time. (#41417) 2021-11-08 17:05:01 +01:00
Gábor Farkas
9d82111a1a
prometheus: enable new monaco-based query field (#41357)
* prometheus: enable new monaco-based query field

* updated test

* updated tests

* fix e2e tests

* updated comment
2021-11-08 14:20:48 +01:00
Torkel Ödegaard
3dee34c009
PanelEdit: Show when field options have override rules or data config that overrides the default (#40250)
* First pass at showing data override dots

* Added test

* Adding override rule dots

* Added unit test

* Minor changes

* Update public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* Fixed ts issues

* review feedback changes

* skipp broken e2e test

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-11-08 13:18:14 +01:00
renovate[bot]
c91bfcc1d6
Update dependency date-fns to v2 (#41027)
* Update dependency date-fns to v2

* Chore(dependencies): Update formatting used by date-fns

* kick drone

* Chore: Add parseISO to date strings passed to date-fn methods

* Prettier...

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-01 15:39:06 +00:00
Will Browne
1f6965e859
fix homepath for enterprise e2e tests (#41140) 2021-11-01 13:48:52 +01:00
Will Browne
b80fbe03f0
Plugins: Refactor Plugin Management (#40477)
* add core plugin flow

* add instrumentation

* move func

* remove cruft

* support external backend plugins

* refactor + clean up

* remove comments

* refactor loader

* simplify core plugin path arg

* cleanup loggers

* move signature validator to plugins package

* fix sig packaging

* cleanup plugin model

* remove unnecessary plugin field

* add start+stop for pm

* fix failures

* add decommissioned state

* export fields just to get things flowing

* fix comments

* set static routes

* make image loading idempotent

* merge with backend plugin manager

* re-use funcs

* reorder imports + remove unnecessary interface

* add some TODOs + remove unused func

* remove unused instrumentation func

* simplify client usage

* remove import alias

* re-use backendplugin.Plugin interface

* re order funcs

* improve var name

* fix log statements

* refactor data model

* add logic for dupe check during loading

* cleanup state setting

* refactor loader

* cleanup manager interface

* add rendering flow

* refactor loading + init

* add renderer support

* fix renderer plugin

* reformat imports

* track errors

* fix plugin signature inheritance

* name param in interface

* update func comment

* fix func arg name

* introduce class concept

* remove func

* fix external plugin check

* apply changes from pm-experiment

* fix core plugins

* fix imports

* rename interface

* comment API interface

* add support for testdata plugin

* enable alerting + use correct core plugin contracts

* slim manager API

* fix param name

* fix filter

* support static routes

* fix rendering

* tidy rendering

* get tests compiling

* fix install+uninstall

* start finder test

* add finder test coverage

* start loader tests

* add test for core plugins

* load core + bundled test

* add test for nested plugin loading

* add test files

* clean interface + fix registering some core plugins

* refactoring

* reformat and create sub packages

* simplify core plugin init

* fix ctx cancel scenario

* migrate initializer

* remove Init() funcs

* add test starter

* new logger

* flesh out initializer tests

* refactoring

* remove unused svc

* refactor rendering flow

* fixup loader tests

* add enabled helper func

* fix logger name

* fix data fetchers

* fix case where plugin dir doesn't exist

* improve coverage + move dupe checking to loader

* remove noisy debug logs

* register core plugins automagically

* add support for renderer in catalog

* make private func + fix req validation

* use interface

* re-add check for renderer in catalog

* tidy up from moving to auto reg core plugins

* core plugin registrar

* guards

* copy over core plugins for test infra

* all tests green

* renames

* propagate new interfaces

* kill old manager

* get compiling

* tidy up

* update naming

* refactor manager test + cleanup

* add more cases to finder test

* migrate validator to field

* more coverage

* refactor dupe checking

* add test for plugin class

* add coverage for initializer

* split out rendering

* move

* fixup tests

* fix uss test

* fix frontend settings

* fix grafanads test

* add check when checking sig errors

* fix enabled map

* fixup

* allow manual setup of CM

* rename to cloud-monitoring

* remove TODO

* add installer interface for testing

* loader interface returns

* tests passing

* refactor + add more coverage

* support 'stackdriver'

* fix frontend settings loading

* improve naming based on package name

* small tidy

* refactor test

* fix renderer start

* make cloud-monitoring plugin ID clearer

* add plugin update test

* add integration tests

* don't break all if sig can't be calculated

* add root URL check test

* add more signature verification tests

* update DTO name

* update enabled plugins comment

* update comments

* fix linter

* revert fe naming change

* fix errors endpoint

* reset error code field name

* re-order test to help verify

* assert -> require

* pm check

* add missing entry + re-order

* re-check

* dump icon log

* verify manager contents first

* reformat

* apply PR feedback

* apply style changes

* fix one vs all loading err

* improve log output

* only start when no signature error

* move log

* rework plugin update check

* fix test

* fix multi loading from cfg.PluginSettings

* improve log output #2

* add error abstraction to capture errors without registering a plugin

* add debug log

* add unsigned warning

* e2e test attempt

* fix logger

* set home path

* prevent panic

* alternate

* ugh.. fix home path

* return renderer even if not started

* make renderer plugin managed

* add fallback renderer icon, update renderer badge + prevent changes when renderer is installed

* fix icon loading

* rollback renderer changes

* use correct field

* remove unneccessary block

* remove newline

* remove unused func

* fix bundled plugins base + module fields

* remove unused field since refactor

* add authorizer abstraction

* loader only returns plugins expected to run

* fix multi log output
2021-11-01 10:53:33 +01:00
Torkel Ödegaard
eabaa3af2d
E2E: Do not skip visualization suggestions (#40955)
* E2E: Do not skip visualization suggestions 

Was disabled because drone performance is so varied that it sometimes completes and sometimes needs a lot more time, trying to increase wait time and see if that helps.

* Made it possible to go directly to panel edit

* Fixes
2021-10-28 09:56:21 +02:00
ying-jeanne
681218275e
remove crit and trace (#40320) 2021-10-26 17:36:24 +02:00
Torkel Ödegaard
54af57b8e6
VisualizationSelection: Real previews of suitable visualisation and options based on current data (#40527)
* Initial pass to move panel state to it's own, and make it by key not panel.id

* Progress

* Not making much progress, having panel.key be mutable is causing a lot of issues

* Think this is starting to work

* Began fixing tests

* Add selector

* Bug fixes and changes to cleanup, and fixing all flicking when switching library panels

* Removed console.log

* fixes after merge

* fixing tests

* fixing tests

* Added new test for changePlugin thunk

* Initial struture in place

* responding to state changes in another part of the state

* bha

* going in a different direction

* This is getting exciting

* minor

* More structure

* More real

* Added builder to reduce boiler plate

* Lots of progress

* Adding more visualizations

* More smarts

* tweaks

* suggestions

* Move to separate view

* Refactoring to builder concept

* Before hover preview test

* Increase line width in preview

* More suggestions

* Removed old elements of onSuggestVisualizations

* Don't call suggestion suppliers if there is no data

* Restore card styles to only borders

* Changing supplier interface to support data vs option suggestion scenario

* Renamed functions

* Add dynamic width support

* not sure about this

* Improve suggestions

* Improve suggestions

* Single grid/list

* Store vis select pane & size

* Prep for option suggestions

* more suggestions

* Name/title option for preview cards

* Improve barchart suggestions

* Support suggestions when there are no data

* Minor change

* reverted some changes

* Improve suggestions for stacking

* Removed size option

* starting on unit tests, hit cyclic dependency issue

* muuu

* First test for getting suggestion seems to work, going to bed

* add missing file

* A basis for more unit tests

* More tests

* More unit tests

* Fixed unit tests

* Update

* Some extreme scenarios

* Added basic e2e test

* Added another unit test for changePanelPlugin action

* More cleanup

* Minor tweak

* add wait to e2e test

* Renamed function and cleanup of unused function

* Adding search support and adding search test to e2e test
2021-10-25 13:55:06 +02:00
kay delaney
db62ce477d
A11y/Dashboard: Fix various fastpass issues for dashboard settings (#40335)
* A11y/Dashboard: Fix various fastpass issue for dashboard settings
See #39429
2021-10-18 13:51:26 +01:00
Hugo Häggmark
30c1e7fa5c
A11y: Fix fastpass issues for /explore with gdev-testdata (#40309)
* A11y: Fix fastpass issues for /explore with gdev-testdata

* Chore: changes after PR feedback

* Chore: revert file to main

* Tests: fix for e2e tests
2021-10-13 06:09:35 +02:00
kay delaney
c443f244a0
A11y/Dashboard: Fix misc. fastpass issues (#40296)
* A11y/Dashboard: Fix misc. fastpass issues
See #39429
2021-10-12 13:26:01 +01:00
Ivana Huckova
19ad08e6b8
Prometheus: Run exemplars explore queries through backend (#39531)
* Prometheus: Run Explore both queries trough backend

* Refactor, simplify

* Set default values for query type selector

* Run multiple queries as one query trough backend

* Remove trailing newlines

* Pass utcOffset

* Remove trailing comma

* WIP: Implementatioon of exemplars

* add sampling for exemplars

* Refactor to use response as custom metadata

* Simplify processing of exemplars

* Update, clean up

* Refactor the way how we get available exemplars

* Simplify exemplars disabling and running on frontend

* Add tests

* Update toggle

* Remove console log

* Fix go linting

* Fix e2e test

* Trigger Build

* Compare lengts, small fix

* Remove duplicated time check

* Address feedback

* Remove redundant ! as not needed

* Update
2021-10-12 13:16:09 +02:00
kay delaney
b2e94d0733
Chore: Migrate yarn from v1 to v2 (#39082)
* Chore: Migrate yarn from v1 to v2

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-10-08 15:19:10 +01:00
kay delaney
75a55379f1
A11y: Fixes some fastpass errors for /datasources/* routes (#39577)
* A11y: Fixes some fastpass errors for /datasources/* routes
See #39429
2021-09-29 16:16:30 +01:00
Sarah Zinger
aeeaa67b0a
E2E: improvements to the importDashboard flow (#39693)
* E2E: improvements to the importDashboard flow
2021-09-29 10:27:49 -04:00
Sofia Papagiannaki
012d4f0905
Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746)
* Remove `ngalert` feature toggle

* Update frontend

Remove all references of ngalert feature toggle

* Update docs

* Disable unified alerting for specific orgs

* Add backend tests

* Apply suggestions from code review

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Disabled unified alerting by default

* Ensure backward compatibility with old ngalert feature toggle

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-29 16:16:40 +02:00
Hugo Häggmark
a6c5af19a6
Chore: Upgrades Cypress to 8.4.1 (#39573)
* Chore: Upgrades Cypress to 8.4.1

* Update typescriptPreprocessor.js

Found this https://github.com/cypress-io/cypress/issues/2316
2021-09-23 14:28:22 +02:00
Giordano Ricci
f79173c99d
Explore: Reuse Dashboard's QueryRows component (#38942)
* WIP

* Functional without custom wrapper component, needs highlight

* Remove latency from explore

* Sync eventbus

* Some cleanup & removal of unused code

* Avoid clearing queries when running all empty queries

* Run remaining queries when removing one

* Update snapshots

* fix failing tests

* type cleanup

* Refactor QueryRows

* update snapshot

* Remove highlighter expressions

* minor fixes in queryrows

* remove unwanted change

* fix failing e2e test

* Persist refId in explore url state

* make traces test slightly more robust

* add test for query duplication
2021-09-15 16:26:23 +01:00
Olof Bourghardt
458bced826
Jaeger: fix bug where query is executed twice (#38550)
* Jaeger: add empty callback to QueryField onBlur to stop query from being run twice

* Jaeger: add wait call on 500ms to accomodate for debouncing by the QueryField component
2021-08-27 10:36:18 +02:00
Olof Bourghardt
a19ad25eaa
Jaeger: support running queries with keyboard shortcut (#37958)
* Jaeger: add QueryField component

* Remove unused imports

* Fix e2e test so that it checks for QueryField component

* Remove comments

* Fix failing e2e test
2021-08-25 11:30:32 +02:00
An
7b813c81ac
revert: change to events canvas (#38023) 2021-08-18 15:47:25 -04:00
Hugo Häggmark
a160930e24
Chore: skip e2e test for examplars (#37991) 2021-08-18 08:29:03 +02:00
Sarah Zinger
f32d200fc0
E2E: Add support for data-test-id over aria labels and add importDashboard flow (#36483)
* E2E: Add support for data-testids and not just aria-labels.
2021-07-19 14:01:31 -04:00
Ashley Harrison
54f8996acf
Select: Portal select menu to document.body (#36398)
* ValueMappings: Force overflowing modal content to scroll

* ValueMappings: Update unit tests

* Select: Portal Select to document.body, close menu on scroll

* Select: Fix tests + apply updates from https://github.com/grafana/grafana/pull/32833

* ValueMappingsEditorModal: Revert to using selectEvent in the tests

* Select: Fix remaining unit tests

* Portal: Rewrite Portal as a functional component so we can use useTheme2

* Modal: Remove modal styles from this PR

* Update E2E tests

* More unit test fixes

* Select: Fix remaining E2E tests

* Select: Create util method to select an option in tests
2021-07-14 14:04:23 +01:00
Torkel Ödegaard
863b412d54
Transformations: State feature (alpha/beta) and more (#36630)
* Adding plugin state feature to transforms

* initial help box

* New HelpBox component

* More progress

* Testing

* Removing HelpBox, simple new design, new active state for OperationRowAction

* Updated tests

* Fixed typing issue

* Removed AlphaNotice

* Made focus and enter key trigger OnClick and sorted transformations

* Fixed e2e tests
2021-07-12 16:42:04 +02:00
Hugo Häggmark
866b2424ac
Chore: Upgrades Cypress to 7.5.0 (#35517)
* Chore: Upgrades Cypress to 7.5.0

* updating e2e test not to use momen.

* Fix trace viewer tests

* Chore: changing to exact version and removing console.logs

* Tests: refactor to handle day diffs

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-06-16 14:34:56 +02:00
Andrej Ocenas
9dafd4f863
NodeGraph: Show node graph collapsed by default with trace view (#34491)
* Show node graph collapsed by default with trace view

* Fix rename variable

* Change the message

* Add test

* Fix e2e test

* Remove expect in exemplars test

* Align icon

* review fixes
2021-05-26 15:11:47 +02:00
Andrej Ocenas
da1558e7a2
Explore: UI improvements to trace view (#34276)
* Various ui fixes

* Remove unused classes

* Fix opening of collapsible

* Fix pointer issue

* Update e2e test
2021-05-19 19:41:54 +02:00
Zoltán Bedi
32030f3929
Add e2e test for exemplars flow (#33972)
* Add e2e test for exemplars flow

* Check if data source is created

* Lets see what is going on

* Try again

* Updating the image maybe?

* Revert "Updating the image maybe?"

This reverts commit 968b44b0d9.

* Try with force

* Use electron

* Wait for new url?

* Wait?????

* Should be good now

* Revert e2e recording
2021-05-13 14:17:09 +02:00
Zoltán Bedi
1a504ce673
Jaeger: Search traces (#32805)
* WIP: Search jaeger traces

* Add more customizable query params

* Fix failing test

* Fix e2e test

* Add tags input field

* Minor changes

* Fix tests

* Add docs

* Make sure linking is working

* Add tests to datasource.ts

* Apply suggestions from code review

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update Jaeger doc

* UI updates

* Address review comments

* Add new screenshots to docs

* Update placeholder text for tags

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-05-11 10:38:10 +02:00
Torkel Ödegaard
724cbcd745
PanelEdit: Adds a table view toggle to quickly view data in table form (#33753)
* PanelEdit: Adds raw data toggle to quickly be able to view data in table form

* With transforms

* Updated name for toggle

* refactoring and added e2e test

* Support options

* fixing e2e
2021-05-07 17:09:06 +02:00
Jack Westbrook
34d81b7d13
Piechart: add e2e test (#33737) 2021-05-05 14:02:55 +02:00
Torkel Ödegaard
dbcfebac56
TimeSeries: Make timeseries the default panel and remove beta state (#33639)
* TimeSeries: Make timeseries the default panel and remove beta state

* rename old graph

* Updated panel descriptions, fixed e2e tests

* Updated text

* Fixed e2e

* Fixing e2e tests
2021-05-05 13:19:14 +02:00
Hugo Häggmark
86f2ed8ef2
e2e: refactors the most flaky tests (#33727) 2021-05-05 09:09:57 +02:00
Hugo Häggmark
810ece57bd
Chore: Adds better logging and longer timeout threshold (#33690) 2021-05-04 14:23:26 +02:00
Torkel Ödegaard
578283078b
PanelEdit: Improves viz picker ux, auto close on click (#33633)
* PanelEdit: Improves viz picker ux, auto close on click

* Fixing strict ts error

* Updated e2e
2021-05-03 16:49:09 +02:00
Hugo Häggmark
696a6ecd1e
Variables: Removes the never refresh option (#33533)
* Variables: Removes the never refresh option

* Tests: fixes DashboardModel repeat tests

* Tests: fixs snapshots

* Tests: fixes processVariable test

* Tests: fixes DashboardModel tests
2021-04-30 11:17:35 +02:00
Hugo Häggmark
b3642eb18d
e2e: slows down failing test (#33401)
* e2e: slows down failing test

* Update set-options-from-ui.ts
2021-04-27 08:53:43 +02:00