Commit Graph

169 Commits

Author SHA1 Message Date
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
Hugo Häggmark
f73be970d3
Variables: Removes experimental Tags feature (#33361)
* Variables: Removes experimental Tags feature

* Refactor: adds dashboard migration

* Tests: fixes snapshots

* Docs: removes docs for experimental feature

* Refactor: dummy change

* Docs: removes reference
2021-04-27 05:57:25 +02:00
Hugo Häggmark
6087980de0
Variables: Confirms selection before opening new picker (#32586)
* Variables: Confirms selection before opening new picker

* Tests: fixes e2e tests
2021-04-06 09:21:37 +02:00
Ryan McKinley
1446d094b8
API: return query results as JSON rather than base64 encoded Arrow (#32303) 2021-03-31 08:35:03 -07:00
Torkel Ödegaard
feaaa32ffd
Shortcuts: Fixes panel shortcuts so they always work (#32385)
* Shortcuts: Fixes panel shortcuts so they always work

* Updated snapshot
2021-03-29 07:52:57 +02:00
Torkel Ödegaard
9d6c8f8512
PanelEdit: v8 Panel Edit UX (#32124)
* Initial commit

* Progress

* Update

* Progress

* updates

* Minor fix

* fixed ts issue

* fixed e2e tests

* More explorations

* Making progress

* Panel options and field options unified

* With nested categories

* Starting to find something

* fix paddings

* Progress

* Breakthrough ux layout

* Progress

* Updates

* New way of composing options with search

* added regex search

* Refactoring to react note tree

* Show overrides

* Adding overrides radio button support

* Added popular view

* Separate stat/gauge/bargauge options into value options and display options

* Initial work on getting library panels into viz picker flow

* Fixed issues switching to panel library panel

* Move search input put of LibraryPanelsView

* Changing design again to have content inside boxes

* Style updates

* Refactoring to fix scroll issue

* Option category naming

* Fixed FilterInput issue

* Updated snapshots

* Fix padding

* Updated viz picker design

* Unify library panel an viz picker card

* Updated card with delete action

* Major refactoring back to an object model instead of searching and filtering react node tree

* More refactoring

* Show option category in label when searching

* Nice logic for categories rendering when searching or when only child

* Make getSuggestions more lazy for DataLinksEditor

* Add missing repeat options and handle conditional options

* Prepping options category to be more flexibly and control state from outside

* Added option count to search result

* Minor style tweak

* Added button to close viz picker

* Rewrote overrides to enable searching overrides

* New search engine and tests

* Searching overrides works

* Hide radio buttons while searching

* Added angular options back

* Added memoize for all options so they are not rebuilt for every search key stroke

* Added back support for category counters

* Started unit test work

* Refactoring and base popular options list

* Initial update to e2e test, more coming to add e2e test for search features

* Minor fix

* Review updates

* Fixing category open states

* Unit test progress

* Do not show visualization list mode radio button if library panels is not enabled

* Use boolean

* More unit tests

* Increase library panels per page count and give search focus when switching list mode

* field config change test and search test

* Feedback updates

* Minor tweaks

* Minor refactorings

* More minimal override collapse state
2021-03-25 08:33:13 +01:00
Dominik Prokop
a55a272276
Routing NG: Replace Angular routing with react-router (#31463)
* Add router packages

* Get react app root work instead of Angular one

* Logger util

* Patch Angular routing ($routeProvider, $routeParamsProvider)

* Use react-router-dom history instead of separate dependency

* Add test routes

* Sidemenu - use Link instead of anchors

* Patch Angular $location service (stub)

* WIP: geting rid of $location provider from TimeSrv

* Intercept anchor clicks to use history under the hood

* Sync Redux location slice with history state

* Make login/logout work

* Debug routes for testing

* Make force login work

* Make sure query param change does not recreate page components

* Hide side menu in specified locations

* Make the dashboar route query parameters work, make panel edit menu work

* Enable more routes

* Fix side menu

* Handle view modes

* Disable playlist routes

* Make SafeDynamicImport work again

* Bring back router-debug

* Separate redux location sync from route rendering

* Refactor updateLocation to thunk and move force refresh(login) to it

* Fixing init dashboard issue

* Support switching between dashboards without an unmount of DashboardPage

* More fixes for init dashboard and panel edit

* More type fixes

* Moving angular location wrapper out of main LocationService, and fixing typescript issues

* Fixed last typescript errors

* LocationService: Move to runtime and  remove getLocationService and export singleston const instead (#31523)

* Moving location service implementation to runtime and removing get function and making it a package const singleton

* Added test that used locationService directly

* removed unused import

* AngularApp: Moving angular dependencies and the app boot out of the main app into it's own file  (#31525)

* Fixes angular panels by calling the monkey patch

* Moving angular stuff to to it's own files

* udpated

* Fixing clicking on divs and spans inside anchor

* Moving app notifications out of angular app and removing angular directive wrapper

* Moving search from angular to react and removing angular search wrapper

* Clean up, tried to remove the redux location wrapper but requires a big update for DashboardPage, so adding it back

* Moving AppWrapper to root to limit circular dependencies (app/core -> app/routing and back)

* Open and close search now works

* Hide sidemenu when in kiosk mode

* Restoring some keybindings like ESC key

* Removed kiosk events and simplified it, just handled through updating URL

* Fixing typescript errors

* Simplified GrafanaRouteComponentProps and renamed to ContainerProps

* renamed back

* Changed AlertRuleList to use GrafanaRouteComponentProps and location.search passed to it

* Removing the reloadOnSearch property, this is not needed now for react as react by default does not unmount components when only url match or query parmas change

* SafeDynamicImport causing unmount un every search update, not sure how to fix yet

* Fix signature for SafeDynamicImport so we do not create new route components on every route render

* Removing the redux location wrapper as it was causing errors, and making dashboard page work with RouteProps (location, match) etc

* Updating DashboardPage and SoloPanelPage to use match params and history location

* Fixed DashboardPage tests

* Fixing solo route tests

* LocationService: Rename getCurrentLocation to just getLocation

* do not intercept link clicks with target blank or self

* Experimental useUrlParams hook

* Update DataSourceSettingsPage to use router match params

* fix links with urls that have no starting / to work like before

* Fix forceLogin

* Add queryParams to GrafanaRouteComponentProps

* PanelEditor get rid of updateLocation and location state

* Improve grafana route query params typing

* Add getSearchObject to LocationService

* Use DashboardPAge queryParams instead of location.search parsing

* Fix DashboardPage typing

* Fix some tests weirdness

* Bring back KeyboardSrv

* Fixes typescript issues

* Team pages now use router match params

* Get rid of  from GrafanaRouteComponent props

* Removed unnessary calls to getSearchObject when calling locationService.partial

* Updated DashboardPage tests after queryParams was added

* Fixing dashboard settings back

* GrafanaRoute: Adding tests and remove use of global locationService

* Fixing tests and typescript errors

* Bring back kiosk modes and add tests

* Fix TimeSrv tests

* Fix typecheck errors

* Fixing tests

* Updated SideMenu test to react-testing and wrapped component in Router, and fixed issue importing createMemoryHistory

* Get rid of routeChange event from TimeSrv from

* Fixed TopSectionItem test

* Trying to make basename work but failing

* Update TopSectionItem snapshot

* Fix TopSectionItem snapshot test

* Fix API keys creation

* Remove Angular dependencies from KeybindingSrv (#31617)

* Remove Angular dependency from KeybindingsSrv

* Fix tests and typecheck issues

* basename is starting to work

* Make dashboard save work

* KeybindingSrv: Remove as angular service and no usage angular scope

* So long bridge_srv, we won't miss you

* Update snapshots

* Dashboard: Refactoring ChangeTracker to use History api and no angular (#31653)

* Dashboard: Refactoring ChangeTracker to use History api and no angular

* Updated

* Removed logging

* fixed unit tests

* updated snapshots

* Mechanism for force reloading routes (#31683)

* e2e: Fixes various things in e2e scenarios after router migration (#31685)

* Explore: Update reading query params from router props and updating location via locationService (ReactRouter)  (#31688)

* RoutingNG: Initial explore redux location to router location migration

* Updated explore Wrapper tests

* Fixing more tests

* remove loggin

* rename back to make naming consistent

* Fixing return to dashboard button

* fixing navigation to explore from dashboard

* updated routeProps

* Updated tests

* Make DashboardListPage work

* Fixing navigation after add new data source, and fixes explore e2e

* Fixing solo panel page

* PluginsPage now works

* RoutingNG: When parsing and rendering url search/query params preseve old logic of handling booleans and arrays (#31725)

* RoutingNG: When parsing and rendering url search/query params preserve old logic of handling booleans and arrays

* Fixed test

* Make snapshots list work

* fixed alert notification channel edit page

* Simplify LocationService, did not need special handling for login or forceLogin as target _self on link already handles that

* fixed UserAdminPage

* fixed edit orgs page

* Fixing LdapPage

* fixing dashboard import

* Fixed new folder page

* Fixed data source dashboards page

* fixing Folder permissions and folder settings page

* fixing snapshot list page nav model

* remove unused file

* Added placeholder page for playlist

* Moved browser compatability to index-template

* Restored 404/default page

* Fixed reset password page

* Fixed SignUpInvited page

* Fixing CreateTeam, Create user page, add panel widget

* Restore browwser file to make tests happy

* Fixed unit tests

* Removed unused import

* Replacing usage of updateLocation

* Fixed test

* Updating search filters to use history / location service for filters

* remove unused file

* AppRootPage fixed

* Fixing test and search issue

* Changes to support enterprise extensions

* remove console.log

* Removing more use of redux location

* Fixed signup page

* removed unused old angular controllers

* Fixing bugs

* one final bugfix

* Removed location from redux state

* Fixing ts issues and tests

* Fixing test issue

* fixing tests

* Fixing tests

* removed unused stuff

* Fixed search test

* Adding some doc comments

* Routing NG: Angular location provider patch (#31773)

* Patch Angulars $location provider

* Update public/app/angular/bridgeReactAngularRouting.ts

* Remove only test

* Update tests, disable loggers in test env

* Routing NG: remove $location provider usage (#31816)

* Remove dashboard_loaders

* Remove $location from Analytics service, track page views form GrafanaRoute

* Remove NotificationsEditCtrl

* Remove Angular dependencies from uploadDashboardDirective

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

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

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

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

* Remove unused test helpers (#31831)

* Playlist react (#31829)

* playlist list in react

* Playlist start

* Things started to work

* Updated

* Handle empty list

* Fix ts

* Fixes and kiosk mode stuff

* Removed unused events

* fixing ts issue

* Another ts issue

* Fixing tests

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>

* fixed test

* Update public/app/AppWrapper.tsx

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

* Update public/app/AppWrapper.tsx

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

* Remove Angular dependency from DashboardLoaderSrv (#31863)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-03-10 18:03:36 +01:00
Zoltán Bedi
04a067e599
TraceViewer: Fix show log marker in spanbar (#30742)
* TraceViewer: Fix show log marker in spanbar

* Revert changes and use UITooltip and UIPopover

* Change logmarker color

* e2e: wait for trace view

* Record cypress run ONLY FOR TESTING

* Move fixture to e2e

* Get details TEST ONLY

* test

* Use jaeger's theme instead of grafana's

* Revert "Record cypress run ONLY FOR TESTING"

This reverts commit 35c087b3c5.

* Revert "Move fixture to e2e"

This reverts commit fab88cc54c.
2021-02-24 14:18:52 +01:00
Ivana Huckova
58968e1ceb
Devenv: Remove old-versioned loki blocks and update prometheus2 block (#31282)
* Remove very old-versioned loki blocks

* Update prometheus block from 2.7.2 to latest

* Remove data sources in Grafana

* Fix e2e test not to intercept the whole url

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-02-19 18:06:09 +01:00
Hugo Häggmark
2a3aa95163
Variables: Adds queryparam formatting option (#30858)
* Variables: Adds queryparam formatting option

* Chore: fixes strict errors

* Chore: changes after PR comments
2021-02-05 07:16:06 +01:00
Zoltán Bedi
76d02048fa
TraceViewer: Fix lazy loading (#30700)
* Trace: Fix lazy loading

* Add e2e test for trace view lazy load scrolling

* Remove sensitive information

* Update e2e/suite1/specs/trace-view-scrolling.ts

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

* Address review comments

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-02-02 10:17:38 +01:00
Marcus Efraimsson
043d6cd584
Backend Plugins: Convert test data source to use SDK contracts (#29916)
Converts the core testdata data source to use the SDK contracts and by that 
implementing a backend plugin in core Grafana in similar manner as an external one.

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Marcus Efraimsson <marefr@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-01-29 18:33:23 +01:00
Vicky Lee
b8dd50c297
bump cypress to 6.3.0 (#30644)
* bump cypress to 6.3.0

* fix inspect-drawer spec

* fix panelEdit_base spec

* fix select-focus spec

* Apply suggestions from code review

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

* add be.visible assertion to new-query-variable spec to avoid flakiness

* increase waits in new-query-variable spec to avoid flakiness

* increase waits in new-query-variable spec by another 500

* remove be.visible assertion added before

* Chore: trying to fix flakiness

* skip the new-variable-query e2e test

* Chore: refactor so we might avoid flakiness

* Revert "skip the new-variable-query e2e test"

This reverts commit 203c1875c2.

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-01-29 15:01:50 +00:00
Torkel Ödegaard
701ad79bb5
PageToolbar: Extracting navbar styles & layout into a modern emotion based component (#30588)
* Explore: Replaces navbar-button and overriden explore button css classes with ToolbarButton and cleans up scss & markup, removes ResponsiveButton

* Change live button text when paused

* For the dashboard toolbar button I need a transparent button so I refactored the states/variants into a new ToolbarButtonVariatn

* PageToolbar wip

* Progress

* Prgress

* Minor progress

* Fixed back button and responsive titles

* Fixed tv mode

* Updated

* support tv modes and playlist

* more progress

* Fixing lots of view states and responsive features

* Minor fixes

* review fixes

* Fixes to e2e tests

* Review fixes
2021-01-27 15:02:04 +01:00
Torkel Ödegaard
2a21f067b7
ButtonSelect & RefreshPicker: Rewrite of components to use new emotion based ToolbarButton & Menu (#30510)
* ButtonSelect: Trying to rewrite the button select to use ToggleButtonGroup & Menu

* minor update

* Progress

* Updated

* Moving all the explore scenarios into the refresh picker component

* Minor fixes

* Fixed responsive part of run button

* More minor fixes

* typescript fix

* Update packages/grafana-ui/src/components/Icon/Icon.tsx

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

* Update packages/grafana-ui/src/components/Menu/Menu.tsx

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

* Review feedback fixes and more

* Fixes small ts issue

* Updated return to dashboard button and tests, moved ButtonSelect out of LegacyForms

* fixed ts issue

* Fixed test

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-01-23 08:17:50 +01:00
Hugo Häggmark
de511b0f48
Chore: adds wait to e2e test (#30488) 2021-01-21 12:34:18 +01:00
Torkel Ödegaard
1d689888b0
Prettier: Upgrade to 2 (#30387)
* Updated package json but not updated source files

* Update eslint plugin

* updated files
2021-01-20 07:59:48 +01:00
Zoltán Bedi
b649bfc270
Prometheus: Add support for Exemplars (#28057)
* Fix typos

* Query exemplars API

* Add link to traceID

* Update exemplar to show more information

Reduce exemplars density

* Fix typos

* Query exemplars API

* Add link to traceID

* Update exemplar to show more information

Reduce exemplars density

* Update GraphNG legend type

* Show new graph component in Explore

* Add exemplar annotation a design update

* Graph panel not to show red line annotation

Exemplar plugin to use y value

* Address review comments

* Density filter for exemplars

* Update schema of exemplars

* Density filter with y-value sampling

* Enforce axis scales to include 0

* Changes after merge with master

* Show metrics when there is no result

* Decorators tests fix

* ExemplarMarker to receive component prop

* Remove context menu from explore graph

* Add color to graph

* Update explore graph panel

* Update graph config to use default values

* Fix data source tests

* Do not show exemplars outside of graph

* Add exemplars switch

* Fix typos

* Add exemplars query only when enabled

* Show graph in explore without filling it

* Update exemplars plugin y value scale selection

* Update tests

* Add data source picker for internal linking

* Increase pointSize for better visibility

* Fix explore e2e test

* Fix data link title variable interpolation

* Use new switch component in PromExemplarField

* Move FieldLink component to new file

* Convert exemplar to datalink

* Add legend toggling logic to Explore

* Add legend toggling to Explore

* Address Ivana's feedback

* Address Andrej's comments

* Address Gio's feedback

* Add tests for result_transformer

* Fix eslint issues

* Change sampler formula for better readability

Co-authored-by: David Kaltschmidt <david@leia.lan>
Co-authored-by: David Kaltschmidt <david@leia.fritz.box>
Co-authored-by: David Kaltschmidt <david.kaltschmidt@gmail.com>
2021-01-15 16:20:20 +01:00
Torkel Ödegaard
b342e4f044
InlineSwitch: Minor story fix (#30186)
* InlineSwitch: Minor story fix

* Fix e2e test
2021-01-11 14:44:48 +01:00
Torkel Ödegaard
c0eadeba3a
Gauge: Fixes issue with all null values cause min & max to be null (#30156) 2021-01-11 13:25:08 +01:00
Torkel Ödegaard
314865dd88
InlineSwitch: Added missing InlineSwitch component and fixed two places that used unaligned inline switch (#30162)
* InlineSwitch: Added missing InlineSwitch component and fixed two places that used unaligned inline switch

* Fixed e2e tests
2021-01-11 10:50:17 +01:00
Agnès Toulet
4de784065d
Drone: Update pipelines for Enterprise (#29939)
* update E2E tests

* fix e2e tests for new pipelines

* Add enterprise2 test, build, package and upload steps

* fix missing linting step

* Upgrade build pipeline tool

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grabpl lint-backend

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor publishing

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor package publishing

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Supply --simulate-release flag to publish-packages for simulating a release

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Run e2e tests with specific ports

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* e2e/start-server: Make more robust

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-23 15:42:20 +01:00
Torkel Ödegaard
3d6380a0aa
QueryGroup & DataSourceSrv & DataSourcePicker changes simplify usage, error handling and reduce duplication, support for uid (#29542)
* Starting moving more stuff into data source picker

* WIP progress

* Progress on datasource picker rethink

* Things are working now some details to figure out

* Removed commented part

* Complex work on getting data source lists

* Fixed variable support showing correct data sources

* Tried fixing dashboard import but failed

* Fixes

* Fixed import dashboard

* Fixed unit test

* Fixed explore test

* Fixed test

* Fix

* fixed more tests

* fixed more tests

* fixed showing which option is default in picker

* Changed query variable to use data source picker, updated tests and e2e

* Fixed more tests

* Updated snapshots, had wrong typescript version
2020-12-04 14:24:55 +01:00
Hugo Häggmark
b8fec209a9
Chore: skip flaky tests (#29537) 2020-12-02 15:16:57 +01:00
Hugo Häggmark
3dcfe54d8d
Variables: Fixes Textbox current value persistence (#29481)
* Variables: Fixes savequery for Constant and TextBox variables

* Refactor: reverts textbox changes

* Refactor: Fixes dashboard export and tests

* Refactor: hides or migrates Constant variables

* Tests: fixes snapshots

* Variables: Fixes Textbox current value persistance

* Refactor: fixes PR comments and adds e2e tests
2020-12-02 14:08:35 +01:00
Totalus
754aca25c5
Transformation: added support for excluding/including rows based on their values. (#26884)
* Adding FilterByValue transformer skeleton

* Connecting options with Editor

* Improving UI and making deep copy of options on change.

* Improving Transformation Editor UI

* Implementing Regex filtering

* Adding valueFilters.ts and creating filter registry

* Connecting the test function

* Correcting TypeScript errors

* Using FilterInstance instead of simple Filter test function

* Adding field.type as filter options

* Improving UI. Adding custom placeholder depending on filter.

* Implementing a few more filter types

* Implementing more filters

* Return original data if no filter were processed

* Improving UI

* Correcting TS errors

* Making sure inequality transform are invalid until the filterExpression is not empty

* Cleanup in the UI file

* Improving UI (highlight invalid fields)

* Only show filterType that are supported for the selected field

* Adding tests + correction of a filter

* Adding transformer test

* Adding doc

* Cleanup

* Typing props for FilterSelectorRow component

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Moving rendering in the JSX

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Memoizing filterTypeOptions computation

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Improve code compactness

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Cleanup + solving TS errors

* Updating some labels

* Wrapping stuff around useMemo and useCallback

* Using cloneDeep from lodash

* Don't highlight field name input if null

* Removing time type fields in selectable options

* We want loose equality in this scenario.

* Adding `onChange` to useCallback dependencies

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>

* Include or exclude matching any or all conditions

* Correcting field name matching

* Cleanup

* Don't highlight the filterExpression input when its empty

* Adding Range filter

* Updating doc

* Correcting TS error

* Only showing the Match All/Match Any option if more than one condition

* Two inputs for the Range filter instead of one

* Improving invalid highlight for Range filter type

* Cleanup

* Improving labels in UI

* Using ButtonSelect to improve UI

* editor UI updates.

* Updating tests

* Adding component for Regex

* Improve TS typing

* Adding components for the other filter types.

* Cleanup

* Correct error

* Updating valueFilter.test.ts

* Updating filterByValue.test.ts

* Reverting and removing Range filter

* Update docs/sources/panels/transformations.md

* starting to implement poc.

* added a small poc.

* wip

* added tests.

* added structure for dynamic value matcher editors.

* added more support.

* added some more value matchers.

* removed unused value filters.

* added some more matchers.

* adding more matchers.

* added a range matcher.

* fixing some tests.

* fixing tests.

* remove unused dep.

* making the matching a bit more performant.

* UX improvements and alignment fixes

* fixed delete button.

* fixed some spacing in the UI.

* added docs for matchers.

* adding docs and exposing value matcher types.

* will store dateTime as string.

* updated docs according to feedback.

* moved filter by value in transformation list.

* Improved description.

* added regex value filter.

* added support for regex.

* fixing failing tests.

Co-authored-by: Marcus Andersson <systemvetaren@gmail.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2020-12-01 10:22:37 +01:00
Hugo Häggmark
465735a7e4
Chore: Adds e2e tests for Variables (#29341)
* Variables: Adds description field

* Refactor: Adds new Form components

* Refactor: Fixes aria labels

* Refactor: removes skipped tests

* Tests: Adds e2e tests for loading variables from URL

* Tests: Adds set options from ui

* Tests: Adds create query variable tests

* Chore: removes skipped tests

* Refactor: Breaks out smaller select components

* Refactor: removes gf-form div

* Refactor: Breaks up several more selects into smaller components

* Chore: Fixes typings
2020-11-26 10:31:34 +01:00
Hugo Häggmark
04d857dfe6
Variables: Adds description field (#29332)
* Variables: Adds description field

* Refactor: Adds new Form components

* Refactor: Fixes aria labels

* Refactor: removes skipped tests

* Refactor: Breaks out smaller select components

* Refactor: removes gf-form div

* Refactor: Breaks up several more selects into smaller components

* Chore: Fixes typings
2020-11-25 10:21:48 +01:00
Marcus Andersson
4c0aa4acd5
DashboardLinks: will only refresh dashboard search when changing tags for link. (#29040)
* fixing so we dont run multiple dashboard links searches when changing variables.

* changed so we fetch the list when open the dashboard links dropdown.

* removed verification of unneccesary requests.
2020-11-18 07:11:36 +01:00
Marcus Andersson
dbaf213f8a
Variables: added __user.email to global variable (#28853)
* added email to global variable.

* forgot to increase the count.
2020-11-05 15:26:08 +01:00
Torkel Ödegaard
d3def11521
TestData: Remove useEffect that triggeres query on component load (#28321)
* TestData: Remove useEffect that triggeres query on component load

* Updated

* Update e2e spec
2020-10-20 18:18:14 +02:00
Torkel Ödegaard
566cd2c6af
ColorSchemes: Adds more color schemes and text colors that depend on the background (#28305)
* Adding more color modes and text colors that depend on the background color

* Updates

* Updated

* Another big value fix

* Fixing unit tests

* Updated

* Updated test

* Update

* Updated

* Updated

* Updated

* Updated

* Added new demo dashboard

* Updated

* updated

* Updated

* Updateed

* added beta notice

* Fixed e2e test
2020-10-19 10:25:27 +02:00
Alex Khomenko
3225b119d4
Migration: TestData Query Editor (#27997)
* Use new editor

* Add basic fields

* Add labels

* Add ids

* Add ManualEntryEditor

* Use tooltip prop

* Switch to inline labels

* Fix inline label tooltip position

* Allow resetting max-width

* Replace form inputs

* Add random walk editor

* separate editors

* Add logs and endpoints fields

* Add PredictablePulseEditor

* Add CSVWaveEditor

* Add grow prop

* Add default query

* Fix types

* Fix manual editor

* Fix type issues

* Handle scenario change

* Sort scenarios by label

* Add ManualEditor test

* Fix label height

* test manual editor

* Update test

* Setup QueryEditor tests

* Fix selected value

* Connect CSVWaveEditor

* Convert stream data to numbers

* Fix random walk editor

* Cleanup

* Convert scenarios to ts

* Remove extra icon styles

* Minor tweaks

* Update e2e tests

* Remove useEffect

* Add missing aria-labels

* Use new button components
2020-10-14 13:08:35 +03:00
Hugo Häggmark
845bc7c444
Variables: Adds loading state and indicators (#27917)
* Refactor: Replaces initLock with state machine

* Refactor: removes some states for now

* Refactor: adds loading state in OptionsPicker

* Refactor: major refactor of load state

* Refactor: fixes updating graph in parallell

* Refactor: moves error handling to updateOptions

* Refactor: fixes the last cases

* Tests: disables variable e2e again

* Chore: removes nova config

* Refactor: small changes when going through the code again

* Refactor: fixes typings

* Refactor: changes after PR comments

* Refactor: split up onTimeRangeUpdated and fixed some error handling

* Tests: removes unused func

* Tests: fixes typing
2020-10-02 07:02:06 +02:00
Hugo Häggmark
fa2781391a
DashboardLinks: values in links are updated when variables change (#27926)
* DashboardLinks: values in links are updated when variable changes

* Tests: adds e2e test that verifies links
2020-10-01 08:44:56 +02:00
Marcus Andersson
7feaddea8f
Chore: adding platform independent typings for e2e tests. (#27768)
* added typings that are platform independent in the tests.

* fixing nits.
2020-09-24 18:47:25 +02:00
Torkel Ödegaard
c450ffd711
ImageRendering: Fix rendering panel using shared query in png, PDF reports and embedded scenarios (#27628)
* ImageRendering: Fixed issue rendering panel using shared query

* Fixed spelling
2020-09-17 07:35:24 +02:00
Torkel Ödegaard
8759a91222
PanelEdit: Drag and drop query order & UI tweaks (#27502)
* PanelEdit: Drag and drop query order & UI tweaks

* Fixed width of title issue

* added correct color and hover

* Updated e2e tests
2020-09-14 08:54:42 +02:00
Marcus Andersson
0c8390cea2
Templating: global/system variables should be properly replaced in templated values. (#27394)
* Fixed so we try to use the variables in the redux store to replace values in template variables.

* First draft of working version.

* Including fieldPath when adding :text format.

* cleaned up code by introducing helper function.

* some minor refactoring.

* Added tests and support for multi variables.

* added test and code to handle the All scenario of a multivariable.

* fixed according to feedback.

* added docs.

* added text format to gdev dashboard.

* updated e2e tests.

* make sure we use the same function for formatting och variable lable.

* increased the number to 22.

* changed label for tests to be All.

* existing format should be respected.
2020-09-14 08:05:51 +02:00
Alex Khomenko
a1e6090008
Grafana-UI: BarGauge docs (#27188)
* Grafana-UI: Add mdx file

* Grafana-UI: remove _BarGauge.scss

* Grafana-UI: Update snapshot

* Grafana-UI: Fix tests

* Grafana-UI: Use selector
2020-08-26 14:44:08 +03:00
Hugo Häggmark
fcb3130076
e2e: Adds error catching to prevent flakiness (#27211)
* e2e: Adds error catching to prevent flakiness

* e2e: fixes if statment and cleans up wait
2020-08-26 10:15:34 +02:00
Torkel Ödegaard
5398ef1103
Templating: Fixed recursive url update issue for textbox variable (#26981)
* Templating: Fixed recursive url update issue for textbox variable

* Updated link

* updated e2e
2020-08-13 14:38:27 +02:00
Hugo Häggmark
f92bc0994d
TextPanel: Fixes issue when interpolation of variables stops working (#26847)
* TextPanel: Fixes issue when interpolation of variables stops working

* Tests: fixes broken typing in test

* Tests: updates e2e dashboard to html so we get the raw strings

* Tests: reverted back to markdown and fixed a bug
2020-08-10 06:38:22 +02:00
Torkel Ödegaard
00769f19c2
E2E: Adding globals variables and interpolation format gdev test dashboard and e2e test (#26827) 2020-08-06 14:54:24 +02:00
Arve Knudsen
d28d495235
Chore: Enable PR testing in Drone (#26189)
* Add Drone configuration

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build front-end before testing it

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade grafana/build-container

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add packaging step

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Trigger on push

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove some steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Enable steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Install Dockerize

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use node image for test-frontend

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Increase number of test workers

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Make plugin installation depend on frontend tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Make integration tests depend on frontend tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grafana/build-container also for front-end tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade dependencies in order to fix front-end tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Depend on es-check

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Dont' depend on tests before building front-end

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix packaging

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Simplify

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Try to build images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove steps

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Install netcat

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Include golangci-lint with grafana/build-container

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build storybook and docs website

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use build image with root user

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drop CircleCI dependencies

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix e2e under Drone

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Execute e2e server separately

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use own plugin for building Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use Starlark to configure Drone

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add enterprise steps to pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add more enterprise steps to pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Maintain Yarn cache

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build enterprise Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Build Ubuntu Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Refactor

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add Postgres integration test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Add MySQL integration test

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Parameterize integration test DB connections

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Categorize integration tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use grabpl integration-tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unintended change

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Disable Ubuntu Docker images for PR pipeline

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Regenerate yarn.lock

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade grabpl

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Restore Yarn cache before installing in grafana-enterprise

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Use separate pipelines for OSS and enterprise

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Let OSS builds depend on tests

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Restore Go cache before building back-end

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Reduce number of variants built for PRs

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix building of Docker images

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Simplify logic

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Use Starlark

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Fix syntax error

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Convert .drone.star to YAML

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Upgrade AWS Go SDK

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Drone: Fix Go linting

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Undo irrelevant changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Revert "Undo irrelevant changes"

This reverts commit 5152f65972.

* Undo irrelevant changes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* e2e: Support Circle

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* TypeScript fixes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* TypeScript fixes

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* More Drone support

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unused script

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Fix build on Circle

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove TODO comment

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-10 16:09:21 +02:00
Torkel Ödegaard
c5cd9c5648
E2E: Trying to fix flake e2e (#26063) 2020-07-04 17:30:41 +02:00
Hugo Häggmark
d21558231f
TextPanel: Adds proper editor for markdown and html (#25618) 2020-06-29 12:17:31 -07:00
Steven Vachon
fb3bec058a
@grafana/e2e: improvements (#25708)
* Set time range when opening a dashboard

* Set UTC timezone when creating a dashboard

* Added flow for selecting options in custom select fields

* Fix flaky test
2020-06-26 13:33:05 -04:00
Marcus Andersson
1abbb477cf
TimeZone: unify the time zone pickers to one that can rule them all. (#24803)
* draft on a unified TimeZonePicker.

* most of the data structures is in place.

* wip.

* wip.

* wip: timezone selector in progress.2

* fixed so we have proper data on all timezones.

* started to add timezone into time picker.

* addeing time zone footer.

* footer is working.

* fixed so we use the timeZone picker in shared preferences.

* Added so we can change timeZone from picker.

* did some styling changes.

* will update timezone on all places that we need to update it.

* removed console.log

* removed magic string.

* fixed border on calendar.

* ignoring eslint cache.

* cleaned up the code a bit.

* made the default selectable.

* corrected so the behaviour about default works as expected.

* excluded timezone from change tracker.

* revert so default will always be the intial value.

* default will always fallback to the one in the config.

* do the country mapping on startup.

* fixed nit.

* updated snapshots for timepicker.

* fixed build errors.

* updating so snapshot tests is in sync.

* removed Date.now from prop since it will change each run in the snapshot tests.

* fixed so e2e tests works as before.

* moved files into separate folders.
2020-06-26 09:08:15 +02:00
Hugo Häggmark
54565349c5
e2e: uses e2e() instead of cy to make things consistent (#25390) 2020-06-05 11:23:20 +02:00
Hugo Häggmark
29598d83ce
e2e: waits for requests to minimize flakiness (#25368) 2020-06-05 06:53:47 +02:00
Josh Soref
ed92b41d47
Chore: spelling - misc (#24438)
* Chore: spelling - misc

* fix master merge
2020-06-04 06:51:30 +02:00
Hugo Häggmark
4c92bd1539
e2e: disables variables tests (#25296) 2020-06-02 16:05:31 +02:00
Torkel Ödegaard
3833aa416d
Transformations: Fixed transformation crash issue (#25152)
* Transformations: Fixed transformation crash issue

* Updated
2020-05-28 08:06:24 +02:00
Zoltán Bedi
29afc2feb8
Explore: fix undo in query editor (#24797)
* Explore: fix undo in query editor

* Add e2e test for regression
2020-05-19 15:41:52 +02:00
Dominik Prokop
f769ed035d
PanelEdit: Make sure side pane is displayed with tabs by default (#24636)
* Make sure side pane is displayed with tabs by default

* Update e2e tests for
2020-05-14 09:55:40 +02:00
Hugo Häggmark
7d800e7318
e2e: adds verify release (#24568) 2020-05-12 12:48:26 +02:00
Marcus Andersson
a521a39ebf
TimeZone: added e2e tests for the custom time zone support. (#24442) 2020-05-11 11:46:57 +02:00
Hugo Häggmark
0fe9e7e242
e2e: upgrades Cypress to 4.50 (#24099)
* Chore: upgrades Cypress to 4.5.0

* Refactor: splits up huge it into several

* Refactor: prevent flakiness

* Refactor: updates yarn.lock

* Refactor: changes after PR comments

* Refactor: uses e2e.flows instead of import
2020-05-04 14:44:25 +02:00
Marcus Efraimsson
94efd06858
End2end: Make it possible to run e2e tests with BASE_URL (#24041) 2020-05-03 13:51:30 +02:00