Commit Graph

40749 Commits

Author SHA1 Message Date
Jo
12d192d80e
AccessControl: Clear user permission cache for update org user role (#62745)
* clear user permission cache for update org user role

* check enabled state of ac
2023-02-03 08:37:41 -05:00
Karl Persson
6840cc11ff
AuthN: add support for client specific hooks (#62863)
* AuthN: Add HookClient interface

* AuthN: Check if client implement authn.HookClient and call the hook if
it does

* AuthN: Convert refresh token hook into a client hook
2023-02-03 14:35:17 +01:00
Karl Persson
180a587f70
AuthN: fetch final state of signed in user (#62854)
* AuthN: add a hook we can use to fetch final state of user
2023-02-03 14:14:38 +01:00
Jack Westbrook
29212c9a3f
Chore: Update generated schema files (#62862)
* chore(schema): update generated files

* empty commit
2023-02-03 07:41:46 -05:00
Kyle Brandt
09b6b8d435
Backend: Use sdk version 0.148.0 (#62822)
https://github.com/grafana/grafana-plugin-sdk-go/releases/tag/v0.148.0
2023-02-03 13:29:17 +01:00
Steve Simpson
36f3071d66
Alerting: Remove dskit replace directive. (#62851)
The replace directive can be removed now that grafana/dskit#258 is merged.
2023-02-03 12:34:54 +01:00
Jack Westbrook
5815a37f47
Debug Panel: Introduce schema types (#62094)
* feat(debugpanel): schematizing debug panel plugin

* delete old types and update imports to new generated schema

* update to experimental

* derived counters, fix options key name

* num to int

* chore(debugpanel): update ts imports post type rename

* chore(kindsys): refresh report.json

* migrate UpdateCounters back to runtime

* merge with main

---------

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: sam boyer <sdboyer@grafana.com>
2023-02-03 11:57:04 +01:00
Eric Leijonmarck
ed18a249b8
Refactor: move displayname logic from backend to frontend (#62845)
* remove fallback from backend

* add: displayname logic to frontend

* Update public/app/core/components/RolePicker/utils.ts

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* add: fetchTeamRoles and return earlier

* refactor: change to const

---------

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2023-02-03 10:39:44 +00:00
Gabriel Goller
8b017f5aa4
Added pageZoomLevel option to image renderer setup documentation (#59472)
* Added pageZoomLevel option to image renderer setup

* Update _index.md

* Update docs/sources/setup-grafana/image-rendering/_index.md

* chore: prettier run in docs

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2023-02-03 10:19:29 +01:00
Levente Balogh
b32c1022c5
Datasources: Add more optional UI tracking (#62785)
* chore: add more optional UI tracking for datasources

* tests: fix the tests by wrapping them in a router
2023-02-03 09:47:42 +01:00
Karl Persson
ad068ed533
AuthN: Use BasicAuth from http request (#62792)
AuthN: use BasicAuth from http request
2023-02-03 09:11:53 +01:00
Levente Balogh
48e0ab2142
Plugins: Case-sensitive routes for standalone pages (#62779)
* feat: extend the RouteDescription witha `sensitive` property

* feat: use case-sensitive routes for custom plugin standalone pages

* fix: hcheck for `/a/` instead of `/a`
2023-02-03 09:01:34 +01:00
Levente Balogh
cf650c9349
Connections: Fix route-guards (#62771)
* fix: use case-sensitive routes for Connections

The reason to do this is to have the backend route-guards work properly.
(The backend route guards are case-sensitive, thus if the FE would serve
the case-insensitive version, then the backend route guards could be bypassed.)

* tests: update the tests
2023-02-03 09:00:30 +01:00
Levente Balogh
de97ac7128
Datasources: Rename a UI tracking event property (#62788)
refactor: rename the the `editLink` property to `path`
2023-02-03 09:00:04 +01:00
Michael Mandrus
7391793504
Query Caching: Add per-panel query caching TTL (#61968)
* *Create Caching Config interface and OSS impl
*Create front-end facing DS Cache config
*Populate Caching Config on Datasource DTO
*Update OSS wire deps

* fix unit test

* handle query caching TTL override on the frontend

* Make sure the override works with pubdash

* move caching config to the right place in the ds info

* move caching config logic to enterprise index hook

* move queryCachingTTL to pubdash query payload

* Remove  from metadata (not needed)

* rename struct and add comment

* remove invalid wire dependency

* manual revert of 395c74b

* fix frontend test

* fix backend test

* fix tests for real this time

* truly fix frontend test

* fix back end unit test for real
2023-02-02 23:39:54 -05:00
Alexander Weaver
9eeea8f5ea
Alerting: Add label query parameters to state history endpoint (#62831)
* Allow equality-only matching of arbitrary labels via query params

* Pre-initialize map
2023-02-02 16:52:08 -06:00
Brendan O'Handley
70c1850888
OpenTSDB: Allow metric autocomplete to use suggest api on every input (#62045)
* allow metric autocomplete by suggest api

* debounce sugggest metrics

* debounce sugggest metrics with debounce-promise

* commit for tests
2023-02-02 17:46:22 -05:00
Jean-Philippe Quéméner
1694a35e0c
Alerting: implement loki query for alert state history (#61992)
* Alerting: implement loki query for alert state history

* extract selector building

* add unit tests for selector creation

* backup

* give selectors their own type

* build dataframe

* add some tests

* small changes after manual testing

* use struct client

* golint

* more golint

* Make RuleUID optional for Loki implementation

* Drop initial assumption that we only have one series

* Pare down to three columns, fix timestamp overflows, improve failure cases in loki responses

* Embed structred log lines in the dataframe as objects rather than json strings

* Include state history label filter

* Remove dead code

---------

Co-authored-by: Alex Weaver <weaver.alex.d@gmail.com>
2023-02-02 16:31:51 -06:00
George Robinson
f49efa6e27
Alerting: Pause dash alerts on migration (#62798)
* Alerting: Pause dash alerts on migration
2023-02-02 16:49:05 -05:00
Kyle Brandt
27d429e3b1
API: Permit Cache-Control (browser caching) for datasource resources (#62033)
* Start work on allowing certain resources to pass through Cache-Control headers.
---------

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2023-02-02 20:34:55 +00:00
Matthew Jacobson
f9ec16e74f
Alerting: Fix template validation in provisioning api (#62530)
* Alerting: Fix template validation in provisioning api

Fix issue where provisioning API accepts a malformed template having extra
text outside of definition block and template name matching definition name.
2023-02-02 15:26:39 -05:00
Agnès Toulet
121e384fab
kindsys: Fix CUE code generation on Windows (#62812)
* fix Windows paths

* fix remaining paths issues

* clean up multiple use of Dir()

* fix headers in generated files
2023-02-02 15:06:55 -05:00
Christopher Moyer
060e0a4d18
Docs: corrects incorrect redirect and fixes link (#62815)
corrects incorrect redirect and fixes link
2023-02-02 13:42:21 -06:00
Gilles De Mey
c3cd4a720f
Alerting: Adds a default value to the last_applied column (#62818) 2023-02-02 19:35:28 +00:00
Alexander Weaver
647f73ddc5
Alerting: Add static label to all state history entries (#62817)
* Add static label to all state history entries

* Separate label and value visually
2023-02-02 13:25:26 -06:00
kay delaney
40ec4ef5b8
PanelChrome: Implement hover header (#61774)
Closes #59078

Co-authored-by: polinaboneva <polina.boneva@grafana.com>
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
2023-02-02 17:53:18 +00:00
Santiago
ba731f7865
Alerting: Mark AM configuration as applied (#61330)
* Mark AM configuration as applied

* add missing checks, make linter happy

* fix deadlock, mark as valid on save and on load

* mark configurations only if needed

* check error after applyConfig()

* code review comments

* code review changes

* more code review changes

* clean HistoricConfigFromAlertConfig function
2023-02-02 14:45:17 -03:00
Alexander Weaver
6ad1cfef38
Alerting: Add endpoint for querying state history (#62166)
* Define endpoint and generate

* Wire up and register endpoint

* Cleanup, define authorization

* Forgot the leading slash

* Wire up query and SignedInUser

* Wire up timerange query params

* Add todo for label queries

* Drop comment

* Update path to rules subtree
2023-02-02 11:34:00 -06:00
Sergey Kostrukov
2f218ab928
Azure: Update Grafana Azure SDK and middleware (#62050)
* Update middleware

* Update Grafana Azure SDK

* Client options to client builder

* Fix tests

* maputil from SDK
2023-02-02 16:58:10 +00:00
Alexander Weaver
9fa28c11c5
Alerting: Usability adjustments to Loki representation of state history values (#62643)
* Extract label merge, add test file

* Extract error/NoData to first class fields, remove a layer from values

* Include dashUID and panelID as line-level fields

* Drop unnecessary object receiver

* Add tests for stream building

* Drop NoData field from log lines
2023-02-02 10:54:10 -06:00
Ashley Harrison
5795553353
Navigation: Fix command palette toggle removal (#62809)
command palette is always here
2023-02-02 16:32:34 +00:00
brendamuir
d19803a0f0
Alerting docs: updates to alert rules docs for 9.4 (#62744)
* Alerting docs: updates to alert rules docs for 9.4

* Adds updates to oncall contact point and pause alerts

* Adds view read-only query update 9.4
2023-02-02 16:31:03 +00:00
idafurjes
23c27cffb3
Chore: Rename Id to ID in alerting models (#62777)
* Chore: Rename Id to ID in alerting models

* Add xorm tags for datasource

* Add xorm tag for uid
2023-02-02 17:22:43 +01:00
Gábor Farkas
48a374f50b
loki: implement schema for loki query (#62114)
* loki: implement schema for loki query

* removed forgotten code

* better types

* adjust cue-maturity-level

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

* sync docs to schema change

* removed forgotten go code

* updated schema docs

Co-authored-by: J Stickler <julie.stickler@grafana.com>

* updated schema docs

Co-authored-by: J Stickler <julie.stickler@grafana.com>

* update schema docs

Co-authored-by: J Stickler <julie.stickler@grafana.com>

* update schema docs

Co-authored-by: J Stickler <julie.stickler@grafana.com>

* updated schema docs

Co-authored-by: J Stickler <julie.stickler@grafana.com>

* updated schema docs

* add documentation to the resolution field

* move direction-field to schema

* loki: cue: moved deprecated fields to the bottom

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
2023-02-02 16:18:30 +00:00
Sonia Aguilar
753c84f825
Alerting: Pass yaml as a query param in export request (#62751)
* Set YAML as default value for exporting alert rules

* use YAML format for rule list export

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>

* lint

* Add new format query param to swagger+docs

* Fix broken test

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Matt Jacobson <matthew.jacobson@grafana.com>
2023-02-02 16:10:02 +00:00
Andrej Ocenas
99a16d27c1
Tempo: Trace to logs update image (#62796) 2023-02-02 16:52:34 +01:00
Andre Pereira
60f2433a0f
Tempo: TraceQL syntax highlighting improvements (#62349)
* Better syntax highlighting for durations, floats and right-hand-side tags

* Remove hex rule in TraceQL syntax highlighting
2023-02-02 15:48:29 +00:00
Ida Štambuk
ec01e6d6b2
Query Panels: Pass on loading state (#62545) 2023-02-02 16:48:13 +01:00
Andre Pereira
b78af0b0f0
Tempo: Inject status and status.code for tags autocomplete (#62794)
* Tempo: Inject status for v2 and status.code for v1 in the tags list for autocomplete

* Small comment fix
2023-02-02 15:43:28 +00:00
Karl Persson
ce5e067d28
ContextHandler: add all configured auth header to context (#62775)
* ContextHandler: Always store list of possible auth headers in context
and remove individual calls
2023-02-02 16:25:46 +01:00
Joan López de la Franca Beltran
19ed9181e1
Kindsys: Extend DocsJenny with support for 'allOf' (#62558)
* Kindsys: Extend DocsJenny with support for 'allOf'

* Update generated docs

* Multiple refinements

* Minor fixes

* Undo undesired changes

* Fix

* Fix linter complains

---------

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2023-02-02 16:12:31 +01:00
Leon Sorokin
4d564f8b0a
Chore: uFuzzy 1.0.2 (#62276)
Co-authored-by: joshhunt <josh@trtr.co>
2023-02-02 09:09:48 -06:00
Andrej Ocenas
1aae808723
Tempo: Update docs for trace to logs functionality (#62338) 2023-02-02 16:06:11 +01:00
Ashley Harrison
5e7e026c0c
Navigation: Remove commandPalette feature toggle (#62698)
* remove command palette feature toggle

* undo irrelevant AppChrome changes

* update toggle description
2023-02-02 14:44:21 +00:00
Andres Martinez Gotor
68862ce3e8
Plugins: Prefer to use the data source UID when querying (#62776) 2023-02-02 15:43:07 +01:00
Karl Persson
1204d607a5
RBAC: Rewrite org users rbac tests (#62469)
* API: refactor legacy org users access control tests
2023-02-02 15:33:25 +01:00
Jev Forsberg
1092c2b383
bug: adjust table footer height calculations (#62734)
* baldm0mma/bug-62410/ remove function incorrectly calculating table height

* baldm0mma/bug-62410/ base extended row on basic footer height, and not header height
2023-02-02 07:32:32 -07:00
Sofia Papagiannaki
4eaff63eda
SQLStore: Fix folder migration for MySQL < 5.7 (#62521)
* Nested folders: Do not skip integration tests

* SQLStore: Fix folder migration

It reduces the length of the title column to be equal with the respective
dashboard column.
2023-02-02 16:21:25 +02:00
Emil Tullstedt
10d66405a4
Chore: Remove redundant codegen step from .bra.tom (#62764) 2023-02-02 14:53:54 +01:00
Steve Simpson
c44e9f6b71
Alerting: Add metrics around notification delivery. (#62778)
This change exposes more metrics from the embedded Alertmanager, which are
valuable for troubleshooting Alertmanager operation particularly in HA setups.

```
grafana_alerting_notifications_total
grafana_alerting_notifications_failed_total
grafana_alerting_notification_requests_total
grafana_alerting_notification_requests_failed_total
grafana_alerting_notification_latency_seconds
grafana_alerting_nflog_gc_duration_seconds
grafana_alerting_nflog_snapshot_duration_seconds
grafana_alerting_nflog_snapshot_size_bytes
grafana_alerting_nflog_queries_total
grafana_alerting_nflog_query_errors_total
grafana_alerting_nflog_query_duration_seconds
grafana_alerting_nflog_gossip_messages_propagated_total
grafana_alerting_dispatcher_aggregation_groups
grafana_alerting_dispatcher_alert_processing_duration_seconds
```

Note that `alertmanager_dispatcher_aggregation_group_limit_reached_total` is
explicitly not exposed, as the group limit metrics are not enabled.
2023-02-02 14:44:20 +01:00