24826 Commits

Author SHA1 Message Date
64e005d12f Teams: Restrict provisioned teams from being updated and deleted (#103454)
* restrict provisioned teams from being updated and deleted

* check if team is provisioned before update and delete

* add function getTeamDTOByID()

* check if team is provisioned in access control

* fix TestDeleteTeamMembersAPIEndpoint

* add unit tests

* add function for validating a team
2025-04-08 11:27:30 +03:00
a84e96fba2 I18n: Download translations from Crowdin (#103566)
New Crowdin translations by GitHub Action

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-08 03:32:33 +03:00
c2af05c328 Alerting: Add missing_series_evals_to_resolve option to alert rule form (#102808)
* Add missing_series_evals_to_resolve option to alert rule form

* Fix tests and undefined behaviour

* Update translations

* Update translations

* Update falsy logic

* Remove null type

* Update tests

* Update details tab

* Add default value

* Remove null

* Update description text, add placeholder, remove default
2025-04-07 19:49:45 +01:00
369dc28ca2 Logs Table: Add new Controls component to Explore (#103467)
* Add logs options to Table

---------

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2025-04-07 10:35:45 -05:00
71c66acb2d Alerting: Add keep_firing_for and Recovering state (#103248)
* add keep_firing_for and Recovering state

* prettier

* translations

* remove unused component/file

* fix tests

* fix test

* prettier

* fix tests

* revert changes in go.work.sum

* remove recovering from cloud rules filters

* prettier

* fix padding

* fix wrong move in import

* update text

* fix filtering states in alert list panel

* update translations

* betterer

* address feedback

* translations

* fix tests

* prettier and betterer

* update betterer.results

* update translations

* update snapshot

* add divider in the alert rule form

* address feedback

* Improve translations

* Update .betterer.results

---------

Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2025-04-07 17:13:04 +02:00
b9bc069fb9 AppChrome/MegaMenu: Fixes issue with default state being initialised to undocked (#103507)
* AppChrome/MegaMenu: Fixes default mega menu docked state

* AppChrome/MegaMenu: Fixes default mega menu docked state

* Update thresholds

* Update

* pa11y fix

* remove unnessary css

* fixed pa11y config

* try fix pa11y config + unit tests

* just increase thresholds again...

---------

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2025-04-07 16:00:05 +01:00
63af403897 Live: Remove queryOverLive and live-service-web-worker experimental feature flags (#103518) 2025-04-07 17:47:35 +03:00
e2a6f9a849 Logs: Add new Controls component to Explore (#103401)
* ControlledLogRows: create component

* Fix imports

* ControlledLogRows: handle scroll events

* Rename storage key prop

* LogListControls: externally control syntax highlighting

* ControlledLogRows: add support for level filtering

* Logs: implement deduplication from controls

* Fix imports

* Create feature flag

* Use feature flag

* LogListControls: add download button

* LogsMetaRow: extract download function to logs utils

* Filter and download logs

* Update tests with new props

* LogList: pass logs and logs meta to context

* Remove prefix from downloaded file

* Update unit tests

* LogListControl: update unit tests

* Fix type assertion

* Fix imports

* Formatting

* i18n

* Fix test

* LogListControls: adjust scroll to top styles

* LogListContext: control legacy options

* LogListControls: add showUniqueLabels and prettifyJSON options

* LogListControls: test new controls

* Extract translations

* Hide old controls by feature flag

* LogListControls: update prettify json copy

* ControlledLogRows: disable preview

* Prettier

* LogListControls: Fix test
2025-04-07 16:38:55 +02:00
46bf9e6551 Dashboard: Group layout and Grid layout categories and simplified radio toggle design (#103433)
* Group layout and more

* Change word

* Update

* changed names and added new translation keys

* Update

* Update

* revert color change

* update
2025-04-07 14:30:09 +02:00
fc099e9f0d Provisioning: Run validation on config updates (#103265)
* Run validation on config updates

* Refactor code

* Add debug lines

* Remove test check on admission

* Organize imports

* Delegate events to the API client

* Extend error notification

* Deep copy default data

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Clarity-89 <homes89@ukr.net>
2025-04-07 14:48:28 +03:00
a05b35a13c Alerting: Fix wrong interpolation in translation (#103514)
fix wrong interpolation in transalation
2025-04-07 13:41:04 +03: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
23fa739a13 Alerting: Link annotations label and inputs together (#103473) 2025-04-07 11:01:05 +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
1824694c72 Provisioning: Show branch in save form (#103513) 2025-04-07 12:48:32 +03:00
1faa855ff1 Provisioning: Improve sample provisioning (#103508) 2025-04-07 12:37:18 +03:00
271868b4f1 Explore: Fix button sizes used in AppChrome toolbar (#103496) 2025-04-07 11:03:21 +02: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
8dbaeac9da Provisioning: Use repository view rather than raw config (#103449) 2025-04-07 09:39:31 +03: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
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
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
31f1ff92a6 Dashboard: Remove global add button (#103457)
* Dashboard: Remove global add button

* Push
2025-04-04 16:33:25 +02: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
e2bc620466 PanelEdit: Adapt panel data error view CTAs to scenes (#102881)
adapt CTAs for scenes
2025-04-04 15:12:52 +03:00
02c8669ee8 Provisioning: Fix the referenced path and generate name (#103424) 2025-04-04 13:31:28 +03: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
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
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
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
c5d76a8bba Provisioning: Require a name in the saved resource (#103309) 2025-04-03 18:58:05 +03: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
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
f5beba1036 PanelEdit: Options pane design tweaks (#103331)
* PanelEdit: Options pane design tweaks

* Added translations

* Fixed

* Update
2025-04-03 16:21:26 +02:00
83dc1250bb Extensions: Fix a bug with the observable APIs (#103367)
tests(getPluginExtensions): add more tests for the observable apis
2025-04-03 17:13:32 +03:00
370f4c2bcd Dynamic dashboards: Use addNewRow and addNewTab when duplicating rows and tabs (#103362)
Use addNewRow and addNewTab when duplicating rows and tabs
2025-04-03 16:28:45 +03:00
ae700e7632 Schema V2: Handle v2 custom home dashboard (#103332)
* Schema V2: Handle v2 custom home dashboard

* Clean interface

* Fix old arch
2025-04-03 15:24:19 +02:00
9b91dc7855 Alerting: Migration UI (#102010)
* add feature toggle alertingMigrationUI

* wip

* wip

* wip2

* add button to export in alert list and add target folder in the form

* update namings

* protext migration route with alertingMigrationUI feature toggle

* remove unused error style

* add namspace and group filter

* fix translations and prettier

* fix duplication

* use the new endpoint

* update right roles for the FE route

* refactor

* notify success

* address feedback

* fix translations

* Simplify migration UI for alert rules to GMA format

Extracts migration button component and reuses it in banner for better
code organization and consistency.

* Fix root folder check in import alert rules UI

Replace hardcoded empty string check with lodash isEmpty for folder UID
validation

* Add collapsible section for import rule options

* address feedback

* Split useAlertRuleSuggestions, one for labels, and other for namespaces

* refactor splited hooks

* Alerting: (PR review) Redesign slightly + use combobox (#102614)

Redesign slightly + use combobox

* udpate naming

* remove eslint-disable-next-line @grafana/no-untranslated-strings and add hasDataSourcesConfigured as a condition to render the banner

* use button instead of banner

* fix routes

* use new api

* update api

* remove query params

* update translations

* update ff files

* skip subpath when redirecting to the alert list view with filters

* prettier

* disable provenance

* prettier

* Don't send target forlder uid in the payload as undefined if it's not selected

* prettier

* add confirmation modal with a preview

* remove unnecessary export

* Add target datasource UID for recording rules

* Use skipToken

* Add recording rule datasource and update designs

* Use different hook to fetch rulerRules

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2025-04-03 14:04:11 +01:00
72a76721e1 ButtonGroup: Fixes button group for solid buttons (#103255)
* ButtonGroup: Fixes button group for solid buttons

* Update

* Fix
2025-04-03 14:47:15 +02:00
80df736e27 Dynamic Dashboards: UI fixes (#103352) 2025-04-03 15:14:42 +03:00