Commit Graph

15728 Commits

Author SHA1 Message Date
Piotr Jamróz
84860ffc96
Query History: Hide query history when anonymous user uses Explore (#49896)
* Hide query history when anonymous user uses Explore

* Show query history to anonymous users when local storage is used

* Fix integration test
2022-06-02 08:51:11 -05:00
Piotr Jamróz
927b6e33c0
Update total items when query history item is deleted to avoid triggering pagination (#49899) 2022-06-02 08:48:24 -05:00
Piotr Jamróz
d41b0f0a21
Test commenting query history (#49802) 2022-06-02 08:48:04 -05:00
Gilles De Mey
5191870c24
Alerting: Fix alert list panel showing firing alerts with no instances (#50069) 2022-06-02 15:44:03 +02:00
Ieva
5dbea9996b
RBAC: Make RBAC action names more consistent (#49730)
* update action names

* correctly retrieve teams for signed in user

* remove test

* undo swagger changes

* undo swagger changes pt2

* add migration from old action names to the new ones

* rename from list to read

* linting

* also update alertign actions

* fix migration
2022-06-02 13:14:48 +01:00
Andrej Ocenas
cc90f9bb69
Prometheus/Loki: Add raw query and syntax highlight in explain mode (#50070) 2022-06-02 13:50:58 +02:00
Andrej Ocenas
c63071f519
Prometheus/Loki: Show raw query by default in the builder(#50007) 2022-06-02 13:50:10 +02:00
Matthew Jacobson
ace5b2058d
Alerting: Fix notification policy "Override grouping" form save (#50031) 2022-06-02 13:45:21 +02:00
Ashley Harrison
0de9808008
Draggable: only set drag handle props on the drag handle itself (#50025) 2022-06-02 13:34:05 +02:00
Gábor Farkas
46d6573968
loki: add cookie-handling functionality (#49978) 2022-06-02 11:52:27 +02:00
svennergr
d7139e75fb
Loki: Fix uncaught errors if labelKey contains special characters (#49887)
* added regex check of labelKeys

- labelKeys should not contain any special characters
- added encoding of labelKeys in the URL
- don't offer autocomplete if label with special characters is detected

* removed additional regex check for labels
2022-06-02 11:30:47 +02:00
Gábor Farkas
b0925ed4ee
Loki: do not produce histogram for instant queries (#50019)
* loki: no histogram for instant queries

* added test
2022-06-02 09:13:57 +00:00
Erik Sundell
467e375fe6
Cloudwatch: Dynamic labels autocomplete (#49794)
* add completeable interface

* add basic labels language

* render monaco editor for label field

* align styling in math expression field

* add unit tests

* fix broken test

* remove unused import

* use theme

* remove comment

* pr feedback

* fix broken imports

* improve test

* make it possible to override code editor styles

* use input styles and align border styles
2022-06-02 10:54:51 +02:00
Sofia Papagiannaki
6112bd0c63
API: Fix swagger specification (#50034)
* API: Fix swagger specification

* Validate specification after generation
2022-06-02 10:49:52 +03:00
Connor Lindsey
3fff17af63
Tempo: Consider tempo search out of beta and remove beta badge and feature flags (#50030)
* Tempo: Remove beta notice and feature flag for search

* remove unused imports
2022-06-01 11:32:10 -06:00
Kevin Yu
dca0453c2e
CloudWatch: Add multi-value template variable support for log group names in logs query builder (#49737)
* Add multi-value template variable support for log group names

* add test for multi-value template variable for log group names

* add test
2022-06-01 10:23:31 -07:00
Alexander Kubyshkin
6ceb40e20e
DashList: Remove star z-index
Closes #49796
2022-06-01 17:35:15 +01:00
Ryan McKinley
4dfab0b7d5
SearchV2: optionally exclude panels from search results (#49971) 2022-06-01 09:05:53 -07:00
Maria Alexandra
07bfa13770
SearchV2: Fix scroll issue in folder folder view page (#50010) 2022-06-01 07:55:30 -07:00
Konrad Lalik
9da41140aa
Alerting: Fix external alertmanager duplication (#49980)
* Fix external alertmanager duplication

* Add tests
2022-06-01 15:38:23 +02:00
svennergr
b355adac6f
Loki: Run query when pressing Enter on line-filters (#49913)
* changed `onBlur` and `onKeyDown` handling

- `onCommitChange` is only called if `onBlur` or `onKeyDown` are not set

* added `runQueryOnEnter` flag to OperationParamDef

* only run query if `runQueryOnEnter` is configured

* changed `evt.type` check to `keydown`
2022-06-01 15:16:18 +02:00
Zoltán Bedi
f566958555
Table: Reorder panel options (#49983)
* Table: Reorder panel options

* Fix e2e selector
2022-06-01 13:11:19 +02:00
Will Browne
abfc711c53
Plugins: Remove deprecated /api/tsdb/query metrics endpoint (#49916)
* remove /api/tsdb/query

* revert changes to alert rules

* regenerate spec based on 9.0.x
2022-06-01 13:05:15 +02:00
Konrad Lalik
63303eb4ba
Alerting: Re-render panel's tabs on variables change (#49893) 2022-06-01 13:03:33 +02:00
Joey Tawadrous
dcccac6657
Traces: Feature tracking (#49767)
* Feature tracking for traces

* Mock runtime in test

* Update reportInteraction key
2022-06-01 10:28:45 +01:00
Gilles De Mey
82e9f4e7e7
Alerting: do not overwrite existing alert rule condition (#49920) 2022-06-01 11:28:21 +02:00
Andrej Ocenas
d2fefec306
Prometheus: Fix aligning of labels of exemplars after backend migration (#49924)
* Fix normalization of labels

* Move sorting so it actually has an effect

* fix lint error

Co-authored-by: Todd Treece <todd.treece@grafana.com>
2022-06-01 11:13:57 +02:00
Alexander Zobnin
50538d5309
ServiceAccounts: refactor UI (#49508)
* ServiceAccounts: refactor ServiceAccountRoleRow

* Refactor ServiceAccountRoleRow

* Refactor ServiceAccountProfile

* Refactor components

* Change service accounts icon

* Refine service accounts page header

* Improve service accounts filtering

* Change delete button style

* Tweak account id

* Auto focus name field when create service account

* Add disable/enable button

* Enable/disable service accounts

* Optimize updating service account (do not fetch all)

* Remove status column (replace by enable/disable button)

* Add banner with service accounts description

* Add tokens from main page

* Update tokens count when add token from main page

* Fix action buttons column

* Fix tokens count when change role

* Refine table row classes

* Fix buttons

* Simplify working with state

* Show message when service account updated

* Able to filter disabled accounts

* Mark disabled accounts in a table

* Refine disabled account view

* Move non-critical components to separate folder

* Remove confusing focusing

* Fix date picker position when creating new token

* DatePicker: able to set minimum date that can be selected

* Don't allow to select expiration dates prior today

* Set tomorrow as a default token expiration date

* Fix displaying expiration period

* Rename Add token button

* Refine page styles

* Show modal when disabling SA from main page

* Arrange role picker

* Refine SA page styles

* Generate default token name

* More smooth navigation between SA pages

* Stop loading indicator in case of error

* Remove legacy styles usage

* Tweaks after code review

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

* Get rid of useDisapatch in favor of mapDispatchToProps

* Tests for ServiceAccountsListPage

* Tests for service account page

* Show new role picker only with license

* Get rid of deprecated css classes

* Apply suggestion from code review

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

* Fix service accounts icon

* Tests for service account create page

* Return service account info when update

* Add behaviour tests for ServiceAccountsListPage

* Fix disabled cursor on confirm button

* More behavior tests for service account page

* Temporary disable service account migration banner

* Use safe where condition

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

* Apply review suggestions

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

* Remove autofocus from search

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-06-01 09:35:16 +02:00
Adela Almasan
e18e8002c4
Canvas: add feature flag for nesting elements (#49958) 2022-05-31 12:03:34 -07:00
Kevin Yu
7156935d12
Azure Monitor: Include datasource ref when interpolating variables (#49543)
* Azure Monitor: include datasource ref when interpolating variables

* add tests

* fix test
2022-05-31 09:27:25 -07:00
Will Browne
1c659814b5
regenerate swagger spec (#49938) 2022-05-31 18:15:43 +02:00
polibb
a19c3dae5a
Convert Enzyme UsersTable test to RTL (#49836)
* Convert Enzyme UsersTable test to RTL

* Fixes on UsersTable test; no additions

* remove snapshot of UsersTable test
2022-05-31 18:58:59 +03:00
Joao Silva
a91ecc566b
Chore: Converts DashboardRow tests to RTL (#49722) 2022-05-31 16:51:44 +01:00
Alex Khomenko
0a48b92d28
TeamMembers: Refactor test to RTL (#49922) 2022-05-31 17:11:12 +03:00
Laura
94375592c8
grafana/ui: Move panel-container styles to component (#49566)
* Chore: transfer styling to Explore.tsx and convert to Emotion

* feat: create a component and export it

* Chore: replace by new component

* Chore: replace by new component

* Feat: create a story

* Chore: clean up

* Chore: clean up
2022-05-31 14:43:23 +02:00
Konrad Lalik
4c28d09d6d
Alerting: Add fgac support to alert list panel (#47934)
* Add fgac support to alert list panel

* Fix typo

* test: fix test suite for UnifiedAlertStatesWorker

* Update worker permission check

* Update alert worker tests

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-05-31 14:27:08 +02:00
Ashley Harrison
0089779945
add feature highlighting in the expanded menu (#49892) 2022-05-31 12:03:38 +01:00
kay delaney
d590012a18
UI/Card: Remove deprecated props (#49885) 2022-05-31 12:02:20 +01:00
Gilles De Mey
e04f84fd1b
Alerting: fix layout with long words / numbers (#49882) 2022-05-31 12:33:43 +02:00
Andrej Ocenas
72367cf1ad
Prometheus: Cleanup annotation editor (#49615)
* Remove unused code

* Remove test

* Remove Builder mode and simplify the code

* Fix step mapping

* Fix import

* change placeholder
2022-05-31 11:50:23 +02:00
kay delaney
0012d2d81f
UI/Button: Remove deprecated "link" variant (#49843) 2022-05-31 09:40:03 +01:00
Alex Khomenko
bfbe856319
TeamMemberRow: Convert tests to RTL (#49875)
* TeamMemberRow: Remove legacy select

* TeamMemberRow: Update attributes

* TeamMemberRow: Refactor tests to RTL
2022-05-31 10:33:27 +02:00
Joey Tawadrous
387267b30a
Elasticsearch: Migrate annotation editor to react (#49529)
* Migrate annotation editor to react

* Gio patch

* Update types

* Optional and conform to older design
2022-05-31 09:26:40 +01:00
Torkel Ödegaard
8fa8c9dc8b
Angular: Remove deprecated angular modal support and libs (#49781) 2022-05-31 08:19:29 +02:00
Joao Silva
056a1fec3d
PanelEditor: Fixes issue with Table view and multi data frames (#49854) 2022-05-30 20:29:51 -07:00
Leon Sorokin
143f9e2dd9
HeatmapNG: ensure non-zero y bucket size (#49454)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-30 20:27:41 -07:00
Maria Alexandra
855655cc9c
SearchV2: Fix search input width on mobile (#49850)
* SearchV2: Fix search input on mobile
2022-05-30 18:46:23 +02:00
kay delaney
70980fbb44
ClipboardButton: Simplify callbacks (#49847) 2022-05-30 18:38:52 +02:00
Josh Hunt
e0bb01aea6
Dashboard: Fix panel menu styling issues (#49806)
* Dashboard: Fix panel menu styling issues

* remove !importants I added
2022-05-30 17:07:01 +01:00
Sergey Kostrukov
2b83cf4618
Prometheus: Predefined scopes for Azure authentication (#49557)
* Predefined scopes for Azure Prometheus

* Allow override of audience
2022-05-30 17:43:32 +02:00
Zoltán Bedi
f87c1b0eb9
Chore: Convert FolderPicker test to rtl (#49838) 2022-05-30 17:36:16 +02:00
Zoltán Bedi
3d3cf74038
Fix: Timeseries migration regex override (#49629) 2022-05-30 16:27:53 +02:00
Adam Simpson
6554bbd70f
AzureMonitor: migrate Logs+Arg QueryEditor to @grafana/experimental (#48978)
* AzureMonitor: use @grafana/experimental for LogsQueryEditor

ref #48711

* AzureMonitor: migrate ArgQueryEditor to @grafana/experimental.

Change CodeEditor to 100% instead of 1000px to match LogsQueryEditor.

ref #48713
2022-05-30 16:10:34 +02:00
Alex Khomenko
a71e371877
RolePicker: Add extra offset for menu position (#49823) 2022-05-30 16:03:05 +02:00
Ashley Harrison
216565aa00
Chore: Upgrade to jest 28 (#49679)
* bump packages to jest 28

* changes needed for jest 28

* map react-colorful as well

* use customResolver and fix last test

* don't need react-colorful installed if we're using a custom resolver

* return correct thing in mock

* remove watchPathIgnorePatterns since we don't have node_modules anymore
2022-05-30 14:14:34 +01:00
Ashley Harrison
10680c1775
cap mobile nav height (#49785) 2022-05-30 11:58:38 +01:00
Ashley Harrison
309ad38fd6
add event tracking to navigation (#49800) 2022-05-30 11:55:07 +01:00
kay delaney
17d0133008
Search: Fix overflow issue with folder view (#49723) 2022-05-30 10:31:42 +01:00
Ivana Huckova
5f6b23e45a
AutoSizeInput: Move to @grafana/ui (#48811)
* AutoSizeInput: Move to @grafana/ui

* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx

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

* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx

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

* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx

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

* Fix linter error

* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx

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

* Update packages/grafana-ui/src/components/AutoSizeInput/AutoSizeInput.mdx

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

* Move AutoSizeInput to Input folder

* Use iconOptions in storybook

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-30 10:46:33 +02:00
Ivana Huckova
745b101d41
Loki: Fix unwrap parsing (#49732) 2022-05-27 14:00:51 +02:00
sam boyer
be06d37a20
schema: Generate Go and Typescript from Thema coremodels (#49193)
* Add go code generator for coremodels

* Just generate the entire coremodel for now

Maybe we'll need more flexibility as more coremodels are added, but for
now this is fine.

* Add note on type comment about stability, grodkit

* Remove local replace directive for thema

* Generate typescript from coremodel

* Update pkg/coremodel/dashboard/addenda.go

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Update cuetsy to new release

* Update thema to latest

* Fix enum generation for FieldColorModeId

* Put main generated object at the end of the file

* Tweaks to generated Go output

* Retweak back to var

* Add generated coremodel test

* Remove local replace statement again

* Add Make target and call into cuetsy cmd from gen

* Rename and comment linsrc for readability

* Move key codegen bits into reusable package

* Move body of cuetsifier into codegen pkg

Also genericize the diffing output into reusable WriteDiffer.

* Refactor coremodel generator to use WriteDiffer

* Add gen-cue step to CI

* Whip all the codegen automation into shape

* Add simplistic coremodel canonicality controls

* Remove erroneously committed test

* Bump thema version

* Remove dead code

* Improve wording of non-canonicality comment

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-27 03:21:37 +02:00
Ryan McKinley
a641949a05
SearchV2: improve searcher API, and include a fallback SQL based implementation (#49535) 2022-05-26 17:08:17 -07:00
kay delaney
3d8eda0132
Chore: Remove deprecated surface prop from IconButton (#49715)
* Chore: Remove deprecated `surface` prop from IconButton

* Update component docs
2022-05-27 01:00:57 +01:00
Isabella Siu
b80934617b
CloudWatch: Use scopedVars in expressions (#49178)
* CloudWatch: Use scopedVars in expressions

* fix spec test
2022-05-26 17:03:55 -04:00
Nathan Marrs
097583e952
Canvas: Fix element placement UX (#49665) 2022-05-26 09:50:35 -07:00
Jack Westbrook
f4353bbbc4
Toolkit: Bump dependencies (#47826)
* chore(typescript): remove sanitize_url.d.ts in favour of npm package types

* chore(toolkit): bump all webpack related deps inline with grafana core

* refactor(toolkit): prefer webpack types and use from imports for bundling

* feat(toolkit): bundle plugins using webpack 5 and babel

* chore(toolkit): but all eslint deps inline with grafana core

* refactor(toolkit): rewrite linting step to use new eslint node api

* chore(toolkit): bump jest dependencies inline with grafana core

* refactor(toolkit): update jest config for jest 27

* fix(toolkit): resolve toolkit if using yarn berry

* docs(toolkit): update instructions for developing with yarn berry

* chore(toolkit): remove yarnlink code as won't work with yarn berry

* chore(toolkit): bump remaining dependencies

* chore(toolkit): remove unused core.start task

* feat(toolkit): use browserlist when building plugins

* chore(toolkit): add browserslist dependency

* refactor(toolkit): resolve style loaders, update postcss options for webpack5

* chore(toolkit): put back grafana/data and grafana/ui

* docs(toolkit): improve instructions for developing toolkit locally

* chore(toolkit): clean up webpack debug and warnings

* chore(input-datasource): remove pnpwebpack plugin and update browserslist to solve failing build

* chore(renovatebot): remove toolkit package.json from ignorePaths

* revert(renovate): put back toolkit package.json in ignorePaths

* feat(toolkit): introduce babel plugins

* refactor(toolkit): remove runtime automatic from preset-react for earlier versions of react

* refactor(toolkit): add missing fallbacks to webpack config

* fix(toolkit): remove spaces from copy webpack glob so files are copied

* refactor(toolkit): fix up babel typescript support and copy browserlist on build

* chore(yarn): refresh lock file

* revert(toolkit): remove browsers list so plugins compile to ES5

* revert(toolkit): remove copying .browserslistrc
2022-05-26 16:23:27 +02:00
Piotr Jamróz
e0adb41e80
Query History: Add feature tracking for query history (#49685)
* Add feature tracking for query history

* Fix unit tests

* Update event names
2022-05-26 16:04:10 +02:00
Andreas Christou
c8094b33cd
AzureMonitor: Ensure original query properties are included unchanged (#49642)
* Ensure original query properties are included unchanged

* Remove refId from pseudo datasources

* Include testing for interpolateVariablesInQueries

- Add util function to create template variables
- Update mock query with missing props
- Additional tests on each ds for template variables

* Correct typo and add explicit check for datasource
2022-05-26 14:53:12 +01:00
kay delaney
308ceebdd1
Chore: Remove usage of deprecated getColorForTheme function (#49519) 2022-05-26 14:11:44 +01:00
Gábor Farkas
386181cf45
Loki code editor: do not run query on blur in explore mode (#49241)
* loki code editor: do not run query on blur in explore mode

* loki: code editor: better change tracking

* fixed comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-05-26 15:03:36 +02:00
Giordano Ricci
a59066a21d
Explore: Reset Graph overrides if underlying series changes (#49680) 2022-05-26 06:02:21 -07:00
Sofia Papagiannaki
7cf321d7bd
Alerting: Fix swagger specification (#49273)
* Alerting: fix specification

* Update merged swagger specification
2022-05-26 14:43:59 +03:00
Kristina
a95ba8eb3f
Explore: Use Dashboard permissions in Explore To Dashboard (#49539)
* Look for dashboard permissions in e2d button

* Get tests to pass

* Add permissions tests
2022-05-26 06:29:19 -05:00
Ashley Harrison
8b509eb6dd
Notification history: Enable by default (#49502)
* remove persistNotifications feature flag

* remove unused imports
2022-05-26 12:03:04 +01:00
Levente Balogh
84b7efb393
fix: only "swallow" the json() parsing error if the response is empty (#47493) 2022-05-26 13:01:53 +02:00
Joao Silva
8c477a288a
Variables: Fixes issue with data source variables not being correctly used in panel queries (#49323) 2022-05-26 11:39:47 +01:00
Piotr Jamróz
a008a01315
Chore: Re-enable skipped test (#49484)
* Re-enable skipped test
2022-05-26 12:01:33 +02:00
Joao Silva
63848ad2e7
TimeRange: Fixes issue when zooming out on a timerange with timespan 0 (#49622) 2022-05-26 10:53:30 +01:00
Jack Westbrook
78bef7a26a
Build: Enable long term caching for frontend assets (#47625)
* build(webpack): move CopyUniconsPlugin into own file

* chore(webpack): delete unused blobUrl and compile loaders

* build(webpack): prefer contenthash over fullhash for longer caching

* build(webpack): set optimization.moduleIds named only in dev

* build(webpack): introduce HTMLWebpackCSSChunks so templates can access theme css by name

* feat: inject css files with contenthash in html templates

* revert(error-template): remove ContentDeliveryURL from CSS href

* refactor(index-template): update grafanaBootData.themePaths

* chore(webpack): add typescript annotations for CopyUniconsPlugin
2022-05-26 11:49:18 +02:00
Konrad Lalik
20a83ba14f
Narrow the alert condition picker (#49570) 2022-05-26 11:46:54 +02:00
Gábor Farkas
b54817033a
loki: better unpack handling (#49074) 2022-05-26 11:26:20 +02:00
Gábor Farkas
514d1bbbdd
loki: added two new functions (#49617) 2022-05-26 10:23:28 +02:00
Ryan McKinley
df90393057
Timeseries: fix outside range stale state (#49633)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
2022-05-25 21:19:56 +00:00
Nathan Marrs
2449f62dbe
Canvas: Improve changing element options UX (#49555) 2022-05-25 10:21:51 -07:00
Connor Lindsey
caa49f8d14
Explore: Add ability to include tags in trace to metrics queries (#49433)
* Add tags input

* Tracing: add ability to include tags in trace to metrics queries
2022-05-25 11:19:37 -06:00
Ryan McKinley
2fa91b75e0
Search: add icon for row and singlestat panels (#49620) 2022-05-25 18:33:48 +02:00
Ashley Harrison
a0b707ebe0
Apply .page-toolbar class correctly (#49603) 2022-05-25 16:39:21 +01:00
Peter Holmberg
e3a51a4aa8
Alerting: Add legacy indicator to navbar (#49511)
* update id and add translation key

* remove logs
2022-05-25 15:30:37 +02:00
Ashley Harrison
970c395fb1
Cue: Use BarGauge, DashList and Gauge panel cue schemas (#49580)
* user essentials mob! 🔱

* Wip

* user essentials mob! 🔱

lastFile:public/app/plugins/panel/bargauge/module.tsx

* user essentials mob! 🔱

* update betterer results file

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
2022-05-25 14:18:21 +01:00
Karl Persson
ef6b53ed23
AccessControl: Pass current org id to UsersTable (#49584)
* Pass current org id to UsersTable

* Mock contextSrv and update snapshot
2022-05-25 13:56:36 +02:00
Ieva
8d313f54e2
Access control: fix a typo for folder actions (#49582)
* fix a typo for folder actions

* update dashboard action too
2022-05-25 13:11:35 +02:00
Josh Hunt
9092150143
Cue: Update Text, Stat, and Annolist panel cue schemas (#49479)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

lastFile:public/app/plugins/panel/stat/types.ts

* user essentials mob! 🔱

* user essentials mob! 🔱

* Use generate defaults, and fix a few remaining issues

* Add annolist to dashboard dist plugins

* minor fixes

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-05-25 12:07:32 +01:00
Dominik Prokop
30880e6e18
Old Graph migration: Preserve null values settings (#49493)
* Graph migration: Preserve null values settings

* Review
2022-05-25 03:22:28 -07:00
Piotr Jamróz
a67add5239
Query History: Track query history migration failures (#49560) 2022-05-25 12:21:23 +02:00
Piotr Jamróz
f93ad85b08
Chore: Convert a test from enzyme to testing library (#49492) 2022-05-25 12:19:51 +02:00
Alex Khomenko
5557d2e666
TeamList: Convert test to RTL (#49567) 2022-05-25 13:01:40 +03:00
Ward Bekker
eab806620c
Prevent exception when panel has multiple queries (#49368)
This fixes the issues that when a panel has multiple queries this throws an exception if source is not part of the current frame

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-25 09:13:43 +02:00
Nathan Marrs
bb4a834ee3
Canvas: Fix resize breaking certain constraints (#49551) 2022-05-24 20:19:08 -07:00
kay delaney
861c6f21a0
Search: Center FolderSection spinner (#49494) 2022-05-24 16:57:35 +01:00
Andrej Ocenas
4124294011
Prometheus: Migrate annotation editor to react (#48814)
* Modify the annotation support api

* Migrate annotation editor component

* Update public/app/features/annotations/standardAnnotationSupport.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Move the escape hatches out of the public API

* Fix props transforms

* Break import cycle

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-24 17:43:58 +02:00
Ashley Harrison
8166d7dc4d
Fix escape in Modal/DashboardSettings + add some unit tests (#49500) 2022-05-24 15:34:47 +01:00
Torkel Ödegaard
20f8b8625a
Search: Add primary background for global search container (#49473)
* Search: Add primarhy background for global search container

* Fix spacing for ActionRow

* Fixing ts issue
2022-05-24 13:58:44 +00:00
Josh Hunt
c043a2f83a
Chore: Update theme json (#49480) 2022-05-24 14:58:34 +01:00
Gilles De Mey
86871807d2
Alerting: Make alertmanager datasource stable (#49485) 2022-05-24 14:44:41 +02:00
Torkel Ödegaard
04bc482f11
Variables: Fixes issue with data source variables not updating queries with variable (#49478) 2022-05-24 13:14:56 +02:00
Andres Martinez Gotor
b0300d56ac
AzureMonitor: Do not quote variables when a custom All variable option is used (#49428) 2022-05-24 11:29:24 +02:00
Joao Silva
71ffa5e5db
Chore: Converts SaveDashboardAsForm tests to RTL (#49436) 2022-05-24 10:17:40 +01:00
Peter Holmberg
7bcc151ae6
Alerting: Add notification policy flow chart (#49405)
* setup component add images

* add name to theme

* add root route info box

* remove unsused

* styling
2022-05-24 10:57:26 +02:00
Konrad Lalik
3ad1263097
Alerting: Use RadioButtonList component to select alert condition (#49422) 2022-05-24 10:51:43 +02:00
Alex Khomenko
8ad91e3f9e
SaveDashboardForm: Ensure saveVariables is boolean (#49466) 2022-05-24 10:44:20 +02:00
Ryan McKinley
521b0202e2
Search: remove special playground page and replace the standard results (#49442) 2022-05-24 10:04:21 +02:00
kay delaney
7096bc65b1
VersionHistoryTable: Disable other checkboxes when two are selected (#49098) 2022-05-24 10:51:37 +03:00
kay delaney
a1b709626f
DashList: Handle long dashboard titles more gracefully (#49460) 2022-05-24 09:29:36 +02:00
Alex Khomenko
8fecf25d54
RolePicker: UI improvements (#49397)
* RolePicker: Adjust input and display widths

* RolePicker: Use forwardRef

* RolePicker: Apply input styles to roles display
2022-05-24 10:21:31 +03:00
Nathan Marrs
5eb20739c2
Canvas: Fix inconsistent element resizing UX (#49450) 2022-05-23 20:13:58 -07:00
Adela Almasan
b1ba0bc7b0
Canvas: Quick positioning (#48992)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-05-23 15:31:39 -07:00
Ryan McKinley
33b2897552
Search: scroll to the top after a query changes (#49447) 2022-05-23 14:36:32 -07:00
Joey Tawadrous
d463c3157c
Tempo: NativeSearch code simplification and cleanup (#49365)
* Cleanup and show loading for service/span name

* Method rename

* Simplify logic for getting options

* Simplify logic for setting/getting value

* Move getTags to own async

* Update tests

* Promise all

* Update const name
2022-05-23 20:32:40 +01:00
Andrej Ocenas
7cd034f33a
Loki: Cleanup some code for default editorMode (#49431) 2022-05-23 19:21:00 +02:00
Joao Silva
51bc1bad1b
Chore: Converts SaveDashboardForm tests to RTL (#49434) 2022-05-23 18:17:25 +01:00
Ryan McKinley
8af587e7ba
Search: support alpha + and enterprise sorting values (#49362) 2022-05-23 10:05:15 -07:00
Ryan McKinley
653c82cec4
Search: implement clear-selection and select all buttons (#49363) 2022-05-23 10:01:18 -07:00
Sriram
f9d1d8370f
Plugins: Fix Azure Devops plugin link and plugins list order (#49394)
* Plugins: Fix Azure Devops plugin link and plugins list order

* tests added for plugins sorting
2022-05-23 17:37:19 +01:00
Ashley Harrison
fe16680c6d
Notification history: Use Card instead of reusing alert (#49418)
* Use Card instead of reusing alert

* only need clearSelectedNotifications now
2022-05-23 16:48:17 +01:00
Ashley Harrison
ce86b4ebe7
Navigation: Show starred items in the NavBar (#49219)
* switch saved items to starred items

* hook up redux properly

* Better query + hook up DashList

* update initial state so it's never undefined

* update GetDashboard call

* use new star service

* add scroll + maxwidth to navbar hover menu, sort starred items alphabetically

* increase height, revert changes to CustomScrollbar

* ellipsis!

* update starred dashboard name in navtree

* sort after renaming

* limit to first 50 starred dashboards found
2022-05-23 16:45:46 +01:00
Alex Khomenko
18727f0bf5
TeamGroupSync: Refactor tests to use RTL (#49417) 2022-05-23 16:45:36 +02:00
Brian Gann
5fc5899462
Access Control: Add rolepicker when Fine Grained Access Control is enabled (#48347) 2022-05-23 16:13:55 +02:00
Sofia Papagiannaki
060af782df
Docs: Add deprecation notices for datasource endpoints (#49411)
* Update markdown

* Update swagger
2022-05-23 16:11:47 +02:00
Yuriy Tseretyan
3dfafbadef
Alerting: Fix access to alerts for viewer with editor permissions when RBAC is disabled (#49270)
* Add folder edit permission for users with Viewer role
* relax permissions required to create an alert when RBAC is disabled
2022-05-23 09:58:20 -04:00
Torkel Ödegaard
c29e6fcb3a
Prometheus/Loki: Improve metric search highlight contrast (#49384)
* Prometheus/Loki: Improve metric search highlight contrast

* Update other places, and add reusable variables
2022-05-23 15:53:45 +02:00
Kristina
a9cc3225ba
Explore: Remove support for legacy, compact format URLs (#49350)
* Remove function, start changing tests

* Fix tests

* Remove deprecated parameter from function
2022-05-23 15:18:49 +02:00
Sofia Papagiannaki
be0d043673
API: Add endpoint for updating a data source by its UID (#49396)
* API: Add endpoint for updating a data source by UID

* Update docs markdown

* Update swagger

* Apply suggestions from code review

Co-authored-by: Selene <selenepinillos@gmail.com>
2022-05-23 15:13:13 +02:00
Piotr Jamróz
8f4c3e94b0
Query History: Implement star, comment and delete methods (#49330)
* Implement star, comment and delete methods

* Remove redundant await
2022-05-23 15:07:37 +02:00
Maria Alexandra
84a8a1aaa6
Search: Add ManageDashboardNew to integrate new search (#49266)
* Search: created ManageDashboardNew to integrate new search

* hide pseudo folders in ManageDashboardNew

* ManageDashboardNew - Fix overflow table

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-23 15:03:05 +02:00
Piotr Jamróz
060f0e5633
Query History: Results pagination (#49217)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Basic pagination

* Show load more only if there are items to load

* Post-merge fixes

* Change initial page limit to 100

* Fix unit tests

* Fix linting errors

* Test pagination

* Fix query migration

* Fix unit tests

* Fix prettier

* Remove full stop

* Do not show number of queries with partial results to avoid confusion

* Show number of displayed results when partial results are shown
2022-05-23 14:43:38 +02:00
Ashley Harrison
349d9973de
Notification history: Add checkboxes for multiple selection (#49392)
* Add checkboxes for selection

* className is optional...

* review comments
2022-05-23 12:50:26 +01:00
Piotr Jamróz
16a948fc88
Query History: Implement RemoteStorage methods: settings (#49320)
* Implement methods to get an update user preferences

* Update integration test

* Update label

* Remove unused type

* Simplify async code
2022-05-23 13:42:12 +02:00
Josh Hunt
5b8bc3e44c
Limit persisted notifications to 25 (#49393) 2022-05-23 12:32:31 +01:00
Ashley Harrison
ae8c11bfa4
Tweak name + add description (#49387) 2022-05-23 10:52:52 +01:00
Peter Holmberg
1402c85ce1
Alerting: change from cta to secondary (#49321) 2022-05-23 11:15:46 +02:00
Laura
ebc6d3a63c
Laura/chore/refactor styling of explore container (#49324)
* Chore: convert styling from sass to emotion

* Chore: delete sass styling
2022-05-23 10:55:04 +02:00
Joe Blubaugh
1cc034d960
Alerting: Add a "Reason" to Alert Instances to show underlying cause of state. (#49259)
This change adds a field to state.State and models.AlertInstance
that indicate the "Reason" that an instance has its current state. This
helps us account for cases where the state is "Normal" but the
underlying evaluation returned "NoData" or "Error", for example.

Fixes #42606

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-23 16:49:49 +08:00
Piotr Jamróz
c78b1fb304
Skip Angular error handling when Angular support is disabled (#49311) 2022-05-23 08:33:05 +02:00
Joey Tawadrous
f06d9164a6
Jaeger: Update operations dropdown (#49329)
* Fix issue where no values would load in operations dropdown

* Better naming

* Updated tests
2022-05-22 10:29:25 +01:00
Leon Sorokin
4f46c2f75f
HeatmapNG: render exemplars (#49287)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-21 19:13:28 -07:00
Gábor Farkas
0caeaaafe3
loki: add back frontend-mode metadata queries (#49297) 2022-05-21 16:46:39 +02:00
Gábor Farkas
93e299305c
loki: backend-mode: apply default max-lines if not set in the UI (#48859) 2022-05-21 16:39:21 +02:00
Adela Almasan
b3b650be1f
Canvas: Context menu (#48909)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-05-20 12:30:29 -07:00
Torkel Ödegaard
6fe28854bc
DashboardExport: Fixes issues sharing dashboards where query data source was set wrong (#48410) 2022-05-20 19:52:46 +02:00
Torkel Ödegaard
c3a5ff1eeb
Transforms: Labels to fields, fix label picker layout (#49304) 2022-05-20 19:50:30 +02:00
Gábor Farkas
c980655f08
elastic: config: hide access-mode selector when not needed (#49246) 2022-05-20 17:42:12 +02:00
Andreas Christou
34fa7b493c
AzureMonitor: Fixes metric definition for Azure Storage queue/file/blob/table resources. (#49101)
* Appropriately set metric definition

- Nested storage account resources (queues/blobs/tables/files) require metric definition of Microsoft.Storage/storageAccounts
- Update tests accordingly

* Restructure getResourceNames test

- Add expect on getResource args

* Update to fix issue for new query editor

- Reconstruct resourceUri if the resource is a storage account
- Correctly push storage namespaces as options for metric namespaces
- Filter options appropriately

* Fix duplicate options

* Fix lint issues

* Add comment explaining URI modification
2022-05-20 16:36:42 +01:00
Gábor Farkas
061055fac9
loki: dataframes: do not set field.config.DisplayName (#49317) 2022-05-20 17:27:49 +02:00
Yuriy Tseretyan
258b3ab18b
Alerting: Fix RBAC actions for notification policies (#49185)
* squash actions "alert.notifications:update", "alert.notifications:create", "alert.notifications:delete" to "alert.notifications:write"
* add migration
* update UI to use the write action
* update docs
* changelog
2022-05-20 10:55:07 -04:00
Andreas Christou
2780651ea8
AzureMonitor: Fix auto-selection of time-grain for metrics. (#49278)
* Update query editor to fix auto time-grain selection

* Update new query editor to fix auto time-grain selection

* Remove log and fix lint issues

* Add test for useMetricMetadata

- Add necessary types

* More test updates

- Update old dataHooks test
- Ensure query changes

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Andres Martinez Gotor <andres.mgotor@gmail.com>
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-05-20 15:45:54 +01:00
Erik Sundell
bd320ee0b3
Auth: Remove grafana ui dependency to the aws sdk (#43559)
* remove grafana ui dependency to the aws sdk

* wip

* cleanup

* add tests

* point to real version of aws-sdk
2022-05-20 16:04:20 +02:00
renovate[bot]
be7de1041a
Update Monthly patch updates (#49257)
* Update Monthly patch updates

* remove @types/slate update and run prettier

* fix @types/slate resolution

* lockfile update

* more fixes

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-20 13:07:07 +01:00
Alex Khomenko
f1f5f01309
CreateTeam: Refactor test to RTL (#49306) 2022-05-20 13:28:59 +03:00
Kristina
e5864f76b0
Add command palette to keyboard shortcuts help modal (#49186) 2022-05-20 09:11:19 +02:00
Nathan Marrs
646dcfccf9
Canvas: Implement minimum element size + center constraint UX (#49294) 2022-05-20 00:04:34 -07:00
Gabriel MABILLE
689f51599a
AccessControl: Use RBACBuiltInRoleAssignmentEnabled in the frontend instead of FeatureToggle (#49261)
* AccessControl: Frontend changes to basic role enablement
2022-05-20 06:53:28 +00:00
Maria Alexandra
59c8c0d56b
Search (Playground) - Fix minor css paddings inside table (#49263)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-20 07:03:19 +02:00
kay delaney
64aedb78ba
Search: Support filtering by tag in folder view (#49221) 2022-05-19 14:16:25 -07:00
Kevin Yu
0a95d493e3
Cloud Monitoring: Use new annotation API (#49026)
* remove angular code

* format annotation on backend

* format time with time type instead of string

* update annotation query tests

* update get alignment data function

* update annotation query editor

* add annotation query editor test

* update struct

* add tests

* remove extracted function

* remove non-null assertion

* remove stray commented out console.log

* fix jest haste map warning

* add alignment period

* add AnnotationMetricQuery type
2022-05-19 13:52:52 -07:00
Sofia Papagiannaki
6bb843bd0e
API: Introduce health and resources data source endpoints using the data source UID (#48676)
* API: introduce health and resources datasource endpoints with UID

* Document endpoints

* Update swagger
2022-05-19 19:27:59 +03:00
Vardan Torosyan
36663c093c
Rename built-in roles to basic roles in the role picker (#49258) 2022-05-19 17:58:18 +02:00
Isabella Siu
66220758b3
CloudWatch: migrate old variable queries with empty array (#49197) 2022-05-19 10:43:26 -04:00
Alex Khomenko
dacfdc0cde
DashboardPickerByID: Add option to exclude dashboards (#49211) 2022-05-19 16:47:55 +03:00
Yuriy Tseretyan
f7f2253072
Alerting: Fix anonymous access to alerting (#49203)
* introduce a fallback handler that checks that role is Viewer.
* update UI nav links to allow alerting tabs for anonymous user
* update rule api to check for Viewer role instead of SignedIn when RBAC is disabled
2022-05-19 09:22:26 -04:00
Gábor Farkas
0355772e36
loki: do not use backend-mode when keepCookies is used (#49222) 2022-05-19 14:26:54 +02:00
Piotr Jamróz
c6c79a9360
Query History: Migrate local storage to remote storage (#48572)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Add migration for local storage query history

* Test query history migration

* Simplify testing DataSourceSettings

* Skip redundant migrations

* Revert error logging test

* Fix tests

* Update betterer results

* Change notification message after migration

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Post-merge fixes

* Fix intergration tests

* Fix incorrect filtering
2022-05-19 13:45:32 +02:00
Maria Alexandra
d592d4dd73
Search(Playground) Action Row: Fix disabled option folder layout when sorting (#49182)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-19 10:05:04 +02:00
Nathan Marrs
35ea67c210
47853 canvas constraint visualizations (#49206)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
2022-05-18 18:49:57 -07:00
Ryan McKinley
3b017e0fb1
Inspect: include annotation data in DataFrameJSON debugger (#49204) 2022-05-18 17:31:03 -07:00
Ryan McKinley
d0d4d8af7f
Heatmap: improve new heatmap options (#49201) 2022-05-19 01:54:32 +02:00
Brendan O'Handley
5b52a1c391
List Azure Devops as an enterprise plugin (#49189)
* list azure devops as an enterprise plugin

* change base url to grafana.com/grafana/plugins and remove trailing slashes for consistency
2022-05-18 15:02:45 -04:00
Isabella Siu
ce1b1bc36b
CloudWatch: migrate variable query dimension filter (#48562)
* CloudWatch: migrate variable query dimension filter

* separate tests
2022-05-18 13:51:18 -04:00
Connor Lindsey
7688b12f9a
Tracing: Add config for multiple named trace to metrics queries (#49007)
* Tracing: Add config for multiple named trace to metrics queries
2022-05-18 10:55:55 -06:00
Chrysa Dikonimaki
a113fcaca3
Convert packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js to RTL (#49119)
* convert SpanBarRow tests to RTL

* remove comments

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* Update packages/jaeger-ui-components/src/TraceTimelineViewer/SpanBarRow.test.js

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>

* fix and replace

* fix last test

Co-authored-by: Ashley Harrison <ashharrison90@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 17:18:24 +01:00
Ashley Harrison
3ace282c29
add tracking for snapshot creation (#49165) 2022-05-18 14:53:49 +01:00
Ryan McKinley
f0496955e3
Search: extract a reusable view from the search playground (#49132)
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2022-05-18 15:46:43 +02:00
Gilles De Mey
0ae8e3bd4e
Alerting: Fix notification policies label matchers layout (#49159) 2022-05-18 15:01:56 +02:00
Gábor Farkas
45d6d38183
Elasticsearch: Remove browser access mode (#49014)
* elastic: remove browser-access-mode

* improved text

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

* improved text

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

* better text

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

* better text

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

* better text

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

* prettier fixes

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-05-18 11:04:47 +02:00
renovate[bot]
d4d2a747d0
Update dependency lru-cache to v7.10.1 (#49096)
* Update dependency lru-cache to v7.10.1

* update snapshot

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-18 10:00:46 +01:00
Konrad Lalik
43ab0c1f95
Alerting: Fix Loki buildinfo request error (#49073)
* Skip buildinfo fetching for Loki data sources

* Fix and add tests

* Fix linter

* Improve typings

* Improve Loki's buildinfo notice

* Fix rename, improve prom app display name
2022-05-18 10:45:26 +02:00
Gilles De Mey
0a44fbdd42
Alerting: Do not serve alerting images from root (#49022)
Manually tested with serve_from_sub_path = true and a custom pathUrl
2022-05-18 09:54:24 +02:00
Shirley
ef9e08ffcf
CloudWatch: Change aggregateResponse to return slice instead of map (#48805)
* Rename tests

* Change test names

* Change metrics from map to slice

* Add test for one output, multiple MetricDataResults

* Rename test input file

* Use map instead of iterating over the response metrics

* Rename variable

* move partial data set to query row response

* remove not used label field

* remove incorrect placeholder

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-05-18 09:16:38 +02:00
Ryan McKinley
30e4e9399b
Geomap: show delete button (#49125) 2022-05-17 23:39:54 -07:00
Jeff Levin
c7f8c2cc73
add isPublic to dashboard (#48012)
adds toggle to make a dashboard public

* config struct for public dashboard config
* api endpoints for public dashboard configuration
* ui for toggling public dashboard on and off
* load public dashboard config on share modal

Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-17 14:11:55 -08:00
Kat Yang
719af24235
Refactor: Add UID endpoint for dashboard versions and restore (#48364)
* Refactor: Add UID endpoint for dashboard versions and restore

* Fix: User dashID instead of dash.id

* 💩

* Move apiCmd error handling outside of dashUID check

* fix the panic in test

* Fix handler and update docs

Co-authored-by: Kat Yang <yangkb09@users.noreply.github.com>

* Docs: add deprecated warning to restore and version docs

* Fix hyperlink text

* Add swagger endpoints for restore and versions

* Add deprecated tag on swagger for both endpoints

* Fix: Update access control to be dashboards

* Return UID in response; Update docs to reflect this; Implement Ying suggestion

* Update docs/sources/http_api/dashboard_versions.md

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update query to refer to DashboardUID

Co-authored-by: Ying WANG <ying.wang@grafana.com>
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
Co-authored-by: Kat Yang <yangkb09@users.noreply.github.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-17 12:57:27 -04:00
Sarah Zinger
c652849303
Azure Monitor: Add Resource Picker for Metrics Queries (#49029) 2022-05-17 12:53:39 -04:00
Ryan McKinley
acd31ae9f0
Search: simulate folder mange pages within the playground page (#49041) 2022-05-17 08:42:52 -07:00
Gilles De Mey
4b4f996fa3
Alerting: refactor unified alerting promotion to deprecation (#49019) 2022-05-17 17:30:41 +02:00
kay delaney
e5925b2e91
Search: Constrain folder view (#49069) 2022-05-17 12:36:34 +01:00
sam boyer
44956aea66
Incremental improvements to dashboard schema (#48977)
* Change default of style to dark

* Separate cursor into standalone def

* Docs on timepicker and templating fields

Also add what appear to be timepicker-related fields

* Separate out AnnotationQuery definition

* Add memberNames for DashboardCursorSync

* Add sketch of VariableModel for templating field

Also changes label field from frontend from null to optional.

* Use constraints to enforce non-empty panel type

Negation (!="")  was breaking openapi exporter

* Add types and fields for links

* Remove panelVersion fields

These weren't right anyway, and they revealed a bug in the CUE openapi
generator

* Remove null label value from test

* Narrow type and set bounds on month field

* Adapt Go dashboard schema to lineage changes
2022-05-17 12:11:09 +01:00
Sofia Papagiannaki
925784f514
Alerting: Modify endpoint for testing a datasource rule using the UID (#48070)
* Modify testing endpoint to expect the datasource UID

* Update docs
2022-05-17 14:10:20 +03:00
Piotr Jamróz
f252e89339
Query History: Implement RemoteStorage methods: get all, add new (#48330)
* Load Rich History when the container is opened

* Store rich history for each pane separately

* Do not update currently opened query history when an item is added

It's impossible to figure out if the item should be added or not, because filters are applied in the backend. We don't want to replicate that filtering logic in frontend. One way to make it work could be by refreshing both panes.

* Test starring and deleting query history items when both panes are open

* Remove e2e dependency on ExploreId

* Fix unit test

* Assert exact queries

* Simplify test

* Fix e2e tests

* Fix toolbar a11y

* Reload the history after an item is added

* Fix unit test

* Remove references to Explore from generic PageToolbar component

* Update test name

* Fix test assertion

* Add issue item to TODO

* Improve test assertion

* Simplify test setup

* Move query history settings to persistence layer

* Fix test import

* Fix unit test

* Fix unit test

* Test local storage settings API

* Code formatting

* Fix linting errors

* Add an integration test

* Add missing aria role

* Fix a11y issues

* Fix a11y issues

* Use divs instead of ul/li

Otherwis,e pa11y-ci reports the error below claiming there are no children with role=tab:

Certain ARIA roles must contain particular children
   (https://dequeuniversity.com/rules/axe/4.3/aria-required-children?application=axeAPI)

   (#reactRoot > div > main > div:nth-child(3) > div > div:nth-child(1) > div >
   div:nth-child(1) > div > div > nav > div:nth-child(2) > ul)

   <ul class="css-af3vye" role="tablist"><li class="css-1ciwanz"><a href...</ul>

* Clean up settings tab

* Remove redundant aria label

* Remove redundant container

* Clean up test assertions

* Move filtering to persistence layer

* Move filtering to persistence layer

* Simplify applying filters

* Split applying filters and reloading the history

* Debounce updating filters

* Update tests

* Fix waiting for debounced results

* Clear results when switching tabs

* Improve test coverage

* Update docs

* Revert extra handling for uid (will be added when we introduce remote storage)

* Create basic plan

* Rename query history toggle

* Add list of supported features and add ds name to RichHistoryQuery object

* Clean up

Removed planned items will be addressed in upcoming prs (filtering and pagination)

* Handle data source filters

* Simplify DTO conversion

* Clean up

* Fix betterer conflicts

* Fix imports

* Fix imports

* Post-merge fixes

* Use config instead of a feature flag

* Use config instead of a feature flag

* Update converter tests

* Add tests for RichHistoryRemoteStorage

* Simplify test setup

* Simplify assertion

* Add e2e test for query history

* Remove duplicated entry

* Fix unit tests

* Improve readability

* Remove unnecessary casting

* Mock backend in integration tests

* Remove unnecessary casting

* Fix integration test

* Update betterer results

* Fix unit tests

* Simplify testing with DataSourceSrv

* Fix sorting and add to/from filtering

* Simplify testing DataSourceSettings

* Update betterer results

* Ensure previous request is canceled when getting search results

* Add loading message when results are being loaded

* Show info message only if local storage is enabled

* Fix unit test

* Reuse sort order options

* Reuse sort order options

* Fix footer spacing
2022-05-17 12:59:16 +02:00
Kat Yang
9a0f2ec449
Refactor: Add UID endpoint for get dashboard version (#48600)
* Refactor: Add UID endpoint for get dashboard version

* Add initial docs language

* Add new endpoint in swagger

* Change access control to dashboards

* Add parameters to swagger endpoint

* Return UID in response; Update docs to reflect this; Implement Ying suggestion

* Update docs/sources/http_api/dashboard_versions.md

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/api/api.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/models/dashboard_version.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Rename UID to DashboardUID for clarity; use dashUID in method

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-17 12:59:02 +02:00
Josh Hunt
18cbea84b1
prevent generated files from being prettiered (#49061) 2022-05-17 12:01:07 +02:00
Maria Alexandra
a3233c6ac3
Search(Playground)- Manage Actions: Disable delete button when folder is General (#49021)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-17 10:31:19 +02:00