Commit Graph

50532 Commits

Author SHA1 Message Date
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
Vanilla
817f787947
Cli: Check missing plugin parameter of plugin update command (#86410)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2024-04-18 15:46:04 +02:00
Andres Martinez Gotor
eac02a61e1
Return plugin error when requesting settings (#86052) 2024-04-18 14:29:02 +02:00
Marie Cruz
8373fc3544
docs: update heatmap visualization and add play links (#85926)
* docs: update heatmap visualization

* docs: add state timeline and status history play shortcodes

* Apply suggestions from code review

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

* docs: add heatmap video

---------

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-04-18 08:22:14 -04:00
Mihai Doarna
57848bbe23
Auth: encrypt/decrypt SAML secrets in SSO settings service (#85253)
encrypt/decrypt saml secrets in sso settings service
2024-04-18 15:16:59 +03:00
Lisa
bdd288d058
Add Create annotations in panel video to the documentation (#86383)
* Add Create annotations in panel video to the documentation

* Update docs/sources/dashboards/build-dashboards/annotate-visualizations/index.md

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

---------

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
2024-04-18 08:14:56 -04:00
Tom Ratcliffe
a5c75c5ffb Remove explicit imports of whatwg-fetch from individual test files 2024-04-18 12:23:38 +01:00
Tom Ratcliffe
389250afe0 Add whatwg-fetch polyfill to jest test setup so all tests run it 2024-04-18 12:23:38 +01:00
Andres Martinez Gotor
0f4a47b180
Plugin load errors: Add more well-known errors (#85960) 2024-04-18 13:04:22 +02:00
github-actions[bot]
80e63b5206
I18n: Download translations from Crowdin (#86438)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-04-18 10:34:18 +00:00
Ashley Harrison
07044309f1
EmptyState: Add completed variant (#86497)
* add 'completed' variant

* add central text alignment
2024-04-18 11:22:28 +01:00
Laura Fernández
bc07eedaa9
Grafana UI: Replace VerticalGroup with Stack on alerts documentation in Storybook (#86400) 2024-04-18 12:16:57 +02:00
Laura Fernández
6b21d12ce0
Grafana UI: FilterPopup- Replace VerticalGroup and HorizontalGroup with Stack (#86398) 2024-04-18 12:16:38 +02:00
ismail simsek
635d85db7a
InfluxDB: Fix interpolation for floating point number values (#86396)
return number as it is
2024-04-18 11:21:41 +02:00
Ivana Huckova
f3fd2de9dd
Loki: Remove tracking grafana_loki_query_executed and add grafana_explore_loki_query_executed (#86484)
* Loki: Remove  and add

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

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2024-04-18 10:57:18 +02:00
Torkel Ödegaard
1d513f66b8
DashboardScene: Fixes checkbox orienation in save forms (#86408) 2024-04-18 10:15:06 +02:00
Kristina Durivage
4e0e12bb07 add cleanup 2024-04-18 09:04:53 +01:00
Kristina Durivage
bf897c1255 Add clarifying comments/docs 2024-04-18 09:04:53 +01:00
Tom Ratcliffe
ab605e37df Remove unnecessary server.listen() 2024-04-18 09:04:53 +01:00
Tom Ratcliffe
ef5c4b69f3 Remove unused msw import 2024-04-18 09:04:53 +01:00
Tom Ratcliffe
de4510cc70 Reuse setupMswServer for alerting tests 2024-04-18 09:04:53 +01:00
Tom Ratcliffe
76c6e029a5 Fix incidental console error spy that was unneeded 2024-04-18 09:04:53 +01:00