Commit Graph

7222 Commits

Author SHA1 Message Date
Piotr Jamróz
88ec750728
Query History: Load history when QueryHistoryContainer is opened (#46457)
* 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
2022-04-06 13:49:25 +02:00
Ezequiel Victorero
6a059dcb4d
Access Control: hiding add annotation button without permissions (#47223)
* Access Control: hiding add annotation button without permissions
2022-04-05 08:20:10 -03:00
Cat Perry
b5f2f3e710
Tempo: Traces to Logs - From viewing Tempo traces to displaying Splunk logs (#46855)
* Add functionality to see splunk logs via tempo trace view
2022-04-04 13:24:33 -07:00
Konrad Lalik
6992d17924
Alerting: Add support to distinguish Prometheus datasource subtypes (Mimir, Cortex and Vanilla Prometheus) (#46771)
* Add basic UI for custom ruler URL

* Add build info fetching for alerting data sources

* Add keeping data sources build info in the store

* Use data source build info to construct data source urls

* Remove unused code

* Add custom ruler support in prometheus api calls

* Migrate actions

* Use thunk condition to prevent multiple data source buildinfo fetches

* Unify prom and ruler rules loading

* Upgrade RuleEditor tests

* Upgrade RuleList tests

* Upgrade PanelAlertTab tests

* Upgrade actions tests

* Build info refactoring

* Get rid of lotex ruler support action

* Add prom ruler availability checking when the buildinfo is not available

* Add rulerUrlBuilder tests

* Improve prometheus data source validation, small build info refactoring

* Change prefix based on Prometheus subtype

* Use the correct path

* Revert config routing

* Add deprecation notice for /api/prom prefix

* Add tests to the datasource subtype

* Remove custom ruler support

* Remove deprecation notice

* Prevent fetching ruler rules when ruler api is not available

* Add build info tests

* Unify naming of ruler methods

* Fix test

* Change buildinfo data source validation

* Use strings for subtype params and unveil mimir

* organise imports

* frontend changes and wordsmithing

* fix test suite

* add a nicer verbose message for prometheus datasources

* detect Mimir datasource

* fix test

* fix buildinfo test for Mimir

* shrink vectors

* add some code documentation

* DRY prepareRulesFilterQueryParams

* clarify that Prometheus does not support managing rules

* Improve buildinfo error handling

Co-authored-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-04 18:30:17 +01:00
Eric Leijonmarck
78bdcede70
Service accounts: polish UI and refactoring (#47269)
* no other tab has title

* made Add service button not visable and upper right

* renaming and added space between token number

* aligned button (:css:)

* refactor: out component listitem

* unused import
2022-04-04 17:09:51 +01:00
Gilles De Mey
322a14fe6e
Alerting: fix flakey default time range assertion (#47262) 2022-04-04 17:35:53 +02:00
Ezequiel Victorero
76b221e9d5
Access Control: hiding annotation edition and deletion without permissions (#46904)
* Access Control: disabling annotation edition without FGAC permissions
2022-04-04 11:57:43 -03:00
Gilles De Mey
473fa6d997
Alerting: add Mimir to the list of cloud rules (#47258) 2022-04-04 12:04:03 +00:00
CommanderRoot
d29b8e8858
Chore: Replace deprecated String.prototype.substr() (#46763)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-04-04 11:08:06 +02:00
Leon Sorokin
ed140906de
HeatmapNG: implement zooming & fix heatmap-buckets rendering (#47231) 2022-04-01 21:54:44 -06:00
Eric Leijonmarck
07aa1349d8
fix: error when licensing was not checked (#47201) 2022-04-01 16:57:02 +02:00
Peter Holmberg
cb03b05ced
Alerting: Add yaml editor to cloud rules (#46533)
* ruleinspector component

* Adding yaml component

* setvalues

* update yarn.lock

* bump types

* chore: update lockfile

* move apply button position

* move button back to tab

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-04-01 16:34:08 +02:00
Yaelle Chaudy
d217d2aa40
A11y : Fix a11y in CollapsibleSection (#46455)
* Fix a11y in CollapsibleSection

* Added type to button to avoid form submit on enter
2022-04-01 14:00:09 +02:00
Ashley Harrison
9d3b701797
Accessibility: Trap focus correctly in dashboard settings (#47149)
* Accessibility: Trap focus correctly in search + dashboard settings

* add accessible names for the overlays

* Undo changes to search

* missed a bit
2022-04-01 11:44:48 +01:00
Ryan McKinley
38dc34359b
Search: show dashboards form query (#47085) 2022-03-31 14:38:46 -07:00
Ashley Harrison
eddefdc274
Variables: Ensure variables in query params are correctly recognised (#47049)
* user essentials mob! 🔱

* user essentials mob! 🔱

* update comment

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2022-03-31 15:59:14 +01:00
Peter Holmberg
32ad1199e1
Alerting: Colorize labels and matchers (#46678)
* Replace AlertLabel with TagsList

* left align labels

* restart drone
2022-03-31 15:20:57 +02:00
Joey Tawadrous
58922d78df
Traceview find: background color and prev/next (#46527)
* Next/prev buttons

* expand

* Sticky search bar

* Removed anys

* testing

* testing

* Tests for next/prev/suffix

* More tests

* Span bar row color

* Add clear to input and update search bar styles

* Update test

* PR changes

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-03-31 09:43:59 +01:00
Giordano Ricci
6565d0ee64
Explore: move Time picker next to run button (#47082) 2022-03-31 02:04:17 +01:00
Nathan Marrs
85286a5182
Search v2: encode query in url (#47078) 2022-03-30 13:00:40 -07:00
Ryan McKinley
abeb08bc98
PanelInspect: show dataframe JSON in JSON view (#47071) 2022-03-30 19:58:49 +02:00
Ryan McKinley
edf384c730
DashboardSave: use a feature flag for drawer behavior (#46972) 2022-03-30 10:07:41 -07:00
kay delaney
f486b54b84
Navigation: Rough implementation of new navbar design (#46909) 2022-03-30 18:05:52 +01:00
Nathan Marrs
4449439a41
Search: Implement basic improved UI (#46758) 2022-03-30 09:50:32 -07:00
Gilles De Mey
18862a22a6
Alerting: use mimir logo (#47063) 2022-03-30 17:57:18 +02:00
Alex Khomenko
114704e2e2
Feature Highlights: update components (#46920)
* Apply new upgrade styles

* Add caption/update pro badge color

* Update team sync upgrade page

* Add UpgradeContentVertical

* Update public/app/core/components/Upgrade/UpgradeBox.tsx

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Update screenshots

* Update screenshots[2]

* Scroll screenshot if doesnt fit

* Add missing target prop

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-03-30 14:46:56 +02:00
kay delaney
f1c3177e79
Chore: Add type info for grafana boot data (#45322)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-03-30 10:48:58 +01:00
Leon Sorokin
475a027562
Prometheus: make JS heatmap response a single-frame (field-per-bucket) (#46611) 2022-03-29 22:23:08 -06:00
Cameron Waterman
8426cfe400
Profile/Help: Expose option to disable profile section and help menu (#46308)
* Expose option to disable help menu

* Expose option to disable profile menu

* Add Profile FeatureTogglePage

* Update public/app/features/profile/FeatureTogglePage.tsx

Uptake PR wording suggestion.

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

* Fix front end lint issue

* Fix back end lint issue

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-03-29 16:27:53 +01:00
Ryan McKinley
d1681dcc18
DashboardSave: keep version message (#46966) 2022-03-29 07:11:34 -07:00
Piotr Jamróz
bf977ac245
Explore: Fix time interpolation (#46737)
* Ensure TemplateService is updated with new time range on each time range change.

* Fix linting errors

* Fix explorePane.test.ts

* Reuse createDefaultInitialState

* Remove unused imports

* Add a test for left/right split

* Silence console.error in tests

* Silence console.error in tests
2022-03-29 15:10:40 +02:00
Braden Snell
9a850de5a8
Variables: add graceful circular dependency failure (#46590)
* adds circular dependency check

* adds circular dep test
2022-03-29 11:18:59 +01:00
Torkel Ödegaard
3516821012
Dashboard: Fixes save modal rendered ontop of save drawer (#46916)
* Dashboard: Fixes save modal rendered ontop of save drawer

* removed commented line

* Simplified dismiss -> hideModal mapping

* Fixed issue with new dashboard

* Fixing issues
2022-03-25 13:08:42 +01:00
Ashley Harrison
c13f4542d8
Dashboard: Template variables are now correctly persisted when clicking breadcrumb links (#46790)
* Add history listener to update titleHref/parentHref when location changes

* Convert to functional component and use useLocation

* Wrap component in React.memo

* Add new `getUrlForPartial` method, deprecate `updateSearchParams`
2022-03-24 16:01:43 +00:00
kay delaney
8329cd59f6
LibraryPanels: Increase max description length to 2048 chars (#46601) 2022-03-24 12:14:56 +00:00
Josh Hunt
89757cf58f
ManageDashboards: Fix error when deleting all dashboards from folder view (#46877)
* user essentials mob! 🔱

* draft tests

* tests!

* better default ids for test data
2022-03-24 09:43:25 +00:00
Gabriel MABILLE
3440e7c8f7
AccessControl: Fix locked role picker in orgs/edit page (#46539)
* AccessControl: Fix locked role picker in orgs/edit page

* Use correct org when computing metadata
2022-03-24 08:58:10 +01:00
Connor Lindsey
78c23d8dab
Tracing: Prevent createSpanLink from returning an invalid Loki query (#46864) 2022-03-23 09:48:11 -07:00
Gilles De Mey
4a568769e7
Alerting: fix flakey test (#46845) 2022-03-22 21:20:58 +01:00
Ashley Harrison
04bbafb4a6
Chore: Enable jest-fail-on-console to prevent console errors in unit tests (#46835)
* Add jest-fail-on-console

* Fix last 2 console warnings

* Update package syntax
2022-03-22 17:03:07 +00:00
Nathan Rodman
5a25ada3d0
Alerting: Add FGAC for Silences (#46479)
* add FGAC actions for silences table

* redirect users without permissions

* hide silence button in rules list

* add permissions checks to routes

* add read action for silences page

* add permissions checks to navigation

* add additional access checks for rule viewing

* create authorize component

* add tests for silences

* hide alerting nav for users without access

* nolint: gocyclo

* add permission check to alert details

* add check for external instances

* remove unecessary new lines

* use correct actions for alert details

* fix failing tests

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-03-21 16:54:37 -07:00
Santiago
18c1c6ca6a
fix double slash in share link (#46757) 2022-03-21 08:00:54 -06:00
Kristina
1afd278bd0
Fix tests for Explore - ErrorContainer, MetaInfoText & cleanup (#46744)
* Move ErrorContainer.test.tsx to RTL

* Remove snapshots and unnecessary tests, change enzyme tests to RTL

* Add fixes to tests
2022-03-18 14:44:51 -05:00
Eric Leijonmarck
c592e6606c
Filtering of service accounts by expired tokens (#46251)
* Refactor to ServiceAccounts Query

* filtering expiredtokens on backend

* WIP

* WIP

* WIP

* fix: missing that we do not cover for no service accounts

* fix: wrong link

* feat: filter able to get only service accounts with expired tokens

* refactor: naming

* Update pkg/services/serviceaccounts/models.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* goimported

* Update pkg/services/serviceaccounts/api/api.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-03-18 15:50:34 +01:00
lean.dev
c3ee98a9b6
Fixing delete dashboard url form datasource configuration (#46637) 2022-03-18 11:47:57 -03:00
Gilles De Mey
64d4e6fcaa
Alerting: visual alert type picker (#46111) 2022-03-18 14:33:32 +01:00
Tom
ea7d5a6185
Transformers: Add template variable substitution (#44486)
* Transformers: Add template variable replacement to transformer operator

* Transformers: Add template variable replacement to calculateField transformer

* Transformers: Add scopedVars to transformer template replacement

* Transformers: Add calculateField template variable test

* Transformers: Fix 'undefined' is not assignable to type 'string'

* Transformers: Fix lint-frontend bug

* Fix lint check

* Fix lint
2022-03-18 10:25:53 +00:00
Ryan McKinley
93390b5a1e
Search: use search service (#46714)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-03-18 01:36:32 +01:00
Ryan McKinley
736820f975
Search: use minisearch for better frontend searching (#46710)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-03-17 14:26:48 -07:00
Joao Silva
a9002e80b4
Annotations: Fix issue with spinner always showing (#46686) 2022-03-17 13:00:52 +00:00
Ikko Ashimine
d887068904
Alerting: Fix typo in matchers.test.ts (#46641)
occurence -> occurrence
2022-03-16 19:15:23 +00:00
Ryan McKinley
15ca294be0
Dashboards: show changes in save dialog (#46557)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-03-16 09:28:09 -07:00
Torkel Ödegaard
31d141b267
Dashboards: Fixes repeating by row and no refresh (#46565) 2022-03-16 07:57:12 +01:00
Joao Silva
00c93fff8c
Grafana-UI: Fix use of Fragments as children of InlineField (#46326) 2022-03-15 17:50:29 +00:00
Nathan Marrs
11aa6a3e8f
Value mapping/add icon support (#44503)
Co-authored-by: Ryan McKinley <ryantxu@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-15 08:51:12 -07:00
Gabriel MABILLE
75935c75c1
ServiceAccounts: Fix role update (#46568)
* ServiceAccounts: Fix role update

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

* Fix patch missing metadata

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

* Fix patch missing metadata

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

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-03-15 10:48:10 +01:00
Ryan McKinley
4cd27a380d
Geomap: applying multiple line builders should keep each segment (#46563) 2022-03-14 22:58:41 -07:00
Giordano Ricci
00f67cad1b
Explore: set correct datasource when creating panel in a dashboard (#46530) 2022-03-14 23:26:13 +00:00
Joey Tawadrous
bd21355f87
Trace view: Scroll to top on new query (#46278) 2022-03-14 14:22:37 -06:00
Yaelle Chaudy
0b0d612372
A11y : Fix option panes not accessible when collapsed (#46405)
* Turned div into text button to make it accessible

* Only icon as button to avoid embedded buttons with overrides delete button

* use icon in Button directly

* Removed unused import

* moving id for labelledBy to h6 elem instead of icon

* Tweaking style, bigger caret

* Fixed aria-expanded

* Modifying and using CollapseToggle from unified alerting

* Added restOfProps to CollapseToggle
2022-03-14 15:37:13 +01:00
Konrad Lalik
2409405c34
Alerting: Integrate alerts with folders (#45763)
* Add Alert rules tab

* Add pagination and a simple name-based filtering

* Add name and label based filtering

* Improve pagination, handle the no results case

* Add tests for alerts folder view

* Add label filtering by clicking a tag

* Add tests for matcher to string method

* Add sorting, improve styles

* Use simple Select component for sorting

* Update default page size

* Remove unused code

* Use existingc thunk

* chore: update swagger spec

* Revert "chore: update swagger spec"

This reverts commit ee79ec7341.

* Code cleanup

* Fix ts

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-03-14 15:21:29 +01:00
Jguer
e512029afb
ServiceAccounts: lowercase edit url (#46517) 2022-03-14 14:22:54 +01:00
matt abrams
52c9da1b11
A11y: add copy button to API Key modal (#46387)
* add copy button to API Key modal

* switch to inline button style

* update test snapshot
2022-03-11 11:10:27 +01:00
matt abrams
ec84b7bd23
A11y: Make the Library Panel "clear filter" buttons accessible (#46341)
* swap span for button + add aria-label

* swap span for button + add aria-label

* add new style + increase padding

* fix typo

* switch to link variant + trim custom css
2022-03-11 11:10:13 +01:00
Yaelle Chaudy
9fc9708ba5
Fixed new variable button keyboard clickable (#46293) 2022-03-09 20:35:53 +01:00
Joao Silva
4b57ffbb4f
A11y: Replace LinkButton with Button in Value Mappings to make it accessible (#46330) 2022-03-09 14:01:24 +00:00
J Guerreiro
874ac9180b
Service Accounts: Add enabled/disabled status to list (#46259)
* ServiceAccounts: improve where condition

* ServiceAccounts: Add Enabled/Disabled status to list
2022-03-08 14:10:16 +01:00
Yaelle Chaudy
ed7701c6b2
Updated span for Button to be accessible (#46296) 2022-03-08 12:42:03 +01:00
Torkel Ödegaard
79e5e5c024
DataSource: Default data source is no longer a persisted state but just the default data source for new panels (#45132)
* PanelEdit: Change the meaning of default data source to be just that the default for new panels

* Added migration, and also migration for annotation datasource prop to data source refs

* fix

* Fixing tests

* Fixes to annotation

* Fixing unit test
2022-03-08 08:56:12 +01:00
Leon Sorokin
a9ee446de4
HeatmapNG: fix Prometheus frame-per-bucket heatmap response rendering (#46309) 2022-03-07 20:51:11 -06:00
Leon Sorokin
0ee552dd65
LegacyBrowser: fix Safari 13.1 (lacks logical nullish assignent) (#46260) 2022-03-07 09:21:28 -06:00
Eric Leijonmarck
3d168eb34b
Searchable service accounts (#45844)
* WIP

* draft of WIP

* feat: search and filtering works 🌈

* Update pkg/models/org_user.go

* Apply suggestions from code review

* refactor: remove unsed function

* refactor: formatting

* Apply suggestions from code review

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

* WIP

* comment

* Update public/app/features/serviceaccounts/ServiceAccountsListPage.tsx

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

* review comments

* wip

* working search and initial load of service accounts

* number of tokens working

* removed api call

* Apply suggestions from code review

* added accescontrol param

* accesscontrol prefix corrected

Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-03-04 12:04:07 +01:00
Artur Wierzbicki
bdbb9ed54a
Live: Fix support for StreamingFrameAction.Replace (#46086)
* fix StreamingFrameAction.replace

* simplify

* beautify

* cover `streamingDataFrame.ts` changes with unit tests

* formatting

* cover `LiveDataStream.ts` changes with unit tests

* update frame length after pushing new values
2022-03-04 14:04:30 +04:00
Gilles De Mey
a9b1a964b0
Alerting: adds support for federated rules (#46037) 2022-03-04 10:16:13 +01:00
Torkel Ödegaard
a404dba29d
Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source (#46167)
* Datasource: Fixes changing default data source causes inconsistency between panel data source and query data source

* Fix unit tests
2022-03-04 08:58:13 +01:00
Ryan McKinley
0aad61d0ac
Search: add a simple search page (behind feature flag) (#45487)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-03-03 14:56:14 -08:00
Joey Tawadrous
6f3ebbe6cc
Trace view scroll to top button (#46077)
* Trace view scroll to top button

* Updated button css selector

* Updates for scrolToTop

* Updated snapshot

* Updated render

* Add smooth scrolling
2022-03-03 16:19:44 +00:00
Karl Persson
7966e3583e
Access control: Dashboard and folder permissions frontend (#45094) 2022-03-03 15:18:27 +01:00
Giordano Ricci
4caf5dbbd9
Explore: minor copy changes in the Add to dashboard modal (#46154)
* Explore: minor copy changes in the Add to dashboard modal

* fix tests

* Additional copy changes & test fixes
2022-03-03 14:01:03 +00:00
Giordano Ricci
09f48173fe
Explore: allow users to save Explore state to a new panel in a new dashboard (#45148)
* Add Button & Form

* Save to new dashboard

* minor adjustements

* move modal to a separate component

* handle dashboard name related errors

* pick visualization based on query results

* lift state

* fix types

* Add Open & Close tests

* Add submit test

* add navigation tests

* add tests for API errors

* remove console log

* create wrapper component for AddToDashboardButton

* remove unused mapped prop

* add wrapper test

* rename isActive to isVisible

* invert control over save & redirect logic

* remove leftover commented code

* cleanup setup parameters

* reorganize code & improve tests

* Remove option to add to existing dashboard

* UI tweaks

* disable button if no queries

* Fix tests

* better accessible tests

* handle submission errors

* improve addToDashboard types

* use dashboardSrv' saveDashboard

* remove leftover test helper

* fix typo

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* Apply suggestions from code review

Co-authored-by: Kristina <kristina.durivage@grafana.com>

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Kristina <kristina.durivage@grafana.com>
2022-03-03 08:54:06 +00:00
renovate[bot]
52568c7af1
Update dependency ol to v6.13.0 (#45949)
* Update dependency ol to v6.13.0

* fix types

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-03-03 09:45:33 +01:00
Ashley Harrison
3427ae463d
Dashboard: Add feature reporting for dashboard import (#46080)
* Add feature reporting for dashboard import

* Update tracking event names
2022-03-02 14:35:52 +00:00
kay delaney
f530775e45
Chore: Remove several 'as' type assertions (#45913) 2022-03-02 14:02:09 +00:00
J Guerreiro
bc5237e840
Service Accounts: Link final components in service accounts detail page (#45929)
* ServiceAccounts: Delete/Disable service account from details page

* ServiceAccounts: capitalize viewable messages from UI

* ServiceAccounts: Link new update endpoint to details page

* ServiceAccounts: reimplement service account retrieve to include is_disabled and only target service accounts

* Cleanup styles

* Fix modal show

* ServiceAccounts: simplify handler functions

* Apply suggestions from code review

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

Co-authored-by: Clarity-89 <homes89@ukr.net>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-03-01 09:21:55 +01:00
Nathan Rodman
e814e7364b
Alerting: fix alert groups grouping (#45012)
* fix multiple non-grouped groupings

* drop duplicate alerts

* add test for multiple groups without labels

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-02-28 09:50:17 -08:00
Giordano Ricci
c014f8b806
DashboardSrv: add saveDashboard method (#45627)
* DashboardSrv: add saveDashboard method

* revert external changes

* use DashboardModel instead of DashboardDataDTO

* use fetch instead of request

* use getSaveModelClone in saveDashboard
2022-02-28 11:30:11 +00:00
Shachi Solanki
190757b3c6
Tempo / Trace Viewer: Support Span Links in Trace Viewer (#45632)
* Support Span Links in Trace Viewer

* Update ReferencesButton styles

* Remove datasource prop

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-02-25 11:14:13 -07:00
Ikko Ashimine
c656a6bf1e
Live: fix typo in channel.ts (#45915)
recieved -> received
2022-02-25 18:20:16 +03:00
Peter Holmberg
4ef58e595c
Alerting: Add validation to slack contact point (#45618)
* add requiredifempty

* rename field, fix logic

* update mockdata

* remove logs

* update test

* fix json expected payload in e2e tests

* fix test

* fix test again

Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
2022-02-25 15:10:21 +01:00
Ashley Harrison
033f6cffb5
Add this import to fix main (#45905) 2022-02-25 12:54:19 +01:00
J Guerreiro
14ec0cbd3b
Service Accounts: Polish service account detail page (#45846)
* ServiceAccounts: add teams to service account DTO

* ServiceAccounts: Add team display to service accounts

* ServiceAccounts: add AC metadata to detail route

* ServiceAccounts: add role picker to detail page

* ServiceAccounts: Add role to profile DTO

* ServiceAccounts: remove wip mention of created by
2022-02-25 11:33:34 +01:00
Peter Holmberg
9d61dcb02b
Alerting: Disable Alertmanager picker if there's only one Alertmanager (#45781) 2022-02-25 11:17:28 +01:00
J Guerreiro
1cc5b25a05
ServiceAccounts: Fix token creation with expiry (#45855)
* ServiceAccounts: Fix token creation with expiry

* ServiceAccounts: remove extraneous import
2022-02-24 19:22:57 +01:00
Borja Garrido
359ef074fa
Transformations: Add new grouping to matrix transformer (#28739)
* Add new transformer grouping to matrix

* Add new transformer grouping to matrix tests

* Add new transformer grouping to matrix UI

* Fix tests for grouping to matrix transformer

* Update transformer to latest interfaces

* Add field selector to form

* Make linter happier

* Replace Fields with InlineSnapshot as it was to taking units properly

* Rearrange for new transformers structure

* Expose GroupingToMatrix options as part of data package

* Increase labelWidth as suggested

* Add uniqueValues helper function and use it to extract Column and Row Values
2022-02-24 17:01:04 +00:00
Ashley Harrison
d3700c4032
Chore: Remove console output from some jest tests (#45792)
* Chore: Remove console output from some jest tests

* Skip manual performance test
2022-02-24 10:49:48 +00:00
Konrad Lalik
d6c580e338
Alerting: Lotex alert groups removal (#45150)
* Add lotex group removal UI

* Connect UI to delete group action

* Add rules' refreshing after deletion of a group

* Improve confirmation message

* Add tests for RulesGroup

* Remove redundant check
2022-02-24 11:31:36 +01:00
Piotr Jamróz
5715be4afa
Explore: Integration test for running a query and saving it in query history (#45728)
* Create basic query history test

* Clean up

* Clean up

* Use run button selector

* Mock AutoSizer instead of monkey-patching

* Reset local storage after each test

* Add accessible name to Run Query button and use it in the test

* Update public/app/features/explore/spec/helper/interactions.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Rename query to urlParams

* Fix linting errors

* Remove unused import

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-23 19:05:38 +01:00
kay delaney
59317a22e4
AppNotifications: Migrate usage of deprecated appEvents.emit method to redux actions (#45607) 2022-02-23 11:31:15 +00:00
Jack Westbrook
d0d5304662
Revert "Update dependency react-hook-form to v7.26.1" (#45761)
* Revert "Update dependency react-hook-form to v7.26.1 (#43670)"

This reverts commit 175891a5e3.

* chore(renovate): prevent bumping react-hook-form so plugins dont break
2022-02-23 12:22:45 +01:00
kay delaney
49ac8b9f0a
Dashboards: Move slow dashboard logic to css (#45686) 2022-02-23 09:35:42 +00:00
Connor Lindsey
af2d19b02e
Tracing: Add option to map tag names to log label names in trace to logs settings (#45178)
* Add mapped tags input to allow renaming tags in trace to logs settings

* Use mappedTags in createSpanLink

* Update traceToLogs docs

* Show 'add kv' button if no tags

* Update docs

* Default mappedTags to tag values
2022-02-22 23:17:45 +01:00
J Guerreiro
e201b777c2
Service Accounts: small typo and dto fixes (#45677)
* ServiceAccounts: respect js casing and small fixes to displayed values

* ServiceAccounts: fix typos on service account

* ServiceAccounts: fix missing orgID in service account

* ServiceAccounts: Small fixes to dtos for profile

* ServiceAccounts: use result org id

* ServiceAccounts: return value is always nil
2022-02-22 14:58:42 +01:00
Ashley Harrison
5e3be8b17f
Variables: Fix adding variables to an unsaved dashboard (#45722)
* 🚧: Mob session work 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* 🚧: Mob session work 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2022-02-22 13:21:01 +00:00
Alexander Emelin
28c30a34ad
Comments: support live comments in dashboards and annotations (#44980) 2022-02-22 10:47:42 +03:00
Kristina
31090a75eb
Explore: Save log results sort order (#45423)
* Explore: Save log results sort order

* Change to radio group, add test and make language consistent with logs plugin
2022-02-21 06:09:43 -06:00
kay delaney
d134740bba
Redux: Factor Invites out to separate slice (#45552) 2022-02-21 11:37:49 +00:00
renovate[bot]
175891a5e3
Update dependency react-hook-form to v7.26.1 (#43670)
* Update dependency react-hook-form to v7.27.0

* fix type errors for alerting components with new react-hook-form version (#45341)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2022-02-18 17:13:31 +01:00
Levente Balogh
1e21184f65
Fix: JSON parsing in backend_srv (#45598)
* fix(plugins/state): console log errors during install / uninstall

* fix(backend_srv): catch JSON parse errors

Sometimes it can happen that a backend API responses says that it's
returning with a JSON content-type, however it actually returns an invalid
JSON (e.g. an empty body) - in which case the backendSrv() request errors out.
2022-02-18 16:06:37 +01:00
Piotr Jamróz
25f155a44d
Explore: Fix closing split pane when logs panel is used (#45602)
* Clear cache when LogsNavigation is mounted

* Update docs
2022-02-18 15:34:19 +01:00
Torkel Ödegaard
0838f4b1ad
Plugins: Fix importing panel modules (#45590) 2022-02-18 12:51:55 +01:00
Yaelle Chaudy
530913dd37
Azure Monitor : Adding json formatting of error messages in Panel Header Corner and Inspect Error Tab (#44877)
* Trying out json formatting of azure graph err from frontend

* Added some tests wip

* Wrap text in popper tooltip

* fix conflict

* Wrap text in tooltip

* Complete tests

* Added invalid json test

* Backend changes and tests

* removed comments

* Added split of message / json and edge cases tests

* Addressed comments

* moved catch to parseErrorMessage
2022-02-18 12:09:24 +01:00
Gábor Farkas
dd9b52fd41
log-volume: adjust request-id to avoid conflicts (#45511)
* log-volume: adjust request-id to avoid conflicts

* added unit test

* simplify test

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>

* added missing import

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-02-18 12:05:29 +01:00
Eric Leijonmarck
c6943797f9
Admin: token expiration colors and calculations (#45231)
* token expiration colorign and calculations

* Update public/app/features/serviceaccounts/ServiceAccountTokensTable.tsx

* removed unused calculation for expiry

* optional attribute

* fix: typo

* implement failing test :thumpsup:

* tests

* refactor: tests to use assertify

* tiem

* refactor: remote porntf

* refactor: make test NOT sleep 1 sec for all builds :D

Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com>
2022-02-18 11:43:33 +01:00
Agnès Toulet
478efffce7
Data source insights: Switch from ID to UID (#45532) 2022-02-18 09:19:39 +01:00
Hugo Häggmark
dbec2b02fd
Variables: move state tree into a keyed state (#44642)
* Variables: move state tree into a keyed state

* Update public/app/features/variables/state/transactionReducer.ts

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

* Chore: fix prettier error

* Chore: renamed slices and lastUid

* Chore: rename toUidAction

* Chore: rename dashboardVariableReducer

* Chore: rename state prop back to templating

* Chore renames variable.dashboardUid

* Chore: rename toDashboardVariableIdentifier

* Chore: rename getDashboardVariable

* Chore: rename getDashboardVariablesState

* Chore: rename getDashboardVariables

* Chore: some more renames

* Chore: small clean up

* Chore: small rename

* Chore: removes unused function

* Chore: rename VariableModel.stateKey

* Chore: rename KeyedVariableIdentifier.stateKey

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-02-18 06:06:04 +01:00
Ryan McKinley
bbddab0294
Chore: refactor core transformer folder structure (#45497) 2022-02-17 08:12:38 -08:00
Todd Treece
c8bb01d1ad
Expressions: Add support for variables (#41778) 2022-02-17 10:50:22 -05:00
Kristina
773da0e330
Explore: Add t * keybindings to change time range (#45020)
* Add keybindings to explore, allow override of dashboard model update for explore update

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

* Add tests

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

* Use more generic model for TimeSrv

* Remove url utility functions, use javascript function instead

* Break out TimeModel into new type and bring it in

* condense object creation
2022-02-17 07:39:02 -06:00
Peter Holmberg
0502a84922
Alerting: Add choice to external alertmanagers (#45157)
* implement alertmanagersChoice

* return empty array and remove non null assertion
2022-02-17 12:47:38 +01:00
Artur Wierzbicki
3e53a08090
#44449: hide dashboard preview admin UI (#45493) 2022-02-17 12:34:07 +04:00
Ryan McKinley
bb86ba99ee
Heatmap: new panel based based on uPlot (#44080)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-16 14:49:17 -08:00
Artur Wierzbicki
6c76aa71e8
Previews: capability check (#44601)
* add SQL migrations

* dashboard previews from sql: poc

* added todos

* refactor: use the same enums where possible

* use useEffect, always return json

* added todo

* refactor + delete files after use

* refactor + fix manual thumbnail upload

* refactor: move all interactions with sqlStore to thumbnail repo

* refactor: remove file operations in thumb crawler/service

* refactor: fix dashboard_thumbs sql store

* refactor: extracted thumbnail fetching/updating to a hook

* refactor: store thumbnails in redux store

* refactor: store thumbnails in redux store

* refactor: private'd repo methods

* removed redux storage, saving images as blobs

* allow for configurable rendering timeouts

* added 1) query for dashboards with stale thumbnails, 2) command for marking thumbnails as stale

* use sql-based queue in crawler

* ui for marking thumbnails as stale

* replaced `stale` boolean prop with `state` enum

* introduce rendering session

* compilation errors

* fix crawler stop button

* rename thumbnail state frozen to locked

* #44449: fix merge conflicts

* #44449: remove thumb methods from `Store` interface

* #44449: clean filepath, defer file closing

* #44449: fix rendering.Theme cyclic import

* #44449: linting

* #44449: linting

* #44449: mutex'd crawlerStatus access

* #44449: added integration tests for `sqlstore.dashboard_thumbs`

* #44449: added comments to explain the `ThumbnailState` enum

* #44449: use os.ReadFile rather then os.Open

* #44449: always enable dashboardPreviews feature during integration tests

* #44449: add /previews/system-requirements API

* #44449: remove sleep time, adjust number of threads

* #44449: review fix: add `orgId` to `DashboardThumbnailMeta`

* #44449: review fix: automatic parsing of thumbnailState

* #44449: update returned json

* #44449: UI changes - dashboard previews sytem req check

* #44449: lint fixes

* #44449: fix tests

* #44449: typo

* #44449: fix getSystemRequirements API: return 200 even if we plugin version is invalid

* #44449: fix getSystemRequirements API: don't return SemverConstraint on error

* #44449: fix getSystemRequirements API

* #44449: fix previews sytem requirements text

* #44449: add `doThumbnailsExist` to repo

* #44449: remove redux api

* #44449: add missing model

* #44449: implement frontedsettings-driven capability check

* #44449: simplify

* #44449: revert test changes

* #44449: add dummy setup settings

* #44449: implicit typing over `FC<Props>`

* #44449: refactor conditionals

* #44449: replace `getText` with a react component

* #44449: fix component interface

* #44449: add onRemove to `PreviewsSystemRequirements` alert

* #44449: add bottom/top margin to previewSystemRequirements modal

* #44449: merge conflict fix

* #44449: remove console.log

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-02-16 21:49:50 +04:00
Torkel Ödegaard
2b9e46d1f8
Angular: Option to disable angular support and isolate angular dependencies (#45421)
* Angular: Initial setting that disables angular, load angular support in separate chunk

* Load angular panels on demand

* Load alerting in separate chunk only when angularSupportEnabled

* progress, do not export core_module if angular disabled

* Progress

* Update public/app/features/plugins/built_in_plugins.ts

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

* Removing remaining usage of angular from outside angular app (not counting plugins)

* Update config and docs

* Fix sample.ini

* Update public/app/features/alerting/AlertTab.tsx

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

* Fixing prettier issue

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-02-16 17:14:33 +01:00
Dominik Prokop
8bb3de3037
Analytics: Collect information about queries reordering (#45392) 2022-02-16 14:16:25 +01:00
Zoltán Bedi
da91c93f4a
QueryEditor: Fix setting panel state to done if query had no error (#45453) 2022-02-16 11:48:22 +01:00
Konrad Lalik
1886a59a12
Fix notification routes editing when filters are applied (#45380)
* Fix route editing when filters are applied

* Fix route delete operation, reset expanded item when filters change

* Refactor edit and delete functions, add tests

* Fix comment
2022-02-16 11:03:53 +01:00
Zoltán Bedi
befb2afccc
QueryEditor: Fix crash in angular panels when query have error (#45422) 2022-02-16 10:34:29 +01:00
Agnès Toulet
39797e33ae
Highlights: fix RS event name (#45436) 2022-02-16 08:52:18 +01:00
Ieva
11433cba97
Team access changes for editors when editorsCanAdmin is enabled (#45405)
* filter teams for editors to only show the teams that they are members of

* frontend changes to only allow clicking on teams that the user can edit

* update frontend test snapshots

* extend docs

* reword

* remove the comment for now

* Update backend tests

* reword the warning, and add it back in

* docs feedback

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-02-15 17:09:03 +00:00
Torkel Ödegaard
a757a57c6e
Prometheus: Show executed query in inspector (#45362)
* Prometheus: Show executed query in inspector

* Loki: Improving test
2022-02-15 15:02:03 +01:00
Gabriel MABILLE
d11f6a95a4
AccessControl: Enable empty list New button based on user permissions (#45398) 2022-02-15 14:51:19 +01:00
Gabriel MABILLE
91dd0563c9
AccessControl: Trigger permission reload with team removal (#45383) 2022-02-15 14:23:40 +01:00
Torkel Ödegaard
ed5b2e5210
Move QueryPartDef out from angular app (#45386) 2022-02-15 14:20:50 +01:00
Gilles De Mey
651bb773db
Alerting: do not unescape external AM label values (#45334) 2022-02-15 13:57:00 +01:00
Marcus Andersson
146eed400a
TempalteSrv: re-adding variabelExists to prevent breaking angular plugins. (#45387) 2022-02-15 13:22:13 +01:00
Hugo Häggmark
f1c4da095b
Chore: Removes console output from InspectDataTab.test.tsx (#45374) 2022-02-15 13:33:10 +02:00
Hugo Häggmark
10a9ca0ae1
Chore: Removes console outputs from runRequest.test.ts (#45375) 2022-02-15 11:12:26 +02:00
Marcus Andersson
9a12b3ea00
TemplateSrv: exposing a function to detect if a target contains a template (#45214)
* exposing a function to check if a target contains variables.

* fixed tests.

* renamed function

* updated betterer result.
2022-02-15 08:53:42 +01:00
Hugo Häggmark
21beb88a4f
Chore: Remove console ouputs from DashboardPage.test.tsx (#45373) 2022-02-15 07:40:27 +01:00
Gabriel MABILLE
6fbf346747
AccessControl: Add endpoint to get user permissions (#45309)
* AccessControl: Add endpoint to get user permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Fix SA tests

* Linter is wrong :p

* Wait I was wrong

* Adding the route for teams:creator too

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-02-11 17:40:43 +01:00
Alex Khomenko
574f609550
Init node item (#45218) 2022-02-11 16:18:33 +01:00
Torkel Ödegaard
089d6d7f7a
Alerting: Fixing minor styling issues (#45236) 2022-02-11 12:34:32 +01:00
matt abrams
8c47373d74
LibraryPanels: Prevent long descriptions and names from obscuring the delete button (#45190)
* fix library panel description wrapping

* make panel name wrap
2022-02-11 10:57:22 +00:00
Ieva
6fb3aac2e1
Access control: team UI improvements with FGAC (#45255)
* show teams page for user who can't list teams but can create teams

* Fixing buttons and routes

* Small refactor

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-02-11 09:58:37 +00:00
Torkel Ödegaard
cc49537965
Alerting: Refactor ActionIcon to use our normal Button and LinkButton components (#45227)
* Alerting: Refactor ActionIcon to use our normal Button and LinkButton components

* Fixed test

* Fixed test
2022-02-11 10:12:26 +01:00
J Guerreiro
cb461d931f
ServiceAccounts: allow deleting from service account list (#45239)
* ServiceAccounts: allow deleting from service account list

* Make delete confirmation more explicit
2022-02-10 18:21:04 +01:00
Karl Persson
d2b9da9dde
Access control: Support uids for resource permissions (#45226)
* add middleware to solve uid -> id for requests
2022-02-10 17:47:48 +01:00
Ashley Harrison
ec48b81388
Unescape regex string (#45137) 2022-02-10 14:45:39 +00:00
Jack Westbrook
979907e9dd
Chore: Set tsconfig target to ES6 (#44842)
* chore(tsconfig): update grafana/tsconfig to 1.2.0 for outputting es6

* rewrote the unsubscription part to use first().

* test: update failing tests to work with es6 output

* removed bug where we dispatch a promise instead of an array of ritch history.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-02-10 14:37:39 +01:00
J Guerreiro
7b397184a0
ServiceAccounts: add role picker to service accounts list (#45127) 2022-02-10 14:04:07 +01:00
Piotr Jamróz
e7605ad974
Query History: Split data and view models (#44922)
* Remove unused properties

* Fix unit tests

* Fix unit tests

* Split data models

* Simplify updating items in rich history

* Update tests

* Fix starring an item and add a unit test

* Move the converter to a separate file and add unit tests

* Convert a private function to an inline function

* Add more docs and clean up the code

* Update public/app/core/history/localStorageConverter.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/core/utils/richHistory.test.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Use template literals over explicit casting

* Split updateRichHistory to three separate functions

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-10 13:59:43 +01:00
Shahar Mor
3eac34f5f3
Kiosk: Reuse kiosk module (#44625)
* Reuse kiosk module, centralize kiosk query handling

* update kiosk tests to set correct kiosk value

* fix DashboardPage kiosk test

* remove unused UrlQueryValue, revert import change
2022-02-10 11:54:50 +00:00
Josh Hunt
c7a5d2c5c7
Chore: Remove our typeAsJestMock in favor of jest.mocked (#45114) 2022-02-09 23:50:59 +01:00
Artur Wierzbicki
d60c2dff40
Chore: export closestIdx from StreamingDataFrame (#45162)
* #41993: export closestIdx function

* #41993: formatting

* #41993: formatting v2
2022-02-09 22:12:24 +04:00
Nathan Rodman
f019ee886a
Alerting: fix act warnings in alerting tests (#45113)
* fix act warnings in alerting tests

* remove unnecessary angular dep
2022-02-09 08:47:50 -08:00
Alexander Zobnin
089a111858
Service accounts: Add token UI (#45081)
* Initial token creation dialog

* Use date picker for expiration date

* Reset state after closing modal

* Create token flow

* Move modal to separate component

* Minor refactor

* Apply suggestions from code review

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

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-02-09 11:38:46 +01:00
Agnès Toulet
ee6f8b6cd9
Feature Highlights: add RudderStack events (#45099)
* add RS events for PRO badge

* part 2

* fix team sync events

* clean up ProBadge
2022-02-09 11:18:27 +01:00
Artur Wierzbicki
a025109647
Dash previews: populate crawler queue from SQL query (#44083)
* add SQL migrations

* dashboard previews from sql: poc

* added todos

* refactor: use the same enums where possible

* use useEffect, always return json

* added todo

* refactor + delete files after use

* refactor + fix manual thumbnail upload

* refactor: move all interactions with sqlStore to thumbnail repo

* refactor: remove file operations in thumb crawler/service

* refactor: fix dashboard_thumbs sql store

* refactor: extracted thumbnail fetching/updating to a hook

* refactor: store thumbnails in redux store

* refactor: store thumbnails in redux store

* refactor: private'd repo methods

* removed redux storage, saving images as blobs

* allow for configurable rendering timeouts

* added 1) query for dashboards with stale thumbnails, 2) command for marking thumbnails as stale

* use sql-based queue in crawler

* ui for marking thumbnails as stale

* replaced `stale` boolean prop with `state` enum

* introduce rendering session

* compilation errors

* fix crawler stop button

* rename thumbnail state frozen to locked

* #44449: fix merge conflicts

* #44449: remove thumb methods from `Store` interface

* #44449: clean filepath, defer file closing

* #44449: fix rendering.Theme cyclic import

* #44449: linting

* #44449: linting

* #44449: mutex'd crawlerStatus access

* #44449: added integration tests for `sqlstore.dashboard_thumbs`

* #44449: added comments to explain the `ThumbnailState` enum

* #44449: use os.ReadFile rather then os.Open

* #44449: always enable dashboardPreviews feature during integration tests

* #44449: remove sleep time, adjust number of threads

* #44449: review fix: add `orgId` to `DashboardThumbnailMeta`

* #44449: review fix: automatic parsing of thumbnailState

* #44449: lint fixes

* #44449: review fix: prefer `WithDbSession` over `WithTransactionalDbSession`

* #44449: review fix: add a comment explaining source of the filepath

* #44449: review fix: added filepath validation

* #44449: review fixes https://github.com/grafana/grafana/pull/45063/files @fzambia

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-02-09 13:23:32 +04:00
Torkel Ödegaard
7c0b453e19
Tooltips: Make tooltips non interactive by default (#45053)
* Tooltips: Make tooltips non interactive by default

* More updates and cleanup

* Update

* Make time range picker tooltip interactive

* Fix issue

* Trying to make Receivers test faster

* Make JSONCell tooltip interactive
2022-02-08 22:58:20 +01:00
Roy C
3d0cff5410
Alerting: remove error banner when Prometheus ruler is not supported (#44571) 2022-02-08 21:03:14 +01:00
Artur Wierzbicki
424a79273f
Chore: Clean up logs and warnings from Edge unit tests (#45050)
* #45026: mock console log output in tests

* #45026: update yarn.lock file
2022-02-08 20:45:20 +04:00
Ieva
4f4b1cb5ea
Access control: hide team role picker if user doesn't have access to it (#45068)
* hide team role column

* hide or disable the role picker as needed

* add SWL filtering for role listing
2022-02-08 16:38:13 +00:00
Kristina
4e38ac9cf7
Remove return to panel button and related code (#45018) 2022-02-08 10:20:22 -06:00
Andrej Ocenas
a58e6ab622
TraceView: refactor UI components injection (#44289)
* Remove UIDivider

* Update TracePageSearchBar buttons

* Remove UIButton

* Remove UIInput

* Remove LoadingIndicator

* Remove UIIcon

* Remove UITooltip

* Remove UIDropdown

* Remove UIMenu
2022-02-08 17:14:33 +01:00
Konrad Lalik
1cf48618de
Alerting: Improve Contact Points error handling (#44888)
* Add 400 and 408 errors handling to display useful error message

* Add generic error handling

* Improve type guard
2022-02-08 17:08:27 +01:00
Gábor Farkas
2c0030b1b4
logs-volume: remove custom timeout (#45041)
* logs-volume: remove custom timeout

* make error message a little better
2022-02-08 15:39:09 +01:00
Kristina
c5f0701707
Reduce spacing for Explore/Logs switches (#44935) 2022-02-08 08:21:34 -06:00
Eric Leijonmarck
79340c087f
Add number of tokens to the service accounts view (#44919)
* feat: add serviceaccountDTO

* WIP

* feat: listing number of tokens for a given service account

* nit: removed fmt

* Update pkg/services/serviceaccounts/database/database.go

* Update public/app/features/serviceaccounts/ServiceAccountsListPage.tsx

* fixes

* align DTOProfile data to the frontend

* reviewed myself fixes

* fix: tests fix
2022-02-08 14:31:34 +01:00
J Guerreiro
8c49e96439
ServiceAccounts: Add token view for Service Accounts (#45013)
* fix SA creation scope

* add writer action to SA fixed role

* ServiceAccounts: Add token table to SA detail page

* ServiceAccounts: Allow deletion of tokens from token table

* refactor service account page

* avoid using store for delete
2022-02-08 11:35:15 +00:00
Hugo Häggmark
9e1cb8c12a
LibraryPanels: Removes save errors for panels changed to library panels (#45033) 2022-02-08 06:55:00 +01:00
Josh Hunt
6baf38e84b
Variables: Fix crash when changing query variable datasource (#44957)
* Variables: refactor variable editor state to dispatch typed & atomic extended props

* Mock variable editor in tests

* Make dataSources mandatory in AdHocVariableEditorState

* nit
2022-02-07 23:52:07 +01:00
Josh Hunt
1c6eca09bb
Variables: Explicitly type variable editor extended state (#44749)
* Narrow Variable editor state using selector functions

 - Explicitly type "extended" editor state in editor/reducter.ts using a union
 - Create selectors to narrow the types, using unique properties from each extended state to discriminate the union
 - Update DataSourceVariableEditor to use new style of redux connector
 - Update variable editor components to use new selectors

* fix tests

* Make adhoc variable infoText optional, because it is!

* Add AdHocVariableEditor tests

* DataSourceVariableEditor tests

* comment

* reset

* Wrote tests for selectors \(that actually caught a bug, whodathunkit)

* fix stray types and lint issues

* Rename selector functions
2022-02-08 09:31:42 +11:00
Eric Leijonmarck
334c29eebf
feat: creation of service account (#44913)
* feat: creation of service account

* added back button for the details page

* refactor: remove unused file, renamed fields

* oppps
2022-02-07 14:12:39 +01:00
Piotr Jamróz
bfe66a1780
Fix conflicts incorrectly resolved in 8fabe8b6a7 (#44975) 2022-02-07 13:36:16 +01:00
Marcus Andersson
eb9d85a2bf
Deprecation: use locationService in favor of getLocationSrv (#44813)
* deprecated

* updating documentation.

* added deprecation notice.

* Replacing deprecated getLocationSrv.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

* updating according to feedback.

* Update docs/sources/developers/plugins/migration-guide.md

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

* Update docs/sources/developers/plugins/migration-guide.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-07 09:37:56 +01:00
Piotr Jamróz
a40fa83893
Query History: Remove unused properties (#44904)
* Remove unused properties

* Fix unit tests

* Fix unit tests
2022-02-04 17:05:46 +01:00
Gilles De Mey
1680e284e5
Alerting: validate namespace and groupname for Grafana manages and Lotex alerts (#44872) 2022-02-04 15:04:11 +01:00
Karl Persson
3cf31451ec
Access control: Reduce number of API calls for role picker (#44905)
* Restucture state for TeamRolePicker and UserRolePicker

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-04 14:54:42 +01:00
Piotr Jamróz
6bb6b13379
Query History: Refactor persistence layer (#44545)
* Extract Rich History storage into two separate implementations

Implement getting all entries and adding a new entry

* Add deleting rich history items

* Add editing rich history

* Simplify RichHistoryStorage API

* Reorganize methods

* Rename variable

* Remove feature toggle

* Fix TS errors

* Fix tests

* Clean up

* Clean up only when adding new entry

* Fix showing a warning message

* Use enum instead of a string

* Update public/app/core/history/richHistoryLocalStorage.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Update public/app/core/history/richHistoryLocalStorage.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Improve readability

* Rename files and remove inferred return types

* Use const over a var

* Remove unsed files

* Remove redundant null check

* Update public/app/core/history/richHistoryLocalStorageUtils.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Fix linting issues

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-04 12:46:27 +01:00
Ashley Harrison
9e52361c1e
Accessibility: Fix text selection when using FocusScope (#44770)
* Add tabIndex={-1} to places using focusScope to allow for text highlighting

* use useDialog

* don't need explicit tabIndex anymore

* remove duplicate spreading of props
2022-02-04 11:20:18 +00:00
Josh Hunt
f1b2e2b7ff
Chore: More variable e2e tests (#44803)
* Add Datasource variable e2e tests

* Update other tests

* Fix names/comments in tests

* Add Interval variable tests

* fix typo
2022-02-04 12:37:01 +11:00
Josh Hunt
de7a920967
Chore: Suppress messages and logs from tests (#44629)
* Suppress "not wrapped in act()" warning in UserPicker test

* Add menuShouldPortal to AmRoutesExpandedForm to suppress deprecation warning

* use forwardRef in alerting ActionIcon to suppress ref warning

* Add menuShouldPortal to alerting GroupBy to suppress deprecation warning
2022-02-04 12:36:44 +11:00
Josh Hunt
6211ca4d3d
Chore: Move variable field selectors to data-testid (#44801)
* Chore: Move variable field selectors to data-testid

* Fix data source variable editor selector

* fix test
2022-02-04 11:55:19 +11:00
Gilles De Mey
c1a0c2664c
Alerting: add custom grouping to Alert Panel (#44559)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-02-03 19:07:27 +01:00
Gabriel MABILLE
8217d6d206
AccessControl: Change teams permissions page when accesscontrol is enabled (#43971)
* AccessControl: Change teams permissions page when frontend is hit

* Implement frontend changes for group sync

* Changing the org/teams/edit permissions

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Fixing routes

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>

* Use props straight away no need to go through the state

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

* Update public/app/features/teams/TeamPages.tsx

Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-02-03 17:49:39 +01:00
Gabriel MABILLE
86756ee3e5
AccessControl: introduce a different accesscontrol check (licensed or not) (#44777)
Co-authored-by: ievaVasiljeva <ieva.vasiljeva@grafana.com>
2022-02-03 16:27:53 +01:00
Giordano Ricci
6415b9a54d
Explore: avoid locking timepicker when range is inverted (#44790)
* Explore: avoid locking timepicker when range is inverted

* Explore: prevent time picker to lock if from & to search parameters are present
2022-02-03 13:45:29 +00:00
Gilles De Mey
29b97361f7
Alerting: load correct unified alerting tab (#44794) 2022-02-03 13:35:56 +01:00
Alex Khomenko
a79c048344
Feature Highlights: move setting to a feature toggle (#44780)
* Add toggle

* Use the toggle

* Cleanup
2022-02-03 13:53:23 +02:00
Josh Hunt
ce4d8646fd
Chore: E2E tests for various variables types (#44747)
* Pass data-testid into VariableTextEditorField

* Add e2e tests for custom variables

* Rename query variable specs to match others

* Add e2e tests for Text Box variables

* manually remove id: null

* Add tests for constant variables
2022-02-03 09:58:56 +11:00
Eric Leijonmarck
1dd2579528
fix: remove migrated, and /org endpoint (#44788)
* fix: remove migrated, and /org endpoint

* Update pkg/api/index.go
2022-02-02 16:32:37 +01:00
Kyle Brandt
040ce40113
SSE: Mode to drop NaN/Inf/Null in Reduction operations (#43583)
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-02-02 14:50:44 +01:00
Ashley Harrison
0cb3037b55
Panel: Embed URL is now correctly generated for a panel in the home dashboard (#44706)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* test tidyup

* Add comment for route

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Muaaz Saleem <muaazsaleem@Muaazs-MacBook-Pro.local>
2022-02-02 13:38:23 +00:00
renovate[bot]
d87cd6f26c
Update dependency prettier to v2.5.1 (#43473)
* Update dependency prettier to v2.5.1

* prettier fixes

* chore(toolkit): bump prettier to 2.5.1

* style(eslint): bump grafana config to 2.5.2 in core and toolkit

* style(mssql-datasource): fix no-inferrable-types eslint errors

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-02-02 12:02:32 +00:00
Konrad Lalik
69e4796504
Alerting: Split legacy and unified routing configuration (#44641)
* Disable add alert menu entry for legacy alerting

* Split legacy and unified routing configuration

* Fix fallback routes configuration
2022-02-02 10:57:43 +01:00
Artur Wierzbicki
46a34451d5
Analytics: add more properties to dashboard list viewed event (#44739) 2022-02-02 13:41:10 +04:00
Karl Persson
e93e1bdd2b
Access control: Enable data source view for partial permissions (#44695)
* Return correct value

* Remove scope all requirement

* Only add dashboard sub nav if user is admin
2022-02-01 15:00:05 +01:00
Peter Holmberg
552c24a66e
Alerting: Show affected alert rules when creating Silence (#44307)
* first things

* show affected rules when creating silence

* revert typescript bump

* fix yarn lock

* fix import order

* fixing tests

* some layout for affected alerts

* fix test

* add default description

* review part 1

* Add a badge for number of affected alerts

* fix test

* remove blank space
2022-02-01 09:49:05 +01:00
Artur Wierzbicki
6e1615b42a
Analytics: send dashboard_list_viewed events to rudderstack (#44589)
* #44449: report interactions with showPreviews toggle

* #44449: hookify showPreviews

* #44449: report dashboard_list_viewed event rather than enabled/disabled_dashboard_previews
2022-01-31 22:17:05 +04:00
Hugo Häggmark
5a5f5cacc8
Variables: Fix for constant variables in self referencing links (#44631)
* Variables: Fix for constant variables in self referencing links

* Chore: adds bettercomment
2022-01-31 13:34:26 +01:00
Konrad Lalik
88f3dff6d2
Alerting: Fix moving alert rules to a different folder (#44533)
* Prevent rule deletion when creation in a new folder fails

* Fix handling duplication of rules when moving between folders

* Add unit test for unique name generator

* Fix typo
2022-01-31 12:09:06 +01:00
Josh Hunt
d2f80c3a6f
Chore: Replace ts-jest mocked with jest.mocked (#44630) 2022-01-31 09:28:58 +01:00
Torkel Ödegaard
64e1e91403
PromQueryBuilder: Query builder and components that can be shared with a loki query builder and others (#42854) 2022-01-31 06:57:14 +00:00
Hugo Häggmark
a660ccc6e4
PanelEdit: Adds error indicator in table view (#44595) 2022-01-31 06:02:24 +01:00
Gilles De Mey
26ddeaf3d7
fix: multiple queries in alerting regression (#44585) 2022-01-28 16:05:19 +01:00
Konrad Lalik
c6e6e92a80
Alerting: Filtering for notification policies (#44363)
* Add filtering by matching label

* Add label and contact based filters to Notification policies

* Improve filters UI, add clear filters option

* Add clearing of filters before switching to adding mode

* Move filtering code to the AmRoutesTable component

* Fix the clearing of silences filter

* Remove key-based input resetting

* Use uniqueId for input key generation

* Add tests for notification policies filtering
2022-01-28 09:40:05 +01:00
Tharun Rajendran
5721933e4b
NodeGraph: fix rendering of node graph in dashboard panel (#44552)
Signed-off-by: tharun <rajendrantharun@live.com>
2022-01-27 10:19:54 -07:00
Giordano Ricci
ea48d131ee
Explore: deprecate compact URL encoding & dafault to extended (#44385) 2022-01-27 11:23:56 +00:00
Alex Khomenko
28c51cde3a
Feature highlights: Highlight team group sync (#44477)
* Highlight team group sync

* Update text
2022-01-27 09:11:57 +02:00
Nathan Marrs
8a7b469679
Resource picker/improve ux (#44402) 2022-01-26 11:29:04 -08:00
Alex Khomenko
55e1c53e36
NavModel: Enable adding suffix elements to tabs (#44155)
* Trigger extra events

* Extend html attributes

* Add suffix to tabs

* Add upgrade routes

* suffix => highlightText

* suffix => suffixText

* Add size prop

* Update prop name

* Convert tabSuffix to a component
2022-01-26 09:15:45 +02:00
kay delaney
3c1122cf29
CollapsableSection: Improves keyboard navigation and screen-reader support (#44005) 2022-01-25 15:36:17 +00:00
Erin Noe-Payne
ac945fb6e1
Tempo / Trace Viewer: Implement deep linking to spans 2022-01-24 08:49:35 -07:00
Peter Holmberg
a7423d8760
Alerting: Fix Card link in legacy alerting items (#44094)
* remove href

* revert yarn.lock
2022-01-24 16:16:55 +01:00
Agnès Toulet
65bdb3a899
FeatureFlags: Revert managing feature flags outside of settings.Cfg (#44382)
* Revert "FeatureToggles: register all enterprise feature toggles (#44336)"

This reverts commit f53b3fb007.

* Revert "FeatureFlags: manage feature flags outside of settings.Cfg (#43692)"

This reverts commit f94c0decbd.
2022-01-24 16:08:05 +01:00
Timur Olzhabayev
c3f69cc4d9
Adding reload to datasourceSrv (#44217) 2022-01-24 10:45:05 +01:00
Nathan Marrs
76827c2069
Refactor: move threshold editor out of grafana-ui (#44300) 2022-01-21 16:17:33 -08:00
Ryan McKinley
082b1b4db7
Geomap: add spatial transformers (alpha) (#44020) 2022-01-21 14:27:26 -08:00
Marius Bezuidenhout
9fc0aee02b
Feature/mathandreduce (#41608)
* Added new math functions: round, ceil, floor 
* Added a new reduce function: last.
2022-01-21 13:15:50 -05:00
Christopher Norris
f2da409703
Chore: fix typo (#44188) 2022-01-21 15:58:40 +01:00
Jean-Philippe Quéméner
8ee3f59cd4
Alerting: recognize Cortex datasources correctly in the frontend (#44316)
* Alerting: always use msg field for user facing errors

* fix: revert front-end Cortex detection

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2022-01-21 15:44:11 +01:00
Torkel Ödegaard
f3859f8b60
Templating: Fixes flickering of repeated panels and rows (#43399) 2022-01-21 11:26:40 +01:00
Nathan Marrs
c6e853a13c
Refactor: Move Value Mappings to Grafana public instead of Grafana UI (#44237) 2022-01-20 20:36:34 -08:00
Ryan McKinley
f94c0decbd
FeatureFlags: manage feature flags outside of settings.Cfg (#43692) 2022-01-20 13:42:05 -08:00
Dominik Prokop
7bf25f62e1
Cursor sync: Apply the settings without saving the dashboard (#44270)
* Cursor sync: Apply the settings without saving the dashboard

* Remove unnecessary code

* Lint god damn
2022-01-20 16:38:10 +01:00
Kyle Brandt
74193b3c1b
SSE: Remove beta tooltip (#43912) 2022-01-20 08:52:36 -05:00
Dominik Prokop
0a5771ee6b
TimeSeries/BarChart/XYChart: Allow hiding x axis (#44107)
* TimeSeries/BarChart/XYChart: Allow hiding x axis

* Update public/app/plugins/panel/barchart/utils.ts

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>

* Migrations

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-01-20 00:38:32 -08:00
Eric Leijonmarck
bf4c217b95
Serviceaccounts: refactor list using server admin page (#44122)
* refactor: use server admin listing serviceaccounts

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

* setup route for specifc service account

* add routes to index

* main issue with spelling mistakes

* feat: make routes /serviceacconts/id for navModel

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update pkg/services/serviceaccounts/manager/service.go

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-01-19 17:03:45 +01:00
Josh Hunt
9f97f05fcc
DashboardSettings: Prevent Dashboard permissions from linking to folder permissions when user does not have sufficient permissions (#44212)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* add tests

* fix up

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2022-01-19 16:27:33 +01:00
Alexander Zobnin
dc913f2311
Access control: fetch role options only if user has permissions (#44201)
* Access control: fetch role options only if user has permissions

* Fix org/users page
2022-01-19 16:15:52 +03:00
Gabriel MABILLE
ba839d1f7c
AccessControl: Refactor addAccessControlQueryParam (#44191)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-01-19 11:27:45 +01:00
Ashley Harrison
252645b330
Playlists: Enable sharing direct links to playlists (#44161)
* Special case mixed datasources... :/

* Hacky implementation of playlist share modal

* Refactor StartModal into PlaylistSettingsModal

* Revert "Refactor StartModal into PlaylistSettingsModal"

This reverts commit e71fc33865.

* Create new ShareModal component

* Revert "Special case mixed datasources... :/"

This reverts commit dd0e3ea4a8.

* PlaylistMode instead of PlaylistModes

* kick drone
2022-01-19 09:44:29 +00:00
Travis Patterson
959723050f
Fix change to mixed bahavior (#44179)
- If the datasource is already set to mixed, don't change any queries in the editor
2022-01-18 13:54:51 -07:00
Nathan Rodman
b98a1d79cf
Alerting: mute timing improvements (#43940)
* mute timing table ui fixes

* add options for CTA to use link

* fix validation for time range
2022-01-18 10:46:36 -08:00
Josh Hunt
36983d8d3b
Chore: Mark up User Profile page for translation (#43874)
* Mark up User profile page for translation

* Extract new messages

* updated selectors

* update selectors

* wip TestProvider

* update tests

* fix field labels

* extract new messages

* don't store date objects in redux state

* don't store date objects in redux state
2022-01-17 16:58:49 +00:00
Alexander Zobnin
867ca5b59e
Access control: Team role picker (#43418)
* Refactor: move fetching from role picker to parent component

* Make built in role props optional

* Initial team role picker

* Add role picker to the teams list

* Optimize fetching roles

* Add pagination for the teams page

* Fix tests

* Hide roles if access control not enabled

* Fix test snapshots

* Refactor: use useAsync() hook

* Refactor: simplify input component

* Move api calls to separate file

* Refactor: use useAsync() hook for user role picker

* Tweak role picker input width

* Fix pagination

* Update test snapshots

* Use loading state from useAsync() hook

* Fix roles label if no roles assigned
2022-01-17 18:04:54 +03:00
Gilles De Mey
bd9df4f829
Alerting: show deleted datasource (#43891) 2022-01-17 14:30:00 +01:00
William Assis
f6b70e0a69
Dashboard save interaction evt (#43304) 2022-01-17 14:07:36 +01:00
Hugo Häggmark
4b4afc7b2c
Chore: reduces circular dependencies for variables/utils.ts (#44087)
* Chore: move constants to own file

* Chore: moves safe* functions to grafana/data

* Chore: moves safe* functions to grafana/data

* Chore: adds VariableQueryEditorProps and deprecates VariableQueryProps

* Chore: remove getDefaultVariableAdapters function

* Chore: moves transaction status to types

* Chore: fix tests that do not initialise TemplateSrv

* Chore: change space when stringifying

* Chore: revert safe* func move

* Chore: remove circular dependency in Explore utils
2022-01-17 12:48:26 +01:00
Ashley Harrison
c618339482
Export: Fix error being thrown when exporting dashboards using query variables that reference the default datasource (#44034)
* handle undefined datasources, add unit test

* slightly nicer
2022-01-17 10:21:13 +00:00
Will Browne
a65ce992c1
fix delete plugin dashboard (#44055) 2022-01-17 10:33:42 +01:00
Eric Leijonmarck
f763be8f0f
small fix 🙏 (#44089) 2022-01-17 10:01:01 +01:00
Hugo Häggmark
7ffefc069f
Variables: Handle variable cancellations better (#43987)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>>
2022-01-14 11:19:42 +01:00
Ryan McKinley
fd8baf5f7d
Gazetteer: reactor so the source is a DataFrame (#43783) 2022-01-13 17:15:31 -08:00
Gilles De Mey
55ec05b560
Alerting: remove dead code (#43956) 2022-01-13 16:23:49 +01:00
Ezequiel Victorero
13223140ad
Disable server stats buttons when user doesn't have permissions to access those links (#43603) 2022-01-13 10:42:09 -03:00
Eric Leijonmarck
ccd9e46dda
changed route on the serviceaccounts endpoint (#43989)
* changed route on the serviceaccounts endpoint

* refactor: change to base url variable

* tests fixed
2022-01-13 14:15:43 +01:00
Konrad Lalik
c829535f14
Alerting: Fix the silence url's matcher parameters (#43898)
* Split silence matchers parameter into a separate entry for each label

* Unify the silence link creation

* Remove duplicated matchers when parsing to/from query params

* Add tests for matchers

* Add a comment with a duplication removal explanation

* Improve label duplication comment

* Remove redundant code

* Use uniqBy to simplify the code. Rename matchers parameter

* Fix Silence test data
2022-01-13 10:48:13 +01:00
Ashley Harrison
8f1468df6a
only push default datasources to the list if they're not undefined (#43966) 2022-01-13 09:26:26 +00:00
Agnès Toulet
5eaaadd59d
Tabs: add suffix prop for the tab name (#43869)
* Tabs: add suffix prop for the tab name

* Replace FC with JSX.Element
2022-01-12 15:37:16 +01:00