Commit Graph

3698 Commits

Author SHA1 Message Date
Hugo Häggmark
bde01e8771
E2E: adds recordings (#42622) 2021-12-02 10:21:31 +01:00
Hugo Häggmark
0a50de14d3
E2E: forcing dashboard title type (#42574) 2021-12-01 13:54:22 +01:00
Piotr Jamróz
e170073aff
A11y: Add aria-label and placeholder to Timeout & Access fields in HTTP Settings (#42559)
* Add aria label and placeholder to timeout input

* datasource settings: improved a11y

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-12-01 13:32:46 +01:00
renovate[bot]
e89c9b9194
Update dependency @types/angular to v1.8.3 (#42471)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-30 16:26:18 +00:00
Uchechukwu Obasi
0cde13d51f
ColorPickerPopover: apply react-aria for a11y support (#42444)
* add focus trapping to colorPickerPopover

* make popover exit using esc key

* fix colorPickerPopover to be tabbable

* fix focus escape in colorPickerPopover

* revert to focus trap fix
2021-11-30 16:26:50 +01:00
renovate[bot]
34f6873d2d
Update dependency @testing-library/user-event to v13.5.0 (#42465)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-30 10:45:21 +01:00
Torkel Ödegaard
1f8336e5fe
DataSourceVariable: Fixes issue repeating panels by data source variable (#42462) 2021-11-29 20:32:18 +01:00
renovate[bot]
868428528f
Update dependency @testing-library/jest-dom to v5.15.1 (#42463)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 18:12:47 +01:00
renovate[bot]
98dcac7596
Update dependency @testing-library/dom to v8.11.1 (#42461)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 16:22:20 +00:00
renovate[bot]
2c62ab5ceb
Update dependency @storybook/addon-knobs to v6.4.0 (#42460)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 16:21:04 +00:00
renovate[bot]
d5b8522af2
Update dependency @cypress/webpack-preprocessor to v5.10.0 (#42382)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 15:58:32 +00:00
renovate[bot]
85306ebf7e
Update dependency @react-aria/focus to v3.5.0 (#42400)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 15:43:06 +00:00
Torkel Ödegaard
c3d0d37bd7
ValueMappings: Fixes issue with regex value mapping that only sets color (#42311)
* ValueMappings: Fixes issue with regex value mapping that only sets color

* Fixed test name
2021-11-29 16:03:13 +01:00
renovate[bot]
6e8cc426d6
Update babel monorepo (#42381)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 12:54:29 +01:00
renovate[bot]
40339fe912
Update dependency @monaco-editor/react to v4.3.1 (#42388)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-29 12:35:59 +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
Torkel Ödegaard
820aa3ac59
Statetimeline/TimeSeries/BarChart: Limit y label width to 40% of visualiation width (#42350) 2021-11-26 14:15:57 +01:00
Torkel Ödegaard
5c4fd91cd3
BarGauge: Limit title width when name is really long (#42346) 2021-11-26 11:31:28 +01:00
Torkel Ödegaard
781067ee45
VisualizationSuggestions: Support image & text instead of real previews. Adds suggestions for all non data panels when there are no data (#42074)
* Make suggestion cards support img & text mode instead of only preview

* Generic solution for non data panels

* minor review tweaks
2021-11-25 10:52:01 +01:00
Derik Evangelista
86a22a914d
Table: Add space between values for the DefaultCell (#42246)
fixes #42024
2021-11-25 10:09:09 +01:00
matt abrams
e447d5a53e
fix small typo in UI display language (#42264)
Co-authored-by: Clarity-89 <homes89@ukr.net>
2021-11-25 10:46:17 +02:00
Torkel Ödegaard
070344943c
PanelEditor: Present actionable suggestions when panel cannot visualize current data (#42083)
* PanelDataError: Show actions when current panel cannot visualize data

* Fixed so that suggestions tab is opened from action

* Cleanup

* Fixed tests

* Fix tests

* Fixing tests

* Fixed ts issues
2021-11-25 09:41:03 +01:00
Sarah Zinger
fc8d93e231
Azure Monitor: Fastpass Fixes -- Add trap focus for modals in grafana/ui and other small a11y fixes for Azure Monitor. (#41449) 2021-11-24 12:16:14 -05:00
renovate[bot]
ccd162f806
Update dependency mocha to v9 (#41416)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-24 15:04:58 +00:00
Jack Westbrook
b8c5ac63b1
Grafana UI: Prevent mandatory css prop in bundled types (#42216) 2021-11-24 14:35:06 +01:00
Dominik Prokop
2dc30dff63
grafana/ui: Expose ButtonProps type (#42221) 2021-11-24 14:25:59 +01:00
Hugo Häggmark
67a1052334
Dashboard: Fix cache timeout persistence (#42204)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* WIP: Mob session work 🚧🔱

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
2021-11-24 14:24:33 +01:00
Derik Evangelista
3110a9c238
Table: add space between values on JSONViewCell (#42156)
fixes #42024
2021-11-24 11:45:05 +00:00
nikki-kiga
92e1883845
Geomap: Add rotation option for markers layer (#41992)
* add rotation option for markers layer

* add ScalerDimensionEditor
2021-11-23 08:23:43 -08:00
renovate[bot]
0ab4afa2b7
Update sentry-javascript monorepo to v6 (#41991)
* Update sentry-javascript monorepo to v6

* Pass fetch implementation to FetchTransport and stub in unit tests

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-23 15:59:32 +00:00
Dominik Prokop
d2d38c978f
grafana/ui: Export types and utils required by grafana/experimental (#42133)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-11-23 15:41:51 +01:00
Ivana Huckova
aefb2659ec
Tracing: Show start time of trace with milliseconds precision (#42132)
* Tracing header: Add setting to show start time with ms

* Add test

* Update test
2021-11-23 15:28:18 +01:00
kay delaney
e3ef82203e
CodeEditor: Prevent suggestions from being clipped (#42120)
Closes #40792

Co-authored-by: Josh Hunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-11-23 12:18:17 +00:00
renovate[bot]
035e676cad
Update dependency react-select to v5 (#41604)
* Update dependency react-select to v5

* Remove @types/react-select and update types accordingly

* Fix all unit tests

* Add @ts-expect-error to individual errors, remove prefix as it doesn't seem to exist?

* Another minor typescript fix

* Apply fixes from torkel's PR

* Fix last typescript error

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-23 12:11:26 +00:00
Jack Westbrook
8b3725b9f2
Chore: Bump versions to 8.4.0-pre (#42116) 2021-11-23 11:23:02 +01:00
renovate[bot]
d11ae6dc3f
Update dependency @types/react-dom to v17 (#42045)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 13:24:40 +00:00
Ivana Huckova
d4ddd2373b
Tracing: Fix incorrect indentations due to reoccurring spanIDs (#41919)
* Create unique keys for trace rows

* Add tests

* Fix tests

* Update public/app/features/explore/TraceView/TraceView.test.tsx

* Trigger Build
2021-11-22 13:18:50 +01:00
kay delaney
47a7477cff
A11y/DashList: Make star button tab-navigable (#41479) 2021-11-22 13:03:50 +01:00
Ashley Harrison
b6b75e919b
Select: Select menus now properly scroll during keyboard navigation (#41917)
* Select: Select menus now properly scroll when navigating with the keyboard

* Remove this unnecessary children declaration in the interface

* Guard this with an if statement to avoid the nullish coalescing

* Don't need the optional chaining if we're guarding with an if
2021-11-22 10:57:44 +00:00
renovate[bot]
f97b7858b4
Update dependency @types/react to v17 (#42035)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 11:27:33 +01:00
renovate[bot]
abcf4e55b7
Update dependency @testing-library/react-hooks to v7 (#42000)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 10:25:42 +00:00
renovate[bot]
b143c3883f
Update dependency @testing-library/react to v12 (#41997)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 09:45:37 +00:00
Hugo Häggmark
44d7d6546f
Variables: Make renamed or missing variable section expandable (#41964)
* Variables: Make renamed or missing variable section expandable

* Chore: feedback after PR comments
2021-11-22 07:38:49 +01:00
Ryan McKinley
403222e14e
Candlestick: exclude unmapped fields by default (#42011)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-19 18:39:21 -06:00
Leon Sorokin
07a440fd3a
TimeSeries: fix fillBelowTo wrongly affecting fills of unrelated series (#41998) 2021-11-19 14:42:04 -06:00
Dave Henderson
fc7277920c
Dockerfile: Bump Go and Alpine versions (#41922)
* Dockerifle: Bump Go and Alpine versions

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>

* Updating .drone.yml with 'make drone'

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
2021-11-19 18:59:24 +01:00
Ryan McKinley
82cf49143d
ExtractFields: properly detect value types from extracted fields (#41995) 2021-11-19 09:50:30 -08: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
Ikko Ashimine
e7ec219291
Chore: fix typo in annotations.ts (#41978)
propery -> property
2021-11-19 15:12:15 +00:00
Dominik Prokop
67f43cd7ab
ThresholdControls: Use correct scale key when calculating handle position (#41942) 2021-11-19 14:03:27 +01:00
renovate[bot]
c659d6fa4c
Update dependency immutable to v4 (#41238)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-19 12:02:59 +00:00
Ryan McKinley
a6e60c62f4
Transformers: extract fields from JSON and text (alpha) (#41791)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-18 21:52:49 -08:00
Leon Sorokin
17c2f52dcf
Candlestick: fix volume histogram height by using mapped field name (#41931) 2021-11-18 20:31:18 -06:00
Josh Hunt
3b497f3e8d
Chore: Move babel config to a root babel.config.json (#41615)
* Chore: Move babel config to a root babel.config.json

* Re-add babel cache settings to webpack

* Re-add production browserlist in babel config

* re-add babel hot refresh config

* fix storybook
2021-11-18 16:38:58 +00:00
Andrej Ocenas
9a7e411f55
Tempo: Fix basic auth password reset on adding tag (#41808) 2021-11-18 10:34:13 +01:00
Dominik Prokop
1be9a61f43
TimeSeries: Allow multiple axes for the same unit (#41635)
* TimeSeries: Allow multiple axis for the same unit

* Update snapshot

* Add axis label and soft min/max to the scale key

* Removed console.log
2021-11-18 08:55:26 +01:00
Leon Sorokin
6844cf57a0
Transformers: ensure ISO 8601 date strings are not parsed in local TZ (#41835) 2021-11-17 14:56:04 -06:00
Andrej Ocenas
e237ff20a9
CloudWatch Logs: Add retry strategy for hitting max concurrent queries (#39290)
* Add error passing and retry strategy

* Change generic error to specific one

* Make the error more generic

* Refactor retry strategy

* Add retry that handles multiple queries

* Rollback some backend changes

* Remove simple retry strategy

* Add comments

* Add tests

* Small test fixes

* Add log timeout config

* Fix tests

* Fix tests

* Add validation

* Remove commented code and add comment

* Fix snapshots

* Remove unnecessary cast
2021-11-17 21:46:13 +01:00
Tiago Mota Santos
3dd73387fa
Menu: Adds SubMenu component to support fly-out sub-menu. (#41647) 2021-11-17 15:09:02 -05:00
Ryan McKinley
e5811ad106
Query: send datasourceId along with datasource ref (#41830) 2021-11-17 21:00:50 +01:00
Alexander Zobnin
757463bd27
Add new role picker to admin/users page (#40631)
* Very simple role picker

* Style radio button

* Separate component for the built-in roles selector

* Custom component instead of Select

* refactor

* Custom input for role picker

* Refactor

* Able to select built-in role

* Add checkboxes for role selector

* Filter out fixed and internal roles

* Add action buttons

* Implement role search

* Fix selecting roles

* Pass custom roles to update

* User role picker

* Some UX work on role picker

* Clear search query on close

* Blur input when closed

* Add roles counter

* Refactor

* Add disabled state for picker

* Adjust disabled styles

* Replace ChangeOrgButton with role picker on admin/users page

* Remove unused code

* Apply suggestions from code review

Suggestions from the @Clarity-89

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

* Refactor: fix some errors after applying review suggestions

* Show fixed roles in the picker

* Show applied fixed roles

* Fix role counter

* Fix checkbox selection

* Use specific Role type for menu options

* Fix menu when roles list is empty

* Fix radio button name

* Make fixed roles from built-in role disabled

* Make whole menu scrollable

* Add BuiltInRole type

* Simplify appliedRoles

* Simplify options and props

* Do not select and disable inherited fixed roles

* Enable selecting fixed role

* Add description tooltip

* Fix role param name

* Export common input styles from grafana/ui

* Add ValueContainer

* Use value container

* Refactor appliedRoles logic

* Optimise role rendering

* Display selected roles

* Fix tooltip position

* Use OrgRole type

* Optimise role rendering

* Use radio button from grafana UI

* Submenu WIP

* Role picker submenu WIP

* Hide role description

* Tweak styles

* Implement submenu selection

* Disable role selection if it's inherited

* Show new role picker only in Enterprise

* Fix types

* Use orgid when fetching/updating roles

* Use orgId in all access control requests

* Styles for partially checked checkbox

* Tweak group option styles

* Role picker menu: refactor

* Reorganize roles in menu

* Fix input behaviour

* Hide groups on search

* Remove unused components

* Refactor

* Fix group selection

* Remove icons from role tags

* Add spacing for menu sections

* Rename clear all to clear in submenu

* Tweak menu width

* Show changes in the input when selecting roles

* Exclude inherited roles from selection

* Increase menu height

* Change built-in role in input on select

* Include inherited roles to the built-in role selection

* refcator import

* Refactor role picker to be able to pass roles and builtin roles getters

* Add role picker to the org users page

* Show inherited builtin roles in the popup

* Filter out managed roles

* Fix displaying initial builtin roles

* Show tooltip only for non-builtin roles

* Set min width for focused input

* Do not disable inherited roles (by design)

* Only show picker if access control enabled

* Fix tests

* Only close menu on click outside or on indicator click

* Open submenu on hover

* Don't search on empty query

* Do not open/close menu on click

* Refactor

* Apply suggestions from code review

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

* Fix formatting

* Apply suggestions

* Add more space for close menu sign

* Tune tooltip styles

* Move tooltip to the right side of option

* Use info sign instead of question

Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-11-17 18:22:40 +03: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
Todd Treece
dad54d499b
add support for conditionally rendering extraRenderActions (#41783) 2021-11-17 06:05:39 -05:00
Torkel Ödegaard
d4bbaaade4
VisualizationLegend: Fixes item disabled color extends to stat values (#41786) 2021-11-17 09:44:08 +01:00
Ryan McKinley
bce7cb3ebf
DatasourceRef: keep uid/type ref when using template variables (#41785) 2021-11-17 07:55:12 +01:00
Uchechukwu Obasi
ea113be251
DashboardSettings: Link labels to inputs (#41680)
* TimePickerSettings: make label appropriately link to input when clicked

* DashboardSettings: link labels to input

* use loweercase instead for IDs

* fixes failing e2e test
2021-11-16 16:58:33 +01:00
Domas
c60933b49b
Alerting: Fix rule editor issues with Azure Monitor data source (#41317)
* properly set query type

* set default unit from data when found

* make AlertQueryRunner take into account ds.filterQuery

* fix tests

* feedback after pr

Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
2021-11-16 14:02:32 +01:00
Oliver Frye
ff421ef63b
Explore: Logs: Show ANSI colors when highlighting matched words (#40971)
* Explore: Show ANSI colors when highlighting matched words

* only highlight ANSI text if needsHighlighter is true

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* fix lint error

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-16 13:48:42 +01:00
Alexander Kubyshkin
e4cc41dd5b
Fix button "Run query" width (#32655) (#39081)
* Fix button "Run query" width (#32655)

* Minor refactoring for simpler fix

* Removed new prop

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2021-11-16 13:22:33 +01:00
Ryan McKinley
1aac13e5d0
MarketTrend: rename to candlestick panel (#41582) 2021-11-15 23:09:59 +01:00
Andrew Hackmann
53905f2d4a
recorded queries/enable recorded queries option (#41670) 2021-11-15 15:04:45 -06:00
Ryan McKinley
466eaeb4f0
Geomap: use name as UID (#41668) 2021-11-15 11:18:08 -08:00
Ryan McKinley
c780854a18
Live: remove hardcoded frontend channel support (#41584) 2021-11-15 07:54:14 -08:00
Levente Balogh
4219e4f107
Plugins Catalog: hide plugins based on the Grafana config (#41679)
* refactor(pkg/api/frontendsettings): group plugin catalog settings

* feat(plugins/admin): add a default config value for `pluginCatalogHiddenPlugins`

* chore(grafana/config): add type for `pluginCatalogHiddenPlugins`

* feat(plugins/admin): hide plugins from the catalog based on the grafana config

* fix(plugins/admin): fix a rebase typo

* fix(plugins/admin): remove unnecessary filtering
2021-11-15 15:51:16 +01:00
Torkel Ödegaard
dfd9813d70
Suggestions: Adds logs suggestions and sorting by score to suggestions (#41613)
* Suggestions: Adds logs suggestions for sorting by score to suggestions

* Introduced an enum

* review feedback
2021-11-15 15:13:01 +01:00
Marcus Andersson
95e0eea86c
Docs: Adding details about how to enable dynamic imports in plugins (#41648)
* added dynamic import to the readme.

* Update packages/grafana-toolkit/README.md

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

* Update README.md

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-11-15 10:20:55 +01:00
Leon Sorokin
a50b6947ce
GraphNG: uPlot 1.6.17 (#41663) 2021-11-14 15:46:15 -06:00
Oscar Kilhed
6fe29dda33
Barchart docs and styling fix (#41362)
* Barchart docs and styling fix

* Fix name of max length

* rename valueRotation -> xTickLabelRotation

also limits slider padding on sliders without marks
2021-11-12 15:03:19 +01:00
Ivana Huckova
9b9e41e036
Prometheus: Disable exemplar queries for alerting (#41607)
* Prometheus: Dont include empty exempalr frame in results

* Prometheus: Never run exemplar queries for alerting

* Remove exemplar field from alerting and set exemplar to false

* Add tests for frontend

* Add test for backend
2021-11-12 12:49:06 +01:00
renovate[bot]
d5fc48028f
Update dependency sinon to v12 (#41605)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-12 10:28:34 +00:00
Giordano Ricci
13db125558
Explore: Use PageToolbar component & some cleanup (#41318)
* Explore: Use PageToolbar component & some cleanup

* remove unneeded getStyles

* remove unneeded fragment

* restore cancelQueries action handler in reducer

* avoid nested ternary operator

* Clean up explore e2e
2021-11-12 10:09:25 +00:00
Torkel Ödegaard
e4a499b957
AppPlugins: Remove unused angular plugin page files (#41569)
* AppPlugins: Remove unused angular plugin page files

* Remove more unused bits
2021-11-12 10:35:39 +01:00
Ryan McKinley
7ffdff9e1f
MarketTrend: aggressive default field matching (#41574) 2021-11-11 22:04:37 -08:00
Leon Sorokin
7a92faf398
TimeSeries: guard against pointSize being set < lineWidth (#41577) 2021-11-11 23:47:28 -06:00
Torkel Ödegaard
3d735c4809
DataSources: Patch legacy instances so they have the required properties and functions (#41594)
* DataSources: Patch legacy instances so they have the required properties and functions

* Missed setting components
2021-11-11 19:45:07 +01:00
Jack Westbrook
c712c31721
Build: Use SWC to speed up Sass template builds (#41425)
* build(themes): use SWC to speed up template builds

* chore: remove superfluous dev deps
2021-11-11 14:03:53 +01:00
Ivana Huckova
7bc27a3cfc
Tempo: Fix validation of float durations (#41400)
* Fix parsing of float numbers in validation

* Adjust test

* Update packages/grafana-data/src/datetime/durationutil.test.ts

* Update packages/grafana-data/src/datetime/durationutil.test.ts

* Remove us from placeholder
2021-11-10 13:48:38 +01:00
Josh Hunt
ecb877cb24
Snapshots: Fix panel inspector for snapshot data (#41530) 2021-11-10 12:40:04 +01:00
Marcus Andersson
e5421dd53e
Chore: Change so we cache loading plugins by its version (#41367)
* making it possible to cache plugins based on the version.

* feat(plugincache): introduce function to invalidate entries

* removed todo's

* added tests for the cache buster.

* fixed tests.

* fixed failing tests.

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-11-10 11:54:58 +01:00
Piotr Jamróz
7d2e9aa979
Elasticsearch: Enable full range log volume histogram (#41202)
* Rename "Logs volume" labels to "Log volume"

Code references are kept intact as there's a lot of them, it could be renamed in a separate PR just with renaming

* Add log level docs

* Remove feature flag to enable log volume by default

* Update error message

* Update docs

* Fix unit test

* Fix unit test

Queries are now run automatically

* Add extra param for Loki API

* Remove "Load volume" button

* Update documentation about log volume

* Move comment

* Make reload button more accessible

* Update docs/sources/explore/logs-integration.md

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

* Hide full range log volume for Loki behind the feature toggle

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-10 11:20:30 +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
Jack Westbrook
cd5277befd
Storybook: Fix decorator height (#41468)
* fix(storybook): make sure story background fills available height

* fix(storybook): add decorator to prevent badge filling all available height

* docs(badge): use centered story

* revert(badge): remove obsolete Meta typing
2021-11-10 10:51:10 +01:00
Jim McDonald
11646b41fe
ValueMapping: handle multiple regex mappings (#41515) 2021-11-10 08:31:44 +01:00
Nathan Marrs
a992447a45
Geomap: custom layer naming (#41491) 2021-11-09 10:19:46 -08:00
Gilles De Mey
2bc30daa49
Alerting: allows clearing the datasource selection in rule list (#41264) 2021-11-09 18:20:36 +01:00
Artur Wierzbicki
f45eb309ef
Live: move centrifuge service to a web worker (#41090)
* Fix: make webpack pickup workers written in TS

* Add comlink to dependencies

* Temporary fix: copy paste `toDataQueryError` from @grafana/runtime to avoid web dependencies

* Implemented comlink-based centrifuge worker & worker proxy

* Temporary fix: implement comlink transferHandlers for subscriptions and streamingdataframes

* Move liveTimer filtering from CentrifugeService into GrafanaLiveService

* Switch from CentrifugeService to CentrifugeServiceWorkerProxy in GrafanaLive

* Naming fix

* Refactor: move liveTimer-based data filtering from GrafanaLiveService to CentrifugeServiceWorker

* observe dataStream on an async scheduler

* Fix: - Unsubscribe is now propagated from the main thread to the worker, - improve worker&workerProxy types

* Fix: Prettify types

* Fix: Add error & complete observers

* Docs: Add comment explaining the `subscriberTransferHandler`

* Fix: Replace `StreamingDataFrameHandler` with explicitly converting StreamingDataFrame to a DataFrameDTO

* Refactor: move liveTimer filtering to service.ts to make it easy to implement a `live-service-web-worker` feature flag

* Feat: add `live-service-web-worker` feature flag

* Fix: extract toDataQueryError.ts to a separate file within `@grafana-runtime` to avoid having a dependency from webworker to the whole package (@grafana-runtime/index.ts)

* Update public/app/features/dashboard/dashgrid/liveTimer.ts

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>

* Fix: fixed default import class in worker file

* Fix: cast worker as Endpoint

* Migrate from worker-loader to webpack native worker support v1 - broken prod build

* Fix: Use custom path in HtmlWebpackPlugin

* Fix: Loading workers from CDNs

* Fix: Avoid issues with jest ESM support by mocking `createWorker` files

* Fix: move the custom mockWorker rendering layout to `test/mocks`

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-09 21:05:01 +04:00
Ryan McKinley
e5d7be3e1c
TablePanel: support hiding columns, but use them in DataLinks (#41443) 2021-11-09 17:10:21 +01:00
Torkel Ödegaard
255efc0570
Icons: Add missing icons and sync with grafana/icons and re-generate iconBundle (#41466) 2021-11-09 16:31:34 +01:00
Alex Khomenko
8d22733666
grafana-ui: Style disabled option for Select (#41464) 2021-11-09 16:00:08 +01:00
renovate[bot]
01bc59e432
Update dependency optimize-css-assets-webpack-plugin to v6 (#41419)
* Update dependency optimize-css-assets-webpack-plugin to v6

* Update to use exact version

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-11-09 13:17:15 +01:00
Hugo Häggmark
b4f00d6312
Variables: Only update panels that are impacted by variable change (#39420)
* Refactor: adds affectedPanelIds and fixes some bugs

* Refactor: Fixes all dependencies and affected panel ids

* Refactor: glue it together with events

* Chore: remove debug code

* Chore: remove unused events

* Chore: removes unused function

* Chore: reverts processRepeats

* Chore: update to use redux state

* Refactor: adds feature toggle in variables settings

* Refactor: adds appEvents to jest-setup

* Tests: adds tests for strict panel refresh logic

* Refactor: small refactor

* Refactor: moved to more events

* Tests: fixes test

* Refactor: makes sure we store strictPanelRefreshMode in dashboard model

* Refactor: reporting and adds tests

* Tests: fix broken tests

* Tests: fix broken initDashboard test

* Tests: fix broken Wrapper test

* Refactor: adds solution for $__all_variables

* Chore: updates to radio button

* Refactor: removes toggle and calculates threshold instead

* Chore: fix up tests

* Refactor: moving functions around

* Tests: fixes broken test

* Update public/app/features/dashboard/services/TimeSrv.ts

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

* Chore: fix after PR comments

* Chore: fix import and add comment

* Chore: update after PR comments

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-11-09 12:30:04 +01:00
renovate[bot]
077b1e847a
Update dependency marked to v4 (#41328)
* Update dependency marked to v4

* Update dependency marked to v4

* Change default export

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-11-09 12:10:39 +01:00
kay delaney
833ed5418e
A11y/Dashboard: Change settings nav items from buttons to links (#41407) 2021-11-09 09:39:17 +00:00
Peter Holmberg
fd7dd6edf1
Alerting: Fix accessibility issues for alert rule list (#40816)
* accessibility attributes for rulelist

* change label text
2021-11-09 10:35:12 +01:00
renovate[bot]
0bd87f3e5b
Update dependency @types/node to v16 (#40913)
* Update dependency @types/node to v16

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-08 15:45:02 +00:00
renovate[bot]
b58cca5d51
Update dependency memoize-one to v6 (#41349)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-08 14:52:05 +00: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
Leon Sorokin
f0a108afb3
MarketTrend: add new alpha panel (#40909) 2021-11-05 18:01:26 -07:00
Zoltán Bedi
af61839a26
StateTimeline: Share cursor with rest of the panels (#41038)
* First working version of shared cursor for state timeline

* Only publish x value for time series

* Don't send legacy graph event

* Don't add y scale to cursor sync

* Snap cursor to the bottom of the canvas when sync is out of bounds

* Fix snapshot
2021-11-05 18:52:40 +01:00
Ryan McKinley
3489721ed6
api/ds/query: simplify data sources lookup for queries and expressions (#41172) 2021-11-05 08:12:55 -07:00
kay delaney
c8b7373016
A11y/UserAdminPage: Improves tab navigation and focus management (#41321) 2021-11-05 14:45:00 +00:00
renovate[bot]
725c113691
Update dependency md5-file to v5 (#41336)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-05 10:41:05 +00:00
Torkel Ödegaard
b2447d3956
DataSourceRef: Fixes migrations for mixed data source panels & queries and adds unit tests for data source ref migration (#41245)
* DataSourceRef: Fixes migrations for mixed data source panels & queries and adds unit tests for data source ref migration

* Fixing tests and migration logic a bit more

* use helper functions

* simplify migration logic

* Fixing test

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-11-04 21:37:03 +01:00
renovate[bot]
e973b933f3
Update dependency emotion to v11 (#41134)
* Update dependency emotion to v11

* Chore(renovate): Use correct emotion imports

* kick drone

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-04 17:54:49 +00:00
renovate[bot]
07d3bde4eb
Update dependency eslint-plugin-prettier to v4 (#40884)
* Update dependency eslint-plugin-prettier to v4

* Bump eslint to 7.28.0

* Chore(renovate): Commit lockfile update

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-04 16:54:23 +00:00
Ryan McKinley
70e92ef987
Transformations: support a rows mode in labels to fields (#41020) 2021-11-04 17:12:01 +01:00
Jack Westbrook
ab3ba4743d
Chore: Bump prismjs from 1.24.0 to 1.25.0 in grafana/ui (#41310) 2021-11-04 15:30:34 +01:00
Torkel Ödegaard
fb5a65d9be
ValueMappings: Value mappings field config defaults should not apply to time field (#41132) 2021-11-04 14:50:42 +01:00
Oscar Kilhed
b82797d1b0
BarChart: rotate barchart x axis labels (#40299)
* GraphNG: add axes label rotation property

* Adds rotation option and adds padding to avoid clipping labels

* Slider: Enable slider marks display (#41275)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-11-04 10:59:15 +01:00
Sarah Zinger
863f8aea2f
Fix bug that was breaking aws-sdk ConnectionConfig (#41215)
Fix bug that was breaking aws-sdk ConnectionConfig
2021-11-03 11:21:36 -04:00
renovate[bot]
18151ce652
Update dependency inquirer to v8 (#41240)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-03 11:41:21 +00:00
Zoltán Bedi
f8d75726e7
Graph panel: listen to events from timeseries panel (#41033)
* TimeSeries: share cursor with old graph

* Typo fix

* Fix typecheck errors

* Revert "TimeSeries: share cursor with old graph"

This reverts commit 1e7dd4f627.

* Graph: subscribe to DataHoverEvent

* Revert "Fix typecheck errors"

This reverts commit 737c8ea8c1.
2021-11-03 11:49:37 +01:00
Oscar Kilhed
43bd32206f
Barchart/Time series: Allow x axis label (#41142) 2021-11-03 09:42:07 +01:00
renovate[bot]
be5dafb980
Update dependency @types/marked to v3 (#41234)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-03 09:37:08 +01:00
Ashley Harrison
bac6168e62
Update Select.mdx (#41205)
* Update Select.mdx

* kick drone
2021-11-02 21:28:13 +00:00
Giordano Ricci
7b7c193551
Elasticsearch: Add time zone setting to Date Histogram aggregation (#40882)
* TimeZonePicker: Allow specifying internal timezones to display

* Elasticsearch: Add time zone setting to Date Histogram aggregation

* rename time_zone to timeZone

* Add tests

* fix typo

* Update packages/grafana-data/src/datetime/timezones.ts

Co-authored-by: Chris Cowan <chris@chriscowan.us>

Co-authored-by: Chris Cowan <chris@chriscowan.us>
2021-11-02 16:18:39 +00:00
Ashley Harrison
727a4bd9e4
Navigation: New NavBar designs behind feature toggle (#41045)
* Navigation: Remove plus button behind feature toggle

* Navigation: Add home button behind feature toggle

* Navigation: Move settings/admin to bottom section behind feature toggle

* Navigation: Refactor grafana logo to be a NavBarItem

* Navigation: Create new PluginSection and styling changes to support new sections

* Navigation: Hack to use mobile menu as a mega menu for now

* Navigation: Only render plugin section if there are items

* Navigation: mobile menu is always 100% width if toggle is off

* Navigation: Reset width back to 48 and fix broken css property

* Navigation: Create generic NavBarSection component to reduce repetition

* Navigation: Don't show sublinks for core items

* Navigation: Comments from UX review

* Navigation: Remove mobile menu hack

* Navigation: Unit tests for enrichConfigItems and other minor review comments

* Navigation: Move section logic to backend

* Navigation: Refactor alerting links out into a separate function

* Navigation: More tests for isLinkActive

* Linting...

* Navigation: Create new NavBar component for when feature toggle is enabled
2021-11-02 11:19:18 +00:00
Jack Westbrook
f2f31f60f2
Chore: Bump rollup and rollup plugins to latest (#40800) 2021-11-02 11:10:32 +01:00
Zoltán Bedi
6675b084bd
Chore: Upgrade grafana-eslint to latest (#41179) 2021-11-02 10:20:41 +01:00
Zoltán Bedi
85f2c48448
Toolkit: Don't to show console errors in tests (#41078) 2021-11-02 08:38:46 +01:00
Ryan McKinley
340ed4125e
DataSourceWithBackend: implement interpolateVariablesInQueries by default (#41152) 2021-11-02 00:29:52 -07:00
An
fb75411ddc
Resource Picker: update design and layout (#41046) 2021-11-01 10:21:43 -07:00
kay delaney
124c3f537f
A11y: Fix misc. fastpass issues (#41088) 2021-11-01 14:45:23 +00:00
Tim Levett
a81ca03302
Tooltips : Add ability to flag anchor tag as external link in a tooltip (#41014)
* sass: add in the option for extneral link color to tooltip anchor tag

* variable editor: change the link in the tool tip to external styling

* fixed class name to be the same as other instances of this
2021-11-01 09:14:53 -05:00
Josh Hunt
419c465edf
Grafana-UI: Editor UI components (#41136)
* Grafana-UI: Update theme.spacing to support string value when called with just one arugment

This allows theme.spacing("auto") to be valid

* Grafana-UI: Support width="auto" for Select component

This allows for inline Selects that are sized based on their content,
rather than occupying block-width

* Add toOption for creating Select options to @grafana/data

* Add test util
2021-11-01 12:06:28 +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
renovate[bot]
134c64f1a5
Update dependency fork-ts-checker-webpack-plugin to v6 (#40891)
* Update dependency fork-ts-checker-webpack-plugin to v6

* Fix compatibility issue

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-11-01 09:25:55 +01:00
Ryan McKinley
7319efe077
Dashboard: replace datasource name with a reference object (#33817)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: Elfo404 <me@giordanoricci.com>
2021-10-29 10:57:24 -07:00
Marcus Andersson
f349b735fb
CodeEditor: change so the code comments are aligned with our defaults. (#40763) 2021-10-29 13:24:49 +02:00
Ashley Harrison
283c19a129
TimePicker: Clicking outside the TimePicker/TimePickerCalendar now pr… (#40956)
* TimePicker: Clicking outside the TimePicker/TimePickerCalendar now properly dismisses the popup

* Slightly tidier syntax

* Don't forget to lint...
2021-10-29 10:31:56 +01:00
Derik Evangelista
97e0e12f40
Tables: fix sorting for NaN values (#40938)
Fixes #37236

Signed-off-by: Derik Evangelista <derik.evangelista@grafana.com>
2021-10-28 16:58:08 +01:00
renovate[bot]
3b91ce1b07
Update dependency @types/expect-puppeteer to v4 (#41000)
* Update dependency @types/expect-puppeteer to v4

* Chore: Remove @types/expect-puppeteer since it doesn't seem to be used/needed anywhere

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-28 10:36:54 +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
Torkel Ödegaard
6a2dc11545
Buttons: Improves button styles to make them perfectly symmetrical (#40977)
* Buttons: Improves button styles to make them perfectly symmetrical

* Fixed icon vertical centering
2021-10-28 09:31:45 +02:00
nikki-kiga
963544ffe6
Transformations: Add gazetteer transformation (#40967) 2021-10-27 20:20:56 -07:00
Ryan McKinley
45e1765733
Geomap: support multiple layers (#40906) 2021-10-27 14:49:11 -07:00
Andrej Ocenas
00ffe1a4fd
TraceView: Allow span links defined on dataFrame (#40563)
* Align range to seconds in log queries

* Use default display processor if there is none in FieldDisplayProxy

* Allow links defined in dataframe

* Remove debug log

* Fix typings for span links

* Lint go

* Fix tests

* Update tests

* Add test for the display proxy

* Streamline the fallback for diplayProcessor
2021-10-27 18:40:40 +02:00
renovate[bot]
99b50ffa00
Update dependency @testing-library/dom to v8 (#40990)
* Update dependency @testing-library/dom to v8

* Update our use of useFakeTimers

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-27 16:57:20 +01:00
renovate[bot]
5c72f3adbe
Update dependency chalk to v4 (#40572)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-27 16:14:32 +01:00
renovate[bot]
53b283ee01
Update dependency commander to v8 (#40707)
* Update dependency commander to v8

* Chore(dependencies): Changes needed to support Commander v8

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-27 14:54:10 +01:00
kay delaney
3a7c5a0755
Chore: Switch yarn 2 to plug-n-play strategy (#40300) 2021-10-27 14:21:07 +01:00
Hugo Häggmark
fadf72dd34
DashboardLinks: Fix time in links not being updated (#40934) 2021-10-27 07:11:24 +02:00
renovate[bot]
0808ec927e
Update dependency file-loader to v6 (#40890)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 09:22:43 +02:00
renovate[bot]
cadfdab155
Update dependency @types/d3-interpolate to v3 (#40402)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 14:07:33 +01:00
Gábor Farkas
b5ae62d6ae
grafana-ui: simplify and centralize monaco-theme-handling (#40643)
* grafana-ui: simplify and centralize monaco-theme-handling

* simplify code

* monaco: better theme-setup code

* eslint fix

* fix useEffect dependency
2021-10-25 14:55:39 +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
renovate[bot]
c550c6c258
Update dependency concurrently to v6 (#40711)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 10:27:05 +01:00
Zoltán Bedi
e6d2324516
Time series/Bar chart panel: Add ability to sort series via legend (#40226)
* Make legend sorting work in Time series panel

* Import from schema

Add properties to the cue schema as well

* Order stacking

* Add tests for orderIdsByCalcs

* Add check for legend options

* Fix cue schema

* UI fixes

* Order bars as well in barchart

* Use different index when ordered

* Legend sort series doc

* Fix nits

* Update docs/sources/panels/legend-options.md

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

* Fix linting

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update docs/sources/panels/legend-options.md

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-10-25 11:21:51 +02:00
Ryan McKinley
aeb868bb06
DataFrame: toDataFrame( ...) should support the query response payload (#40594) 2021-10-24 21:04:17 -07:00
renovate[bot]
f496c31018
Update dependency @types/jest to v27 (#40403)
* Update dependency @types/jest to v27

* Fix type errors

* Linting!

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-22 17:44:01 +01:00
Douglas Thrift
b78e563ab6
Transformers: Fix Labels to fields duplicates (#40779) 2021-10-22 09:25:37 -07:00
Ryan McKinley
814a78ba46
Value mappings: scroll values when many items exist (#40733) 2021-10-22 18:16:32 +02:00
Torkel Ödegaard
a091d35f11
ErrorBoundary: Support recovering from errors in PanelChrome & PanelRenderer (#40785)
* ErrorBoundary: Support recovering from errors in PanelChrome & PanelRenderer

* Rename recover to dependencies

* Pushed an update that fixed test and adds new error mode to DebugPanel
2021-10-22 11:52:05 +02:00
Leon Sorokin
80b4ef820a
Stat: Fixes an issue that could lead to browser crash with specific values (#40777) 2021-10-21 20:08:26 -05:00
renovate[bot]
8d06bddeda
Update dependency @types/node to v14 (#40405)
* Update dependency @types/node to v14

* Remove global var

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-10-21 16:52:26 +02:00
Piotr Jamróz
f86fa876f2
Logs: Add a feature toggle to run logs volume query automatically (#40579)
* Add a feature toggle to run logs volume query automatically

* Add missing default value

* Move feature toggle after moving auto-load button

* Remove unused import
2021-10-21 15:56:31 +02:00
Ashley Harrison
447a088750
Annotations: Allow addition of custom values whilst tags are loading (#40702) 2021-10-21 14:55:02 +01:00
Ryan McKinley
ad69de4a10
AppEvents: export appEvents in @grafana/runtime and support copy panel (#40715) 2021-10-20 13:01:21 -07:00
renovate[bot]
39866d4a7f
Update dependency @types/rollup-plugin-visualizer to v4 (#40484)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 15:40:54 +01:00
Andres Martinez Gotor
302fef394a
Chore: remove strict errors for azure-monitor (#40675) 2021-10-20 16:34:24 +02:00
kay delaney
565537c6e2
A11y/Dashboard: Fix various dashboard settings issues (#40641)
See #39429
2021-10-20 14:54:00 +01:00
Maria Alexandra
5b6831ab4d
Plugin Catalog: Fix A11y issues on plugin list (#40629) 2021-10-20 15:36:51 +02:00
Jack Westbrook
1e471a6f76
Storybook: fix theme colors not updating (#40679) 2021-10-20 13:30:00 +02:00
Jack Westbrook
6e2237c02f
Chore: Replace Sass-lint with Stylelint (#40617)
* chore(sass): introduce stylelint

* chore(sass): introduce stylelint config that closely matches sass-lint config

* chore: remove sass-lint from codebase

* style(theme): disable stylelint string-quotes rule

* chore(sass): introduce stylelint-prettier-config to prevent config conflicts

* chore: delete sass-lint file

* style(sass): fix remaining stylelint errors
2021-10-20 11:34:24 +02:00
Marcus Andersson
44c4d5d6fc
Toolkit: Prevent toolkit from crashing when an error occur. (#40627) 2021-10-19 17:03:19 +02:00
Coleman Rollins
70f68289f5
Slider: Adjusts input to enforce min/max values on blur (#40524)
* [cr] adjusts slider input to enfore min/max values on blur

* [cr] additional test for blur action, min/max readability
2021-10-19 16:44:46 +02:00
Torkel Ödegaard
c174664e63
Scale: Fixes handling of NaN percent when data min = data max (#40622) 2021-10-19 15:03:33 +02:00
Torkel Ödegaard
26dda75db5
ValueMappings: Fix so that value mappings work in stat/gauge/bargauge/piechart (#40612) 2021-10-19 14:11:31 +02:00
Josh Hunt
d5a0f719df
Grafana-UI: Move Select container styles to outer most container (#40611)
* Grafana-UI: Move Select container styles to outer most container

* Update packages/grafana-ui/src/components/Select/Container.tsx

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

* Rename file

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-10-19 13:29:33 +02:00
Torkel Ödegaard
d179c2a4e9
Table: Tweak to type icon styles (#40596) 2021-10-19 08:53:56 +02:00
Torkel Ödegaard
25813db334
RowsToFields: Fix issue with field names that are numbers (#40580)
* RowsToFields: Fix issue with field names that are numbers

* Only add the index accessor if field name does not conflict with it

* fix lint

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-10-19 07:27:24 +02:00
Guilherme Caulada
a9faab6b09
Dashboard: Add week start option to global and dashboard preferences (#40010)
* Add global week start option to shared preferences

* Add default_week_start to configuration docs

* Add week start option to dashboards

* Add week start argument to tsdb time range parser

* Fix strict check issues

* Add tests for week start

* Change wording on default_week_start documentation

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

* Update week_start column to be a nullable field

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Update configuration to include browser option

* Update WeekStartPicker container selector

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

* Add menuShouldPortal to WeekStartPicker to remove deprecation warning

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

* Add inputId to WeekStartPicker

* Use e2e selector on WeekStartPicker aria-label

* Simplify WeekStartPicker onChange condition

* Specify value type on WeekStartPicker weekStarts

* Remove setWeekStart side effect from reducer

* Fix updateLocale failing to reset week start

* Store week start as string to handle empty values

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-10-18 10:27:14 -03:00
Duke Manh
9eccb8e416
CodeEditor: Trigger the lastest getSuggestions() passed to CodeEditor (#40544) 2021-10-18 12:36:13 +02:00
renovate[bot]
52b69a9a80
Update dependency @types/rimraf to v3 (#40467)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-18 11:23:37 +02:00
Ivana Huckova
4e1cf7dea7
Logs: Fix creating of detected fields for each letter in log line (#40507)
* Logs: Fix using of JSON parser for strings

* Update packages/grafana-data/src/utils/logs.ts

* Update packages/grafana-data/src/utils/logs.ts

* Update parser typing and documentation
2021-10-18 11:16:24 +02:00
Piotr Jamróz
2de769420e
Chore: Reduce strict error in DataSourceHttpSettings.onChange callback (#40497)
* Reduce strict TS errors

* Update ERROR_COUNT_LIMIT after merging from main

* Update number of errors
2021-10-18 10:40:43 +02:00
Dominik Prokop
6201b5b1d9
Table panel: Fix filter not working for special characters and allow filter's case sensitivity control (#40458)
* Fix filter not working for special characters and allow case sansitive filter control

* Memoize regex
2021-10-18 09:19:05 +02:00
renovate[bot]
73ac9c2717
Update dependency @types/semver to v7 (#40515)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-15 13:25:42 +01:00
renovate[bot]
58fdb717ba
Update dependency @types/react to v17 (#40440)
* Update dependency @types/react to v17

* Chore: Typescript fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-15 12:25:47 +01:00
Hugo Häggmark
09bb890092
WIP Chore: reduce strict errors (#40462)
* Chore: reduce strict error in ngReact

* Chore: reduce strict errors for ShareModal

* Chore: reduce strict errors in VersioHistory

* Chore: reduce strict error in ExpressionDatasource

* Chore: reduce strict error in DashboardWatcher

* Chore: reduce strict error in PluginPage

* Chore: reduce strict errors for guard

* Chore: update threshold

* Chore: reduce strict errors in Graph

* Chore: reduce threshold

* Apply suggestions from code review

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>

* Chore: reduce strict errors in TimeSeries

* Chore: reduce threshold

* Chore: reduce strict errors in polyfill

* Chore: reduce threshold

* Chore: update after PR comments

* Update public/app/features/plugins/PluginPage.tsx

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* Update public/app/features/plugins/PluginPage.tsx

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>

* Chore: changes after PR comments

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-15 08:57:55 +02:00
Nathan Rodman
4fc86594c0
Alerting: Link prometheus and loki datasources to an alertmanager (#39887)
* add config option for alertmanager linking

* Add button for silencing a rule

* use uid for alertmanager

* move alertmanager link to separate function
2021-10-14 16:01:01 -07:00
Gábor Farkas
19972600d7
grafana-ui: export lazy-loaded version of react-monaco-editor (#39570)
* grafana-ui: refactor: move laziness to a lower level in code-editor

* grafana-ui: re-export react-monaco-editor

* rename export

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

* improved comment

* reverted name change

we already have an export with that name

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-10-14 14:33:45 +02:00
renovate[bot]
4565fcd0df
Update dependency @testing-library/user-event to v13 (#40394)
* Update dependency @testing-library/user-event to v13

* Changes needed for userEvent v13

* Ignore pointer-event checks until jsdom issue is fixed

* Remove unused act imports

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-14 13:29:41 +01:00
renovate[bot]
0c7e27bada
Update dependency @types/d3 to v7 (#40395)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-14 10:12:30 +02:00
Hugo Häggmark
a981ea22fb
A11y: Fix fastpass issues for share modal (#40386) 2021-10-14 07:13:15 +02:00
Hugo Häggmark
a512dcf1bb
A11y: Fix fastpass issues for annotation/variables settings (#40364)
* A11y: Fix fastpass issues for annotation/variables settings

* Chore: fixes fastpass for annotations

* Chore: updates after PR comments

* Chore: readd div
2021-10-13 15:21:34 +02:00
Will Browne
281d60095f
remove refs to --pure-lockfile (#40345) 2021-10-13 14:59:47 +02: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
Sarah Zinger
47f09fca8d
E2E: Fix path for importDashboards (#40111)
* Small e2e fix for importDashboards
2021-10-12 15:48:36 -04:00
Uchechukwu Obasi
3cec0b1227
TimePickerCalendar: adds keyboard navigation to the widget (#39070)
* WIP: adds react-aria package to package.json

* adds focus trapping to the calendar widget

* makes focus to move in and out of the widget

* Chore: remove unused component

* WIP: adds keyboard nav to calendar

* adds close button to calendar on wide screen

* Chore: update test to reflect new changes

* use more descriptive aria label

* prune duplicate absolute timeRange aria label

* TimePicker: Use aria overlays to enable closing with esc (#40045)

* Move timepicker to function component

* update overlayprops

* Remove unused import

* Fix for picker closing before setting the range when selecting quick ranges

* use more descriptive aria label

* update test to correspond with new label

* chore: some nit fix

* chore: used specific version for react-aria/overlay package

* Chore: refactor timePickerCalendar component

* chore: nit fixes

* chore: nit fixes

* reverts back to main and re-add deps with yarn 2

* chore: removes react-aria deps from root

* Chore: replace default export

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-10-12 16:48:24 +02:00