Commit Graph

43184 Commits

Author SHA1 Message Date
Torkel Ödegaard
1eed40fcf6
Drawer: Fixes closeOnMaskClick false issue (#69083) 2023-05-25 19:43:48 +02:00
Andrej Ocenas
4908045fc3
FlameGraph: Simplify the data needed for context menu and item focusing (#69006) 2023-05-25 18:26:14 +02:00
Nathan Marrs
81264e4a77
Chore: update DataViz GitHub automation (#67880) 2023-05-25 19:21:29 +03:00
Drew Slobodnjak
0fa991a4b9
Prometheus: Heatmap Format with No Data (#68938)
* Prometheus: Heatmap Format with No Data

* Simplify conditional logic
2023-05-25 09:08:56 -07:00
Sladyn
a06a5a7393
Alerting: Improve log messages (#67688)
* Rename base logger and capatilize messages
* Remove cflogger from config.go
2023-05-25 18:55:01 +03:00
Yuri Tseretyan
e00260465b
Alerting: Fix provenance guard checks for Alertmanager configuration to not cause panic when compared nested objects (#69009)
* fix current settings parsed as new
* replace map comparison with cmp.Diff and log the diff
2023-05-25 11:41:11 -04:00
chrisharbro
9a5262d5c8
docs: Update "Create reports" doc to clarify custom time ranges and add information about drafts (#69015)
* Update index.md

Clarify that changes to dashboard time range are only reflected in the report if they are not using a custom time range.

Add information regarding saving a report as a draft.

* Update docs/sources/dashboards/create-reports/index.md

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>

* running prettier

---------

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
2023-05-25 11:40:41 -04:00
Matias Chomicki
2bfd415c07
Loki Query Splitting: Enable tracking for split queries (#68645)
* Loki datasource: move tracking out of runQuery

* Types: move LokiGroupedRequest to types file

* Tracking: add function to track grouped queries

* Query splitting: add tracking to split queries runner

* Remove unnecessary types

* Add unit test

* Tracking: include test case with hidden query

* Update public/app/plugins/datasource/loki/tracking.ts

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

* Update public/app/plugins/datasource/loki/tracking.ts

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

* Update public/app/plugins/datasource/loki/tracking.ts

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

* Update public/app/plugins/datasource/loki/tracking.ts

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

* Tracking: add is_split dimension

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2023-05-25 18:39:16 +03:00
Taewoo K
2823523972
add subTitle with feature toggle check (#69075) 2023-05-25 11:26:25 -04:00
Timur Olzhabayev
59a2b303d0
CODEOWNERS: Switching pkg/service/apikey to authnz squad (#69076)
Switching pkg/service/api-key to authnz squad
2023-05-25 17:23:36 +02:00
Gilles De Mey
721d51a497
Alerting: Adds support for timezones in mute timings (#68813) 2023-05-25 16:19:33 +02:00
Alex Khomenko
6393e2e713
UserIcon: Fix mdx docs (#69079)
UserIcon: Fix mdx
2023-05-25 17:06:34 +03:00
Gabriel MABILLE
edf1775d49
AuthN: Embed an OAuth2 server for external service authentication (#68086)
* Moving POC files from #64283 to a new branch

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Adding missing permission definition

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Force the service instantiation while client isn't merged

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Merge conf with main

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Leave go-sqlite3 version unchanged

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* tidy

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* User SearchUserPermissions instead of SearchUsersPermissions

* Replace DummyKeyService with signingkeys.Service

* Use user🆔<id> as subject

* Fix introspection endpoint issue

* Add X-Grafana-Org-Id to get_resources.bash script

* Regenerate toggles_gen.go
* Fix basic.go

* Add GetExternalService tests

* Add GetPublicKeyScopes tests

* Add GetScopesOnUser tests

* Add GetScopes tests

* Add ParsePublicKeyPem tests

* Add database test for GetByName

* re-add comments

* client tests added

* Add GetExternalServicePublicKey tests

* Add other test case to GetExternalServicePublicKey

* client_credentials grant test

* Add test to jwtbearer grant

* Test Comments

* Add handleKeyOptions tests

* Add RSA key generation test

* Add ECDSA by default to EmbeddedSigningKeysService

* Clean up org id scope and audiences

* Add audiences to the DB

* Fix check on Audience

* Fix double import

* Add AC Store mock and align oauthserver tests

* Fix test after rebase

* Adding missing store function to mock

* Fix double import

* Add CODEOWNER

* Fix some linting errors

* errors don't need type assertion

* Typo codeowners

* use mockery for oauthserver store

* Add feature toggle check

* Fix db tests to handle the feature flag

* Adding call to DeleteExternalServiceRole

* Fix flaky test

* Re-organize routes comments and plan futur work

* Add client_id check to Extended JWT client

* Clean up

* Fix

* Remove background service registry instantiation of the OAuth server

* Comment cleanup

* Remove unused client function

* Update go.mod to use the latest ory/fosite commit

* Remove oauth2_server related configs from defaults.ini

* Add audiences to DTO

* Fix flaky test

* Remove registration endpoint and demo scripts. Document code

* Rename packages

* Remove the OAuthService vs OAuthServer confusion

* fix incorrect import ext_jwt_test

* Comments and order

* Comment basic auth

* Remove unecessary todo

* Clean api

* Moving ParsePublicKeyPem to utils

* re ordering functions in service.go

* Fix comment

* comment on the redirect uri

* Add RBAC actions, not only scopes

* Fix tests

* re-import featuremgmt in migrations

* Fix wire

* Fix scopes in test

* Fix flaky test

* Remove todo, the intersection should always return the minimal set

* Remove unecessary check from intersection code

* Allow env overrides on settings

* remove the term app name

* Remove app keyword for client instead and use Name instead of ExternalServiceName

* LogID remove ExternalService ref

* Use Name instead of ExternalServiceName

* Imports order

* Inline

* Using ExternalService and ExternalServiceDTO

* Remove xorm tags

* comment

* Rename client files

* client -> external service

* comments

* Move test to correct package

* slimmer test

* cachedUser -> cachedExternalService

* Fix aggregate store test

* PluginAuthSession -> AuthSession

* Revert the nil cehcks

* Remove unecessary extra

* Removing custom session

* fix typo in test

* Use constants for tests

* Simplify HandleToken tests

* Refactor the HandleTokenRequest test

* test message

* Review test

* Prevent flacky test on client as well

* go imports

* Revert changes from 526e48ad45

* AuthN: Change the External Service registration form (#68649)

* AuthN: change the External Service registration form

* Gen default permissions

* Change demo script registration form

* Remove unecessary comment

* Nit.

* Reduce cyclomatic complexity

* Remove demo_scripts

* Handle case with no service account

* Comments

* Group key gen

* Nit.

* Check the SaveExternalService test

* Rename cachedUser to cachedClient in test

* One more test case to database test

* Comments

* Remove last org scope

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>

* Update pkg/services/oauthserver/utils/utils_test.go

* Update pkg/services/sqlstore/migrations/oauthserver/migrations.go

Remove comment

* Update pkg/setting/setting.go

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

---------

Co-authored-by: Mihály Gyöngyösi <mgyongyosi@users.noreply.github.com>
2023-05-25 15:38:30 +02:00
Gilles De Mey
73681a251e
Alerting: Add support for Alert State History Loki primary (#69065)
add support for multiple ash targets with loki as primary
2023-05-25 16:09:44 +03:00
SatVeer Singh
c045fcbf69
CloudWatch: Wrap VariableEditor dimension fields (#68967)
CloudWatch: VariableEditor dimension fields
2023-05-25 05:58:19 -07:00
Alex Khomenko
41b609de14
Grafana/ui: Add UserIcon and UsersIndicator components (#66906)
* UserIcon: Move to grafana/ui

* UserIcon: Add story and docs

* UserIcon: Add multiple use case

* UserIcon: Use theme2

* UserIcon: Update props

* UserIcon: Export components

* UserIcon: Update story

* UserIcon: Allow children

* UserIcon: Simplify the rendering logic

* UserIcon: Use button

* UserIcon: Add UsersIndicator component

* UserIcon: Add tests

* UserIcon: Rename folder

* UserIcon: More examples

* UserIcon: Display UserView type

* UserIcon: Update tests

* UserIcon: Expand example

* UserIcon: Export UserView type

* Fixes after review
2023-05-25 15:57:30 +03:00
Timur Olzhabayev
56f33e8b9c
Switching tsdb plugin to the proper squad - @grafana/observability-me… (#69071)
Switching tsdb plugin to the proper squad - @grafana/observability-metrics
2023-05-25 15:48:26 +03:00
Matias Chomicki
9abf8140c7
Loki: Add support for distinct operation in autocomplete and query builder (#69003)
* Loki Autocomplete: add support for suggesting distinct

* Loki query builder: add distinct as format operation

* Remove unused import

* Loki visual query: add support to parse distinct filters

* Query builder: use label param editor for distinct

* Loki Autocomplete: Improve distinct label suggestions

* Query Builder: improve distinct parsing

* Fix tests

* Update tests
2023-05-25 14:22:16 +02:00
Jean-Philippe Quéméner
5717d8954f
Alerting: Return empty list on export if no rules exist (#69023) 2023-05-25 14:12:18 +02:00
Misi
74fd874365
AuthN: Fix render auth when clientTokenRotation is enabled (#68709)
Add isRenderRequest check to scheduleTokenRotationJob
2023-05-25 14:04:56 +02:00
Misi
df4db412cb
Auth: Fix visibility of the Invite button on /admin/users page (#68991)
* Fix for invite button visibility

* Align test
2023-05-25 13:58:41 +02:00
Ashley Harrison
a018fa5cfb
Nested folders: More browse unit tests (#68994)
* improved BrowseDashboardsPage unit tests

* better

* add unit tests for FolderActionsButton
2023-05-25 11:26:39 +01:00
Giuseppe Guerra
e8c1592a47
Datasources: Deprecate and log creating/updating datasources with invalid UIDs (#68800)
* Datasources: Deprecate and log when creating/updating datasources with invalid UIDs

* trigger

* Update invalid uid deprecation log message

* capitalize log
2023-05-25 12:11:51 +02:00
Ashley Harrison
6613610f07
Nested folders: update delete modal title to just be "Delete" (#68999)
update delete modal title to just be "Delete"
2023-05-25 11:07:02 +01:00
George Robinson
65e2df7a2e
Docs: Add JSON format for webhook notifications to differences (#68786) 2023-05-25 10:08:36 +01:00
Andrej Ocenas
55bba165b1
FlameGraph: Add option to align text left or right (#68893) 2023-05-25 11:08:03 +02:00
Tobias Skarhed
25b89babac
CodeEditor: Save with Ctrl+S via onKeyDown instead of addCommand (#68955)
Change addCommand to onKeyDown
2023-05-25 10:49:23 +02:00
Horst Gutmann
f22d1d14a0
CI: Pin the google/cloud-sdk image (#69037) 2023-05-25 10:17:24 +03:00
brendamuir
863f826e62
Docs Alerting: Fixes table in alerting API docs (#68962)
Fixes table in alerting API docs
2023-05-25 08:01:25 +02:00
Melori Arellano
7c2358862e
Edit global time variable - custom date formats use browser time (#69016)
* Edit global time variable - custom date formats use browser time

Fixes https://github.com/grafana/grafana/issues/68748

* run prettier

---------

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
2023-05-24 13:31:21 -07:00
lwandz13
3edeafa663
update prometheus query editor doc (#68595)
* initial updates to outdated info

* minor edits prior to draft PR

* commented out options no longer available

* additional edits

* removed tables, changed format to list

* updated code mode section

* finished edits to builder mode

* added revisions per Brendan

* removed commented out section

* added note short codes
2023-05-24 12:10:02 -07:00
Ryan McKinley
e7da2a179e
Schema: Add schema for role+access policies (#68047) 2023-05-24 10:31:57 -07:00
Yuri Tseretyan
3af95bebe1
Alerting: Migrate unknown NoData\Error settings to the default (#68403)
* use default execution if legacy is not known

* update docs

* Update docs/sources/alerting/migrating-alerts/migrating-legacy-alerts.md

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

* Update docs/sources/alerting/migrating-alerts/migrating-legacy-alerts.md

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

---------

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-05-24 13:09:17 -04:00
Nathan Marrs
f49b9b89cf
chore: high level restructure of canvas panel files (#69004) 2023-05-24 18:32:36 +02:00
Khushi Jain
649c68aafb
Storybook: Added Viztooltip under Visualizations (#68992)
Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2023-05-24 18:32:15 +02:00
Ryan McKinley
c66d5721f7
Kinds: Use apimachinery ObjectMeta for metadata (#68668) 2023-05-24 09:13:44 -07:00
Ashley Harrison
f91c1b9897
Nested folders: use an info banner instead of a warning in the move modal (#68997)
use an info banner instead of a warning
2023-05-24 16:24:45 +01:00
Ieva
9439649a4c
RBAC: remove unused dash and folder permission logic (#68968)
remove unused HasAdmin and HasEdit permission methods
2023-05-24 15:33:35 +01:00
kay delaney
4d74f75470
LibraryPanels: Don't include ScopedVars with persisted model (#67843)
Closes #65518
2023-05-24 14:26:17 +01:00
Ivana Huckova
ca44164bea
Loki: Implement decolorize logql operation (#68972)
* Loki: Implement decolorize operation

* Fix tests
2023-05-24 15:23:54 +02:00
Jack Baldry
6c4cf4f8b9
Enable doc-validator for alerting directories (#68964)
* Enable doc-validator for alerting directories

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Adds missing description frontmatter

* Fix some more links

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix some more links

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fixes anchors

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2023-05-24 14:12:30 +01:00
Torkel Ödegaard
2966989525
ResourcePicker: Fix missing border bug on cancel button (#68966)
* ResourcePicker: Fix missing border bug

* remove unused imports
2023-05-24 15:10:46 +02:00
Will Browne
ae373c662c
Plugins: Refactor env vars to dedicated service (#68960)
* add env vars service

* fix tests

* fix more tests
2023-05-24 14:02:14 +02:00
Ivana Huckova
eff90809a6
Loki: Update LokiOperationOrder (#68905)
Loki: Rename and update order of operations
2023-05-24 13:46:49 +02:00
Ashley Harrison
09a0c1e1bb
Checkbox: Fix extraneous right hand margin when no label is present (#68885)
* remove explicit grid columns, let it automatically work it out

* restore position: relative;
2023-05-24 10:52:21 +01:00
Ashley Harrison
a8f91f115c
Nested folders: Add folder actions to other tabs (#68673)
* add folder actions to other tabs

* fix copy pasta

* add unit tests

* don't need tree here

* fixes some copy pasta

* move into separate fixtures file
2023-05-24 10:41:03 +01:00
Ieva
4980b64274
RBAC: Remove legacy ac from authorization middleware (#68898)
remove legacy AC fallback from RBAC middleware, and some unused auth logic
2023-05-24 09:49:42 +01:00
sam boyer
323cbe1997
kindsys: Adapt to new flattened lineage syntax in Thema (#68034)
* Update all core kinds to flattened lineages

* Regen Go types, without any

* Regen Go types, s/interface{}/any/

* Update generated core typescript

* Update generate docs

* Fix defaults gen in veneer index jenny

* Flatten plugindef lineage

* Convert all plugin kinds to flattened form

* Switch back to interface{} for now

* Switch to fs.Sub in plugin DeclParser

* Mostly undesirable codegen changes, to be fixed

* Update mod and sum

* Update pfs tests to flattened lineages

* Update thema to latest, regen docs
2023-05-24 10:47:25 +02:00
Ashley Harrison
2ceed6a169
Preferences: Can reset timezone preference back to default correctly (#68881)
* user essentials mob! 🔱

lastFile:public/app/core/components/SharedPreferences/SharedPreferences.tsx

* invert menuShouldPortal logic on TimeZonePicker and fix unit test

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>

---------

Co-authored-by: eledobleefe <laura.fernandez@grafana.com>
Co-authored-by: Joao Silva <joao.silva@grafana.com>
Co-authored-by: L-M-K-B <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
2023-05-24 09:28:14 +01:00
Will Browne
286b9e08e9
Plugins: Bump Plugin SDK version and address instance management breaking changes (#68900)
* bump sdk and propagate ctx

* fix tests
2023-05-24 10:19:34 +02:00