58384 Commits

Author SHA1 Message Date
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
5e02532073 Provisioning: Update onboarding page (#103436)
* Change feature name

* Update feature list

* Update connect button

* Update enhanced features

* Cleanup
2025-04-04 13:08:58 +03:00
49ecd83b87 Dashboard: Ungroup action to remove row or tab (#103370)
* Dashboard: Ungroup action to remove row or tab

* Update
2025-04-04 12:07:58 +02:00
5aa358c481 Dashboard: Variable controls via simple react component (#103442)
* Dashboard: Variable controls refactor

* Update tests

* Fix name

* fix lint
2025-04-04 11:49:04 +02:00
48877f9187 Alerting: Fix plugin not found error during condition validation (#102437)
improve error
2025-04-04 10:37:55 +01:00
f96e4e9ad2 Frontend: Remove Angular (#99760)
* chore(angularsupport): delete feature toggle to disable angular

* feat(angular-support): remove config.angularSupportEnabled

* chore(jest): remove angular from setup file

* chore(angular): delete angular deprecation ui components

* refactor(angular): move migration featureflags into migration notice

* chore(dashboard): remove angular deprecation notices

* chore(annotations): remove angular editor loader

* feat(appwrapper): no more angular app loading

* feat(pluginscatalog): clean up angular plugin warnings and logic

* chore(angular): delete angular app and associated files

* feat(plugins): delete old angular graph plugin

* feat(plugins): delete old angular table panel

* feat(frontend): remove unused appEvent type

* feat(dashboards): clean up angular from panel options and menu

* feat(plugins): remove graph and table-old from built in plugins and delete sdk

* feat(frontend): remove angular related imports in routes and explore graph

* feat(theme): remove angular panel styles from global styles

* chore(i18n): run make i18n-extract

* test(api_plugins_test): refresh snapshot due to deleting old graph and table plugins

* chore(angulardeprecation): delete angular migration notice components and usage

* test(frontend): clean up tests that assert rendering angular deprecation notices

* chore(backend): remove autoMigrateOldPanels feature flag

* chore(config): remove angularSupportEnabled from config preventing loading angular plugins

* chore(graphpanel): remove autoMigrateGraphPanel from feature toggles

* chore(tablepanel): delete autoMigrateTablePanel feature flag

* chore(piechart): delete autoMigratePiechartPanel feature flag

* chore(worldmappanel): remove autoMigrateWorldmapPanel feature toggle

* chore(statpanel): remove autoMigrateStatPanel feature flag

* feat(dashboards): remove automigrate feature flags and always auto migrate angular panels

* test(pluginsintegration): fix failing loader test

* test(frontend): wip: fix failures and skip erroring migration tests

* chore(codeowners): remove deleted angular related files and directories

* test(graphite): remove angular mock from test file

* test(dashboards): skip failing exporter test, remove angularSupportEnabled flags

* test(dashbaord): skip another failing panel menu test

* Tests: fixes pkg/services/pluginsintegration/loader/loader_test.go (#100505)

* Tests: fixes pkg/services/pluginsintegration/plugins_integration_test.go

* Trigger Build

* chore(dashboards): remove angularComponent from getPanelMenu, update test

* feat(dashboards): remove all usage of AngularComponent and getAngularLoader

* chore(betterer): refresh results file

* feat(plugins): remove PluginAngularBadge component and usage

* feat(datasource_srv): remove usage of getLegacyAngularInjector

* feat(queryeditor): delete AngularQueryComponentScope type

* Chore: removes Angular from plugin_loader

* Chore: remove angular from getPlugin

* Chore: fix i18n

* Trigger Build

* Chore: remove more Angular from importPanelPlugin

* Chore: remove search options warning

* Chore: remove and deprecate Angular related

* chore(angular): remove angular dependencies from core and runtime

* chore(runtime): delete angular injector

* chore(data): delete angular scope from event bus

* chore(plugin-catalog): remove code pushing app plugins angular config page

* chore(yarn): refresh lock file

* chore(frontend): remove ng-loader from webpack configs, remove systemjs cjs plugin

* chore(navigation): remove tether-drop cleanup from GrafanaRouter, delete dependency

* chore(runtime): delete AngularLoader

* chore(betterer): refresh results file

* chore(betterer): fix out of sync results file

* feat(query): fix type and import errors in QueryEditorRow

* test(dashboards): delete skipped angular related tests

* Tests: add back tests and fix betterer

* Tests: fix broken test

* Trigger build

* chore(i18n): remove angular deprecation related strings

* test: clean up connections and plugins catalog tests

* chore(betterer): update results file

---------

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-04-04 11:31:35 +02:00
b1198b92c6 authinfoimpl: Fix TestIntegrationAuthInfoStore when running on Spanner. (#103383)
Fix TestIntegrationAuthInfoStore when running on Spanner.
2025-04-04 11:20:48 +02:00
a0bce1e12f Team: Fix createTeam API handler (#103441)
fix createTeam API handler
2025-04-04 12:02:33 +03:00
357a296112 Themes: Gloom update (#103434)
* Themes: Gloom update

* Update

* Fix borders
2025-04-04 10:40:13 +02:00
b2e19d8797 Update dependency swagger-ui-react to v5.20.5 (#102306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-04 09:39:42 +01:00
1c631c17d4 Rename existing tests in pkg/services/serviceaccounts/database package to make them an integration tests. (#103373)
Rename existing tests in pkg/services/serviceaccounts/database package to make then an integration tests.
2025-04-04 11:12:02 +03:00
10411361e7 Team: Add columns external_uid and is_provisioned to the team table (#103285)
* add columns external_id and is_provisioned to the team table

* generate openapi specs

* rename column to external_uid

* generate open api specs

* increase limit for external_uid to 256
2025-04-04 11:00:14 +03:00
f19e4f95d5 I18n: Download translations from Crowdin (#103428)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-03 21:21:27 -04:00
248db9a644 NoData: Fix panel error when Color scheme is set to "Classic palette (by series name)" (#103402)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2025-04-04 02:41:59 +03:00
683660fa42 TableNG: Fix column hiding override (#103327)
* TableNG: Fix column hiding override

* Mark field custom config as optional

---------

Co-authored-by: drew08t <drew08@gmail.com>
2025-04-03 14:54:09 -07:00
04fb9f534e Dashboards: Only expose LibraryPanels and search on v0 (not v1+v2) (#103335) 2025-04-03 20:24:12 +03:00
224139e9d0 Plugins: Revert accidental change to plugins code from Alerting PR (#103400)
Revert accidental change to plugins code
2025-04-03 17:22:13 +00:00
31ecb5d0b5 Docs: candlestick visualization refactor (#103310)
* Added config options heading and bumped other heading levels

* Reordered headings and added missing ones

* Nested candlestick options under heading

* Added graph styles and axis content

* Added candlestick options to table

* Refactored and edited candlestick options section

* Replaced shared file with manual tooltip section

* Added missing intro sentences to candlestick options section

* Added a graph styles shared file

* Replaced body text with graph styles shared file in candlestick and time series files

* Added content from time series file to shared axis options file

* replaced shared file in candlestick file with axis content

* Updated option descriptions in axis options shared file

* Updated axis options section of candlestick

* Fixed typos

* Ran prettier

* Replaced some screenshots with higher res, up to date versions

* Wording edits

* Added contributor notes and a missing command

* Fixed typo

* Fixed typo

* Ran prettier

* Removed note from axis options all file

* Renamed axis options file

* Renamed shared file adn updated link in time series page

* Added axix options file and renamed another one, updated links in other files

* Ran prettier
2025-04-03 12:30:14 -04:00
c5d76a8bba Provisioning: Require a name in the saved resource (#103309) 2025-04-03 18:58:05 +03:00
c7754d7065 Scripts/Build: Remove unused CI folders (#103374)
* Scripts/Build: Remove ci-deploy

* Scripts/Build: Remove ci-e2e

* Scripts/Build: Remove ci-windows-test

* Scripts/Build: Remove ci-wix

* Scripts/Build: Remove ci-msi-build

* Dependabot: Remove unused folders from docker updates

* Chore: Run make update-workspace
2025-04-03 17:44:20 +02:00
5c3769bc2d Fix subpixel rendering of NavToolbarSeparator (#103377) 2025-04-03 16:44:08 +01:00
7603a92296 CI: Add betterer check to lint step (#103361)
* add betterer check to lint step

* fix regressions

* add translation
2025-04-03 18:31:36 +03:00
5a2eedbae1 CI: Fix bug in post-release workflow (#103368)
version should be prefixed with a v
2025-04-03 10:21:40 -05:00
e9849d0b7c Dashboards: SchemaV2 fix stateless queries incorrectly applied (#103316)
Fix getDataQueryKind to properly detect datasource type from multiple sources

- Add unit tests for the improved function
- Fix typo in schema editor drawer subtitle
2025-04-03 09:19:40 -06:00
72edbbba05 Correlations: Handle undefined field in logfmt (#103372) 2025-04-03 17:40:43 +03:00
edefc80c2a Provisioning: Split active and finished jobs (#103351) 2025-04-03 17:38:12 +03:00
d6ec8ab8b1 TableNG [Bug Bash]: Cell inspect and filter on the field level (#103004)
* fix: cell inspect + filter at the field level, not defaults

* chore: defensive against missing custom config

* chore: reconfigure tests

* hide inspect block if nothing to show

---------

Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
2025-04-03 16:28:19 +02:00
413378dd3a Retry aborted transactions on Spanner. (#103289)
* Retry aborted transactions on Spanner.
2025-04-03 16:26:09 +02:00