J Guerreiro
0ec21a4ed6
Service accounts: make is_service_account nullable ( #45541 )
...
* add base nullable migration to is_service_account
Co-authored-by: Jeremy Price <jeremy.price@grafana.com>
* fix postgres migration
* ServiceAccounts: ensure SA is set to false when creating a user
Co-authored-by: Jeremy Price <jeremy.price@grafana.com>
2022-02-18 13:08:00 +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
Gabriel MABILLE
fc514738b2
Chore: fix comment ( #45593 )
2022-02-18 11:46:52 +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
Gabriel MABILLE
14bee49f9a
AccessControl: Compute metadata from context permissions ( #45578 )
...
* AccessControl: Compute metadata from context permissions
* Remove nil
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
* Check user permissions are set
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
2022-02-18 11:27:00 +01:00
Szymon Szypulski
929d8a358f
Cloudwatch: Add support for AWS/PrivateLink* metrics and dimensions ( #45515 )
...
Add support for AWS/PrivateLink{Endpoints,Interfaces} metrics and
dimensions. Change is based on the official AWS documentation[1].
1. https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-cloudwatch-metrics.html
2022-02-18 10:21:17 +01:00
Kat Yang
0eb37c08bd
Chore: Add sqlstore dashboard methods to store and mockstore ( #45567 )
2022-02-18 09:37:49 +01:00
Santiago
a9de33601c
make send_alerts_to field nullable ( #45572 )
...
* make send_alerts_to field nullable
* set nullable to true since we have a default value
2022-02-18 01:45:34 -03:00
Karl Persson
f42c830b3c
Inject dashboard provisioning service instead of store ( #45533 )
2022-02-17 17:18:19 +01:00
Kat Yang
d3ae8939af
Chore: Remove x from health, alert notification, dashboard, stats, user ( #45265 )
...
* Chore: Remove x from health
* Chore: Remove x from dashboard and user
* Chore: Remove x from alert notification
* Chore: Remove x from stats
* Fix: Update func signature in stats test
* Refactor: Remove x from GetDashboardTags
* Chore: Remove x from dashboard
* Chore: Remove x from Stats
* Fix: Update refs of HasAdminPermissionInFolders
* Fix: Adjust funcs in tests to be sqlStore methods
* Fix: Fix database folder test sqlstore methods
2022-02-17 16:59:09 +01:00
Sofia Papagiannaki
17dee4700c
SQLStore: Fix migrator locking test for SQLite ( #45523 )
...
* SQLStore: Fix migrator locking test for SQLite
2022-02-17 16:12:44 +02:00
J Guerreiro
42d21e1af5
ServiceAccounts: Use http library for status codes ( #45525 )
2022-02-17 15:00:56 +01:00
Agnès Toulet
8835020457
Feature Highlights: add RS event for nav items ( #45470 )
2022-02-17 14:20:37 +01:00
Gabriel MABILLE
47e248ceab
AccessControl: Remove permissions on data source delete ( #45504 )
...
* AccessControl: Remove permissions on datasource delete
* Ensure legacy behavior is preserved
2022-02-17 14:06:34 +01:00
Karl Persson
cdc08105c2
Access control: Set default permissions for data sources when using access control ( #45482 )
...
* Rename interfaces and use then with wire injection
* Set default permissions when creating new data source
2022-02-17 14:03:45 +01:00
J Guerreiro
8afd5d54f7
Service Account detailed edit ( #45404 )
...
* ServiceAccounts: Update service account route
* ServiceAccounts: Update service account tests
* ServiceAccounts: remove extraneous file
2022-02-17 12:19:58 +00:00
Artur Wierzbicki
3e53a08090
#44449 : hide dashboard preview admin UI ( #45493 )
2022-02-17 12:34:07 +04:00
ying-jeanne
10b47480eb
add dashboardsnap as service of http server ( #45461 )
2022-02-17 09:31:26 +01: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
Isabella Siu
50a53ef58b
CloudWatch: replace metricFindQueries with CallResourceHandler ( #41571 )
2022-02-16 14:28:26 -05:00
idafurjes
b01a56c2b7
Fix alerting methods using AlertNotificationService ( #45477 )
2022-02-16 18:54:29 +01: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
Ryan McKinley
1554bffcb8
Search: apply security in before returning results ( #45430 )
...
Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-02-16 09:47:41 -08:00
Will Browne
a2b391912a
Plugins: Add ability to enable debug logging per plugin ( #45481 ) ( #45485 )
...
* use plugin ID in logger name
* retrigger
(cherry picked from commit bd0ff79e28
)
2022-02-16 18:22:10 +01:00
Dan Cech
51cd6f3cc5
Configuration: Add ability to customize okta login button name and icon ( #44079 )
...
* add ability to customize okta login button name and icon
* update configs, add basic frontend test
* add icon to oauth settings type
* trigger tests
* fix typecheck
2022-02-16 11:35:00 -05: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
Selene
d5b98772ed
Dashboards: Refactor service to make it injectable by wire ( #44588 )
...
* Add providers to folder and dashboard services
* Refactor folder and dashboard services
* Move store implementation to its own file due wire cannot allow us to cast to SQLStore
* Add store in some places and more missing dependencies
* Bad merge fix
* Remove old functions from tests and few fixes
* Fix provisioning
* Remove store from http server and some test fixes
* Test fixes
* Fix dashboard and folder tests
* Fix library tests
* Fix provisioning tests
* Fix plugins manager tests
* Fix alert and org users tests
* Refactor service package and more test fixes
* Fix dashboard_test tets
* Fix api tests
* Some lint fixes
* Fix lint
* More lint :/
* Move dashboard integration tests to dashboards service and fix dependencies
* Lint + tests
* More integration tests fixes
* Lint
* Lint again
* Fix tests again and again anda again
* Update searchstore_test
* Fix goimports
* More go imports
* More imports fixes
* Fix lint
* Move UnprovisionDashboard function into dashboard service and remove bus
* Use search service instead of bus
* Fix test
* Fix go imports
* Use nil in tests
2022-02-16 14:15:44 +01:00
Torkel Ödegaard
cfa24a3cfb
Prometheus: Auto legend handling ( #45367 )
...
* Legend editor is working
* It's working
* Progress on auto legend mode
* Fixes
* added unit tests
* Added go tests
* Fixing tests
* Fix issue with timing and internal state
* Update public/app/plugins/datasource/prometheus/querybuilder/components/PromQueryCodeEditor.tsx
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-02-16 14:06:33 +01:00
Joey Tawadrous
b4dd3138ce
InfluxDB: metricFindQuery migration to backend ( #44546 )
...
* Send metricFindQuery to backend
* Added feature toggle
* Changed flag name
* metricFindQuery backend
* Added test for metricFindQuery backend parse
* Added test for show tag values
* Test for metricFindQueries
* Updated tests
* Put back comment
* Case insensitive in transformRows
* Check length ov value pair
* Sep tests
* Updated valuePair index
2022-02-16 09:16:22 +00:00
Sofia Papagiannaki
6a38ce2307
Resolve depedency cycle ( #45427 )
2022-02-16 10:59:34 +02:00
Yuriy Tseretyan
02f8e99ca1
Alerting: move fake stores to store package ( #45428 )
...
* make fake storage public
* move fake storages to store package
2022-02-15 17:24:39 -05:00
Ryan McKinley
d665306ad1
Search: add feature flag and basic service ( #45112 )
...
Co-authored-by: Artur Wierzbicki <artur@arturwierzbicki.com>
2022-02-15 10:26:03 -08: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
Sofia Papagiannaki
d718ee1918
SQLStore: Prevent concurrent migrations ( #44101 )
...
* SQLStore: Prevent concurrent migrations
* Hide behind a feature toggle
* Configurable locking attempt timeout
* Update docs/sources/administration/configuration.md
Co-authored-by: Igor Suleymanov <radiohead@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-15 18:54:27 +02:00
Ivana Huckova
636a45f065
Query history: Create API to patch comment of query in query history ( #44981 )
...
* Query history: Patch comment
* Update docs/sources/http_api/query_history.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Update docs/sources/http_api/query_history.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
* Remove redundant check
* Use WithTransactionalDbSession to update comment
* Fix status code in test
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-02-15 15:43:17 +01: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
Serge Zaitsev
b9e5bae51f
Chore: Remove bus.Dispatch from cleanup service ( #45401 )
2022-02-15 14:56:19 +01:00
Shirley
1c1a45a880
CloudWatch: Add tests to annotations query ( #45337 )
2022-02-15 12:45:50 +01:00
Gábor Farkas
a612087c63
loki: remove fullRangeLogsVolume feature flag ( #45286 )
2022-02-15 09:05:03 +01:00
Yuriy Tseretyan
095ea44e97
Alerting: Move BaseInterval and MinInterval to UnifiedAlerting config ( #45107 )
...
* use base interval if legacy value is less than the base interval
2022-02-11 16:13:49 -05:00
Ezequiel Victorero
4f815e3d8e
Access control: adding FGAC to annotation GET endpoints and fixed roles ( #45102 )
...
* Access control: adding FGAC to annotation GET endpoints and fixed roles
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-02-11 15:43:29 -03: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
gotjosh
8bf2e642aa
Alerting: Fix updating notification channels in legacy ( #45302 )
...
The problem here is that without the orgID we ignore the lookup of the existing notification channel just before updating and end up failing the update because there is no channel available.
2022-02-11 16:13:51 +00:00
Marcus Efraimsson
6a776c78d4
Datasource: Fixes storing of secureJSONData when creating/updating datasource ( #45290 )
...
Fixes an issue introduced by #44987 where bus dispatch was replaced by calling sqlstore
directly instead of the datasource service.
Fixes #45273
2022-02-11 15:52:14 +01:00
idafurjes
d8a56d08ba
Remove bus from usage stats ( #45275 )
2022-02-11 14:04:15 +01:00
Gábor Farkas
4a7cc3e0f0
loki: enable-by-default the full-range-logs-volume feature (try2) ( #45246 )
...
* loki: enable-by-default the full-range-logs-volume feature
* add explanation comment
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* fixed invalid code
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-02-11 11:28:27 +01: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
Yuriy Tseretyan
d4ac1f0ce1
Update quota service to accept context ( #45186 )
2022-02-10 22:17:50 +01:00
Yuriy Tseretyan
c59567a236
Alerting: support ok state in alert migration ( #45264 )
2022-02-10 21:57:43 +01:00
Artur Wierzbicki
0276b029fc
Previews: crawler as a background service ( #44891 )
...
* 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 : crawler as a background service v0.1
* #44449 : use ServerLockService
* #44449 : use ServerLockService
* #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 : fix FindDashboardsWithStaleThumbnails to include `theme` and `kind` in search params
* #44449 : fix FindDashboardsWithStaleThumbnails to include `theme` and `kind` in search params
* #44449 : create function for crawler on demand
* #44449 : improve crawler logging
* #44449 : fix wire
* #44449 : uncomment dummy thumb service, fix ticker interval
* #44449 : prevent race condition
* #44449 : improve logging
* #44449 : fix theme
* #44449 : review fixes https://github.com/grafana/grafana/pull/45063/files @fzambia
* #44449 : add missing unlock
* #44449 : merge
* #44449 : review fix - logger @fzambia https://github.com/grafana/grafana/pull/45063/files
* #44449 : formatting
* #44449 : merge conflict fix
* #44449 : merge conflict fix
* #44449 : merge conflict fix
* #44449 : naming fix
* #44449 : update authOpts
* #44449 : change authOpts.role back to admin
* #44449 : fix `walk` signature, move ctx to a first argument
* #44449 : add `dashboardPreviewsScheduler` feature flag
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-02-10 22:45:00 +04:00