58411 Commits

Author SHA1 Message Date
9bc4fbe900 alerting: batch user service calls (#103403)
* update alerting endpoints to batch requests to the user service via ListByIdOrUID
2025-04-07 07:33:15 -04:00
a05b35a13c Alerting: Fix wrong interpolation in translation (#103514)
fix wrong interpolation in transalation
2025-04-07 13:41:04 +03:00
cf5da1d366 Alerting: Fix swagger in pkg/services/ngalert/api/tooling (#103500) 2025-04-07 12:38:07 +02:00
641031cfaf Chore: Type fixes (#103340)
* tidy tidy

* more fixes

* some TableNG fixes

* another TableNG test fix

* some more fixes

* betterer...
2025-04-07 11:29:30 +01:00
68c6e88b00 Support creating temporary Spanner databases for integration tests. (#103347)
* Support creating temporary Spanner databases for integration tests.
2025-04-07 12:15:16 +02:00
23fa739a13 Alerting: Link annotations label and inputs together (#103473) 2025-04-07 11:01:05 +01:00
494ca597aa Update babel monorepo (#103455)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-07 10:58:47 +01:00
3de09fe457 i18n: exposes languages in grafana/data (#102958)
* i18n: exposes languages in grafana/data

* Chore: updates after PR feedback
2025-04-07 11:53:04 +02:00
c63cfc11e2 [Chore] Mark CodeQL warning as safe (#101365)
* Mark CodeQL warning as safe

* Temporarily ignore file
2025-04-07 11:52:09 +02:00
1824694c72 Provisioning: Show branch in save form (#103513) 2025-04-07 12:48:32 +03:00
505c0cbbaf Alerting: upgrade alerting (#103333) 2025-04-07 11:39:38 +02:00
1faa855ff1 Provisioning: Improve sample provisioning (#103508) 2025-04-07 12:37:18 +03:00
4db8d8530d Explore: Fix displaying Query Inspector (#103512) 2025-04-07 11:12:23 +02:00
271868b4f1 Explore: Fix button sizes used in AppChrome toolbar (#103496) 2025-04-07 11:03:21 +02:00
8655862c8b Include rule for correct use of grafana.com (#103505)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2025-04-07 09:55:18 +01:00
bb2dfa1997 Remove doc-validator workflow (#103504)
The tool is unmaintained. Most useful rules have been ported to Vale.

The remaining rules often exhibit false positives.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2025-04-07 09:54:58 +01:00
0fc4f53fab Internationalisation: More markup for translations (#103392)
* some more translations

* more markup

* more translations

* fix tests
2025-04-07 09:48:03 +01:00
3c3e5754b3 Dashboard: Enable JSON editor for Schema v2 (#102466)
Co-authored-by: Haris Rozajac <haris.rozajac12@gmail.com>
2025-04-07 10:46:43 +02:00
7ae86ee017 I18n: Download translations from Crowdin (#103485)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-07 09:32:37 +01:00
38db7fad22 Build: Unpin bleve/v2 (#103506)
The commit we wanted[1] is now in v2.5.0 of bleve/v2. This means we no longer need a pin here and can update the library
instead.

[1]: af9e3111da
2025-04-07 10:21:33 +02:00
8dbaeac9da Provisioning: Use repository view rather than raw config (#103449) 2025-04-07 09:39:31 +03:00
8cd6f837a5 Dashboards: Prevent saving to a non-existent folder (#103503) 2025-04-07 09:02:20 +03:00
ed9b649ed6 Update sharing markers to use the new format (#103470)
The new behavior is discussed in https://github.com/grafana/website/pull/25064.
The behavior lets writers include block elements like lists and continue the list in the including source.

I've removed the `panels` `ref` URI to fix the link in learning journeys.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2025-04-07 04:48:26 +01:00
b2f80d4dca Dashboards: Add Dashboard API Validation tests and fix underlying issues (#103502) 2025-04-07 05:44:28 +03:00
427715b070 Dashboards: Add k8s fallback client (#103404) 2025-04-06 16:38:06 -04:00
b329b78ef6 Provisioning: Improve flakey test (#103498)
improve flakey test
2025-04-06 17:51:54 +02:00
8eea0c9a3d Explore: Use fixed dates to prevent DST issues in tests (#103497)
* Explore: Use fixed dates to prevent DST issues in tests

* PanelQueryRunner: Use fixed dates to prevent DST issues in tests
2025-04-06 17:04:28 +02:00
bdbe94abc8 Alerting: Remove alertingConversionAPI feature flag (#103380) 2025-04-05 09:27:02 +01:00
ac7ad27867 Alertmanager: Add Role-Based Access Control via reqAction Field (#101543)
* Add reqAction for alert manager routes
* Add endpoints from Prometheus Alertmanager API
* use notifications reader for alertmanager/api/v2/status
* use viewer for GET api/v1/alerts
* add POST DELETE for api/v1/alerts
* duplicate paths to cover upstream Alertmanager
* add fallback rule to catch all GET
* Update reqAction for GET api/v1/alerts
* require Admin for all wildcard paths

---------

Signed-off-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2025-04-04 21:59:45 +03:00
8fadade4b8 Chore: Split PrometheusMetricsBrowser into small functional components (#101703)
* convert it to functional component

* useReducer

* usePromQueryFieldEffects

* clean up the code

* remove localStorage provider

* introduce usePromQueryFieldEffects.test.ts

* simpler state management

* remove mocks

* linting + betterer

* Split PrometheusMetricsBrowser into small functional components

* prettier
2025-04-04 18:58:46 +02:00
23e0f63790 Chore: Convert prometheus query field to a functional component (#101515)
* convert it to functional component

* useReducer

* usePromQueryFieldEffects

* clean up the code

* remove localStorage provider

* introduce usePromQueryFieldEffects.test.ts

* simpler state management

* remove mocks

* linting + betterer

* remove unnecessary check

* use range

* remove unused languageProvider

* prettier
2025-04-04 17:56:31 +02:00
a93e618102 Internationalisation: Auto mark-up Alerting's strings (#103354)
* Internationalisation: Auto mark-up Alerting code strings

* Update .betterer.results

* Revert prometheus duration docs change

* Fix duplicated import

* Remove unneeded translation
2025-04-04 15:56:10 +01:00
892ea3ad30 Chore: Bump @babel to latest 7.x.x releases (#103456)
chore(yarn): bump @babel to latest 7.x.x releases, dedupe lock file
2025-04-04 15:43:45 +01:00
31f1ff92a6 Dashboard: Remove global add button (#103457)
* Dashboard: Remove global add button

* Push
2025-04-04 16:33:25 +02:00
d16dbc5ac9 ColorPicker: Fixed height when switching tabs (#103304)
* ColorPicker: fixed height when switching tabs

Fixed the component's height by setting a consistent height and adding margin.
Also added a test to ensure the component heights remain nearly identical when switching tabs.

Fix #99675

* ColorPickerPopover: Fixed height for popover content and allowed overflow. #99675

* ColorPickerPopover : Fix formatting suggested by linter.

* ColorPickerPopover: Remove redundant height test when switching tabs

* ColorPickerPopover: Remove overflowY style from popover container

* ColorPicker: Remove unnecessary marginTop from SpectrumPalette styles
2025-04-04 17:19:08 +03:00
b1490a10e8 SQL Expressions / Alerting: Do not allow duplicates (#103394) 2025-04-04 10:00:30 -04:00
3766deed34 Alerting: Import UI - Add folder creation & add to new list view (#103417)
* Update styling of import warning

* Update logic for picking recording rule target datasource, and default to chosen DS

* Add CreateNewFolder component

* Reuse folder creation logic inside alert rule form

* Update betterer and tweak jsdoc

* Add translation to folder selector and tidy up imports

* Allow specifying data source UID in query param

* Add import button to new list view on appropriate data sources

* Fix CI failures

* Update translation keys
2025-04-04 14:44:59 +01:00
9d82186885 Alerting: Improve displaying small numbers in query preview (#103439)
* Improve rendering of small numbers in the query preview

* Use getSeriesValue in Expression component
2025-04-04 15:30:24 +02:00
06c83f7d4d New Logs Panel: Add LogListControl component (#102359)
* LogListNavigation: create component

* LogListNavigation: make it optional

* Refactor Navigation into Controls

* Explore Logs: hide old panel options

* LogListControls: add more controls and apply new styles

* LogListControls: update width

* Remove console log

* LogList: wrap component in context

* LogListContext: make it stateful

* LogListControls: connect with context

* LogListContext: sync displayed fields

* LogListContext: add syntax highlighting control

* LogLine: improve color with highlighting off

* LogListControls: improve button styles

* LogListControls: add sort order option

* LogListControls: add dedup strategy

* LogListContext: sync prop changes with state

* LogList: add option change callback

* LogListContext: sync external changes only when showControls is disabled

* LogListContext: unify sync effect

* LogListControls: improve buttons active css

* LogListContext: add optional storage support

* LogList: make syntaxHighlighting and read from store or default to true

* LogsPanel: add support for new options

* Generated file

* Update tests

* New Logs Panel: add showControls option

* LogList: make eventBus optional

* LogsPanel: expose syntaxHighlighting

* LogsPanel: expose grammar to plugins

* Remove incorrect legacy file

* LogListControls: allow options change with controls enabled in panel editor

* LogLine: apply no-highlighting class to ansi wrapper

* LogListControls: add frontend level filtering

* LogList: filter by filterLevels

* LogListControls: allow filterLevels in dashboards

* LogLine: update unit tests

* LogLineMenu: update unit test

* LogListControls: add unit test

* Revert

* LogList: add unit test

* LogList: add onLogRowHover support

* LogList: test hover events

* LogsPanel: add unit test

* LogLine: use theme color for errors

* LogLine: minor tweak to hover state

* Chore: fix test case name

* LogListControls: add border

* LogListControls: prevent default on wrap toggle click

* LogLine: switch info and debug colors

* ContentOutline + LogControls: sync displayed levels and minor outline improvements

* LogListContext: sync with external filterLevel changes

* Logs: work with arrays of LogLevel and not plain strings

* Fix type

* LogListControl: increase controls size
2025-04-04 14:53:12 +02:00
364247e26b Provisioning: add most mocks to unit test provisioning jobs (#103446)
* Use interface for factories

* Add most mocks to unit test jobs

* Generate more mocks for main jobs package

* Interface for parser

* Use clients directly without parser

* Regenerate mock

* Eliminate resource clients from Parser

* Interface for folder tree
2025-04-04 15:42:20 +03:00
5465abd5a1 Update scenes to v6.6.3 (#103447)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-04 15:35:07 +03:00
ea0f1eb30a Chore: Bump swaggers prismjs version (#103448)
chore(yarn): add resolution to force swagger-ui-react prismjs version ^1.27.0
2025-04-04 14:33:29 +02:00
e2bc620466 PanelEdit: Adapt panel data error view CTAs to scenes (#102881)
adapt CTAs for scenes
2025-04-04 15:12:52 +03:00
1db267a6cd Update React Aria (#103440)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-04 13:11:26 +01:00
1a988df143 Prometheus: Support new info function in code editor (#97850)
* first attempt to have info function

* unit test for query modeller

* enable info function in devenv

* fix unit test

* add unit test for info function

* throw error when trying to visualize the info function

* remove visual query support

* Update packages/grafana-prometheus/src/promql.ts

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

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

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

* update info function detail

---------

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2025-04-04 13:50:54 +02:00
2c0255a72e Nx: fixes caching issues (#103443) 2025-04-04 14:36:18 +03:00
ef2705f189 Chore: Update undici to latest 6.x.x (#103445)
chore: update undici to latest 6.x.x release
2025-04-04 13:03:01 +02:00
ea02e2e081 Provisioning: refactor dry-run and run logic to be stricter and more concise (#103357)
* Separate DryRun into separate method

* Fix linting

* Remove errors

* Remove checks in dualwriter

* Fix unit tests

* Add TODOs

* Dry Run as non-critical error

* Add TODOs

* Address TODO

* Fix tests

* Fix linting

* Deprecate dashboard name from path completely

* Use MissingName error also in parser

* Return 206 for non-critical errors

* Remove TODOs for previous dry-run
2025-04-04 13:31:48 +03:00
02c8669ee8 Provisioning: Fix the referenced path and generate name (#103424) 2025-04-04 13:31:28 +03:00
254286ecaa Lefthook: ensure we're adding the results file in betterer precommit (#103398)
* test to check it's committing

* undo test change

* only commit if betterer precommit succeeds
2025-04-04 11:29:28 +01:00