Commit Graph

50553 Commits

Author SHA1 Message Date
Eric Leijonmarck
ddabef9895
RBAC: Add actionsets struct and write path (#86108)
* Add actionsets struct and failing test

* update from review

* review comments

* review comments update

* refactor: create interface

* actionset service

* fix tests

* move from wireoss to wire

* Apply suggestions from code review

remove unnecessary comments

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

* nil for the actionsetservice

* Revert "nil for the actionsetservice"

This reverts commit e3d3cc8171.

---------

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-04-19 15:38:14 +01:00
Laura Fernández
a057e8be06
Chore: AppNotificationList- Replace VerticalGroup with Stack (#86612) 2024-04-19 16:21:45 +02:00
renovate[bot]
e7fd2cb0fb Update dependency sass-loader to v14.2.1 2024-04-19 14:04:45 +00:00
Laura Fernández
913d7da3af
Grafana UI: Text.story.tsx - Replace VerticalGroup with Stack (#86584) 2024-04-19 16:01:24 +02:00
renovate[bot]
53f5663714 Update dependency msw to v2.2.14 2024-04-19 13:46:18 +00:00
Santiago
529f55cfe8
Alerting: Remove isDefault field from receivers (Alertmanager configuration) (#86605)
Alerting: Remove isDefault field from receivers in the Alertmanager configuration
2024-04-19 15:44:20 +02:00
Brendan O'Handley
2d733a4d77
Prometheus: Do not throw error for label_join function (#86465) 2024-04-19 08:32:26 -05:00
Tobias Skarhed
95ad100cb9
RolePicker: Identity Access team as codeowners (#86602) 2024-04-19 15:21:49 +02:00
Santiago
309a7e7684
Alerting: Implement SaveAndApplyDefaultConfig in the remote Alertmanager struct (#85005)
* Alerting: Implement SaveAndApplyDefaultConfig in the remote Alertmanager struct

* send the hash of the encrypted configuration

* tests, default config hash in AM struct

* add missing default config to test

* restore build directory

* go work file...

* fix broken test

* remove unnecessary conversion to []byte

* go work again...

* make things work again with latest main branch changes

* update error messages in tests for decrypting config
2024-04-19 15:11:07 +02:00
Bruno
1f3a85824f
ephemeral instances: add workflow run id env var (#86528) 2024-04-19 09:49:03 -03:00
Ashley Harrison
4a9e478a6b
EmptyState: Apply completed empty state in Notifications page (#86504)
* add 'completed' variant

* apply completed empty state to notifications page
2024-04-19 13:46:03 +01:00
ismail simsek
ec1af89a02
Chore: Bump promlib to v0.0.5 (#86596)
bump promlib to v0.0.5
2024-04-19 14:33:44 +02:00
renovate[bot]
bcc52a91c7 Update dependency marked to v12.0.2 2024-04-19 12:31:26 +00:00
renovate[bot]
c2f3bf677d Update dependency @types/react to v18.2.79 2024-04-19 11:39:32 +00:00
renovate[bot]
bc97d11220 Update dependency @types/eslint to v8.56.10 2024-04-19 11:19:10 +00:00
Santiago
a2ce8fefed
Alerting: Use a struct when sending a Grafana AM configuration to the remote Alertmanager (#86451)
* Alerting: Use a struct when sending a Grafana AM configuration to the remote Alertmanager

* remove '-distroless' from mimir image name
2024-04-19 13:04:18 +02:00
Ivan Ortega Alba
65afe90124
IntervalVariableEditor: Do not add current value as interval prop (#86446) 2024-04-19 13:04:01 +02:00
Joao Silva
aa326423ed
ColorPicker: Improvements to story organization (#86539) 2024-04-19 11:58:20 +01:00
Laura Fernández
9878dfb7d9
Grafana UI: EmotionPerfTest - Replace VerticalGroup with Stack (#86588) 2024-04-19 12:55:04 +02:00
Laura Fernández
7404a631f6
GrafanaUI: PageToolbar.story.tsx - Replace VerticalGroup with Stack (#86581) 2024-04-19 12:54:20 +02:00
Ashley Harrison
63427ccd98
CommandPalette: Fix keyboard shortcut alignment (#86540)
* use full typography properties

* use Text component
2024-04-19 11:52:27 +01:00
Ashley Harrison
21588ce7e2
EmptyState: Set a max width on the empty state component (#86569)
set a max width on the empty state component
2024-04-19 12:52:16 +02:00
Steve Simpson
5f7612834e
Alerting: Refactoring in api_prometheus.go to allow code reuse. (#86575)
Preparing these functions to be used by some other part of the codebase,
which does not have a `contextmodel.ReqContext`, only the normal request
structure (`url.Values`, etc). This is slightly messy because of how
Grafana allows url parameters to be in the URL or in the request body,
so we need to make sure to invoke the form parsing logic in `ReqContext`.
2024-04-19 12:52:01 +02:00
Alex Khomenko
44e1bce55a
Feature toggles: Remove dashboardEmbed toggle (#86587) 2024-04-19 12:48:08 +02:00
Laura Fernández
c5ca90747d
Grafana UI: TagsInput.story.tsx - Delete unnecessary VerticalGroup (#86582) 2024-04-19 12:34:49 +02:00
renovate[bot]
1ea7dc9250 Update dependency @grafana/plugin-e2e to v1.1.1 2024-04-19 10:23:52 +00:00
Victor Marin
60e6dd56bf
Change folder breadcrumb on folder change in general settings (#86342)
* Change folder breadcrumb on folder change in general settings

* tests and refactor

* refactor to fix broken tests

* fix test
2024-04-19 13:21:40 +03:00
ismail simsek
f9a8e34b32
Prometheus: Update lezer-promql package (#85942)
* Update @lezer/lr to v1.4.0

* Update @prometheus-io/lezer-promql to v0.37.0

* Update @prometheus-io/lezer-promql to v0.38.0

* Update @prometheus-io/lezer-promql to v0.39.0

* Update @prometheus-io/lezer-promql to v0.40.0

* add jest config

* update code

* fix code to pass "handles things" test

* fix retrieving labels

* fix code to pass "handles label values" test

* fix code to pass "simple binary comparison" test

* use BoolModifier

* add changed lines as comments

* fix for ambiguous query parsing tests

* resolve rebase conflict

* fix retrieving labels, aggregation with/out labels

* add error

* fix comment

* fix "reports error on parenthesis" unit test

* fix for "handles binary operation with vector matchers" test

* fix for "handles multiple binary scalar operations" test

* fix for "parses query without metric" test

* fix indentation and import style

* remove commented lines

* add todo items and comments

* remove dependency update from tempo datasource

* apply same changes in core prometheus frontend

* prettier

* add new test case

* use old version of lezer in the root package.json

* Revert "apply same changes in core prometheus frontend"

This reverts commit 83fd6ac7

* fix indentation

* use latest version of lezer-promql v0.51.2

* Update packages/grafana-prometheus/src/querybuilder/parsing.ts

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>

* enable native histogram test

---------

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
2024-04-19 11:54:56 +02:00
Steve Simpson
73873f5a8a
Alerting: Optimize rule status gathering APIs when a limit is applied. (#86568)
* Alerting: Optimize rule status gathering APIs when a limit is applied.

The frontend very commonly calls the `/rules` API with `limit_alerts=16`. When
there are a very large number of alert instances present, this API is quite
slow to respond, and profiling suggests that a big part of the problem is
sorting the alerts by importance, in order to select the first 16.

This changes the application of the limit to use a more efficient heap-based
top-k algorithm. This maintains a slice of only the highest ranked items whilst
iterating the full set of alert instances, which substantially reduces the
number of comparisons needed. This is particularly effective, as the
`AlertsByImportance` comparison is quite complex.

I've included a benchmark to compare the new TopK function to the existing
Sort/limit strategy. It shows that for small limits, the new approach is
much faster, especially at high numbers of alerts, e.g.

100K alerts / limit 16: 1.91s vs 0.02s (-99%)

For situations where there is no effective limit, sorting is marginally faster,
therefore in the API implementation, if there is either a) no limit or b) no
effective limit, then we just sort the alerts as before. There is also a space
overhead using a heap which would matter for large limits.

* Remove commented test cases

* Make linter happy
2024-04-19 11:51:22 +02:00
Ryan McKinley
5a8384a245
QueryService: Add feature toggles to better support testing (#86493) 2024-04-19 12:26:21 +03:00
Will Browne
8a5c0cfdc0
Plugins: Pass cancellable context during API server creation (#86545) 2024-04-19 09:22:14 +03:00
Sofia Papagiannaki
aa825f5dee
Chore: Fix Swagger/OpenAPI instructions (#86541)
Update README.md
2024-04-19 09:16:38 +03:00
Matthew Jacobson
a20197229e
Alerting: Prevent simplified routing zero duration GroupInterval and RepeatInterval (#86561)
Prevent zero duration GroupInterval and RepeatInterval
2024-04-18 21:08:38 -04:00
Matthew Jacobson
71445002b7
Alerting: Fix simplified routing group by override (#86552)
* Alerting: Fix simplified routing custom group by override

Custom group by overrides for simplified routing were missing required fields
GroupBy and GroupByAll normally set during upstream Route validation.

This fix ensures those missing fields are applied to the generated routes.

* Inline GroupBy and GroupByAll initialization instead of normalize after
2024-04-18 21:08:14 -04:00
ismail simsek
842c8dd206
InfluxDB: Fix interpolating field keys in influxql (#86401)
* interpolate field keys

* use scopedVars
2024-04-18 19:14:29 -04:00
brendamuir
b311612cf2
Alerting docs: RBAC for enterprise and cloud (#86506)
* Alerting docs: RBAC for enterprise and cloud

* rbac structure

* ran prettier

* updates to data source permissions

* adds tables for roles

* ran prettier

* adds examples for custom role

* ran prettier

* updates table

* typo fix

* ran prettier
2024-04-18 20:32:04 +02:00
timo
f3fcfad2c8
NodeGraph: Fix invisible arrow tips in Editor (#86517)
NodeGraphPanel: Namespace marker IDs to fix invisible arrow tips in editor

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2024-04-18 18:39:16 +02:00
linoman
1d1ebee36b
RolePicker: Adjust dynamic position (#86424)
* Adjust dynamic position
2024-04-18 17:53:34 +02:00
Sofia Papagiannaki
3ab361abfc
Chore: Update swagger (#86523)
* Chore: Update swagger
2024-04-18 15:35:38 +00:00
Laura Fernández
bfb79d20ff
Grafana UI: Menu.story.tsx - Replace VerticalGroup with Stack (#86529) 2024-04-18 17:35:36 +02:00
Josh Hunt
fe24404432
I18n: Support for Enterprise translations (#86215)
* I18n: Support for Enterprise translations

* don't attempt to link to enterprise in tests

* move extract script to makefile to optionally support enterprise

* update references to old extract script

* update docs

* thank god for unit tests
2024-04-18 16:25:27 +01:00
antonio
272b2e139a
email contact point -url fix (#86538)
url fix
2024-04-18 17:24:22 +02:00
Alexa V
7a147f2ce8
Dashboard: DashboardPageProxy - Use chaining operators to prevent runtime error (#86507)
* Use chaining operators to prevent runtime error

* Fix tests

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
2024-04-18 17:15:18 +02:00
Laura Fernández
e65669bc0d
Grafana UI: Checkbox.story.tsx - Replace VerticalGroupwith Stack (#86524) 2024-04-18 17:05:19 +02:00
Señor Performo - Leandro Melendez
0d11f9b2f4
Docs: Add GeoMaps YouTube Video (#86472)
* Update index.md on GeoMaps adding YouTube Video

Added the GeoMap YouTube video to the documentation

* Update docs/sources/panels-visualizations/visualizations/geomap/index.md

Totally agree, I tend to use those words and not realize :P

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

---------

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-04-18 10:57:08 -04:00
Laura Fernández
18bd11ca6a
Grafana UI: TextLink.story.tsx - Replace VerticalGroup with Stack (#86526) 2024-04-18 16:37:48 +02:00
ismail simsek
28a683cf28
InfluxDB: Remove influxdbSqlSupport feature toggle (#86518)
Remove influxdbSqlSupport feature toggle
2024-04-18 16:29:27 +02:00
Matias Chomicki
99f34cb1ed
Common labels/displayed fields: Show label names with values (#86345)
* LogLabels: create specialized component for arrays of labels

* Logs: sort displayed fields when assigning to state

* LogsMetaRow: fix types and use specialized components

* LogLabels: show label and value

* LogsPanel: update common labels

* LogsMetaRow: use LogsLabelsList

* Update unit tests

* Formatting

* Update betterer

* Prettier

* Logs panel: update test

* LogLabels: add actual tooltip

* Logs: remove sorting of displayed fields
2024-04-18 16:25:58 +02:00
Laura Fernández
bbf4281d8d
Grafana UI: Dropdown.story.tsx - Replace VerticalGroup with Stack (#86521) 2024-04-18 16:13:08 +02:00
Konrad Lalik
344cea1725
Alerting: Fix external Alertmanager settings payload (#86413)
* Remove helper properties from the AM config object

* Make the omitTemporaryIdentifiers a pure function

* Add formValuesToCloudReceiver test

* Remove immer produce to prevent object freezing
2024-04-18 15:55:13 +02:00