751 Commits

Author SHA1 Message Date
0c76b52e8b Share Button: Added ClipboardItem route after Safari issues (#107925)
* Share Button: Added ClipboardItem route after Safari issues

* Removed console log

* Feedback fixes

* Test feedback fix

* Removed export
2025-07-10 12:59:41 -04:00
20c700dd52 Chore: reduces barrel files part II (#107688)
* Chore: reduce barrel files

* chore: fixes unit test

* Chore: reduces barrel files part II

* chore: fix import sorting
2025-07-09 06:15:33 +02:00
bfd33467fb Tests: removes jest duplicate manual mock warning (#107459)
* Tests: removes jest duplicate manual mock warning

* Trigger build

* Trigger build
2025-07-02 09:25:25 +02:00
b30f501bff backendsrv: Implement optional URL path fetch sanitize (#106540)
* feat: Implement optional URL path sanitization in BackendSrv methods

* add comment

* revert

* remove namespace import from backendsrv

* change method to validatePath, remove query params and fragments

* Moved validatePath call into fetch and make it throw an error instead

* update pluginSettings tests

* prettier

* Update public/app/features/plugins/pluginSettings.ts

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* change name to validatePath

* fix other tests

* rename property in backend_srv tests

* rename to validatePath in backend_srv, add extra tests

* Move path validation into parseUrlFromOptions

* fix

* Add additional check

* Add test

---------

Co-authored-by: joshhunt <josh.hunt@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2025-06-20 11:27:53 +01:00
13406336ce Alerting: Update error message for failed FetchError (#106846) 2025-06-18 15:51:25 +02:00
2b8c74de2e i18n: removes useTranslate hook (#106556)
* i18n: removes useTranslate hook

* chore: fix duplicate imports

* chore: fix import sorting and hook dependencies
2025-06-12 11:03:52 +02:00
7e0ec00905 Auth: Remove apikeys related components from frontend (#106061)
* remove apikeys related pages from frontend

* remove translations

* remove navBar titles

* revert translations for non-english files
2025-06-05 15:17:19 +03:00
ea0e49a6e6 Chore: Restrict imports of test files to avoid test pollution (#106057) 2025-05-28 10:37:15 +02:00
2ce1c67d92 Home: update setup guide link/title to Getting Started Guide (#105692)
* Home: update setup guide link/title to Getting Started Guide

* Home: check plugin presence to show getting started guide

* Home: remove now unused homeSetupGuide feature toggle

* Home: use sentence case for Getting started guide item
2025-05-22 14:06:50 +03:00
b727bd1c8d Chore: Move ml app to root (#105677)
* move ml app to root

* update translation

* translate subtitle as well

* fix casing
2025-05-20 16:24:21 +01:00
119d5897ea i18n: imports use @grafana/i18n (#105177)
* i18n: everything should target @grafana/i18n

* wip

* chore: updates after PR feedback

* Trigger build

* Trigger build

* Trigger build

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: revert all flaky tests

* chore: some incorrect usages of useTranslate
2025-05-15 09:17:14 +02:00
82f0a58490 Dashboard: Improve diffing by handling the Infinity value (#105037)
* convert infinity values to 0

* convert infinity in V1 transformer

* update test
2025-05-12 08:06:02 -06:00
656d730eb2 I18n: Remove 'now' translations (#104414) 2025-04-23 17:25:16 +01:00
6fde69c333 CloudMigrations: Make improvements to the text content (#103770)
* change copy configuration

* comma and this token after token creation

* securely migrate and you'll need token

* add caret and modify steps

* period after check failed resources

* learn about migrating v1

* building snapshot reduce text

* right caret connect to a cloud stack

* building snapshot reduce text v2

* make i18n-extract after merge
2025-04-10 13:50:37 +01: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
f9471ac10b Alerting: Recover deleted alert rules (#101869)
* add column guid to alert rule table and rule_guid to rule version table

+ populate the new field with UUID

* update storage and domain models

* patch GUID

* ignore GUID in fingerprint tests

* get alert rule versions by GUID

* update rule delete to reset uid in history instead of deleting rows

* add test

* Update delete rule to require UserUID, remove all versions and create "delete" version

that holds information about who and when deleted the rule

* update usages of the delete method

* add list deleted rules to store

* list api to support deleted query parameter

* add list deleted rules to store

^ Conflicts:
^	pkg/services/ngalert/store/alert_rule_test.go

* list api to support deleted query parameter

* Restore deleted rules

* fix recovering manually recording rules

* update role control for the trash route

* add alertingRuleRecoverDeleted feature toggle enabled by default

* fix access control for trash menu item in the navtree

* Add alertingRuleRecoverDeleted feature toggle,
add Delete permanently alert rule menu option

* hide remove permanently functionality in the UI until we have the api available for it

* discard wrong changes after merging

* Reverted changes in pkg/apis/dashboard_manifest.go after fixing conflicts

* Reverted changes in go.work.sum after fixing conflicts

* Reverted changes in pkg/apis/dashboard_manifest.go after fixing conflicts

* Reverted changes in pkg/services/ngalert/models/alert_rule.go after fixing conflicts

* Reverted changes in pkg/apis/dashboard_manifest.go after fixing conflicts

* restore delete permanently and add the queryparam for it

* update snapshots

* fix translations

* protect trash route by the feature toggles

* use the new rulerRuleType for checks

* revert ability to delete permanently and alert rule from the ui

* remove unnecessary update after reverting

* fix ff

* add tracking

* use recently deleted instead of trash

* create isRecoverDeletedRulesEnabled for checking ffs

* address pr feedback 1

* include alert rule uid in getRowId

* use RulerGrafanaRulesConfigDTO for deleted rules response

* use isLoading in the AlertingPageWrapper

* fix wrong check for recording rules type

* add test for restoring manually through the alert rule form

* add test for restoring deleted rule

* use importAlertingComponent

* udpate mock

* address pr feedback

* update translations

* address feedback

* address feedback 2

* address feedback 3

* address feedback 4

* move transformation of the response to the endpoint

* fix typo

* refactor grafanaRuleDtoToFormValues

* update translations

* use guid for identifying rows

* prettier

* use ONLY the guid for identifying rows

* Add provides/invalidates tags for deleted rules

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
2025-03-27 16:39:26 +02:00
1ca9910736 Grafana Data: Use package.json exports for internal code (#102696)
* refactor(frontend): rename all @grafana/data/src imports to @grafana/data

* feat(grafana-data): introduce internal entrypoint for sharing code only with grafana

* feat(grafana-data): add test entrypoint for data test utils usage in core

* refactor(frontend): update import paths to use grafana/data exports entrypoints

* docs(grafana-data): update comment in internal/index.ts

* refactor(frontend): prefer public namespaced exports over re-exporting via internal

* chore(frontend): fix a couple more weird paths that typescript complains about
2025-03-25 10:48:36 +01:00
5cd8547131 Revert "Grafana Data: Use package.json exports for internal code (#102286)
Revert "Grafana Data: Use package.json exports for internal code (#102036)"

This reverts commit 91116de790c6c59248abd262721c40f169be6661.
2025-03-17 12:26:59 +00:00
91116de790 Grafana Data: Use package.json exports for internal code (#102036)
* refactor(frontend): rename all @grafana/data/src imports to @grafana/data

* feat(grafana-data): introduce internal entrypoint for sharing code only with grafana

* feat(grafana-data): add test entrypoint for data test utils usage in core

* refactor(frontend): update import paths to use grafana/data exports entrypoints

* docs(grafana-data): update comment in internal/index.ts

* refactor(frontend): prefer public namespaced exports over re-exporting via internal
2025-03-17 11:27:17 +01:00
59280d5242 Time regions: Add option for cron syntax to support complex schedules (#99548)
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
2025-02-20 14:50:32 -06:00
e54149e551 Explore: Move drilldown apps from Explore to a new navbar item "Drilldown" (#100409)
* Move drilldown apps from Explore to a new navbar item "Drilldown"

* Commit make i18n-extract

* Update drilldown icon

* Added alert to explore with call out to drilldown apps

* Add isNew field for nav item which shows a "New!" badge on the navbar and expands it by default

* Fix e2e test
2025-02-20 17:56:55 +00:00
9ad6653871 Dashboard Schema V2: Improve diffing (#100022)
* improve diffing

* define dash spec props a-z

* Fix

* sort deep initialSaveModel

* update tests

* Fix test, description, and query ds issues

* Fix seralizer test

* response transformers

* skip panelMerge tests
2025-02-13 07:20:17 -07:00
9fbb0b6636 Panel edit: Remove use of SheetJS (#100161)
Remove SheetJS
2025-02-07 08:21:14 -06:00
cd7c9f8666 Share: Fix short links when root_url is different from the browser URL (#99950)
Share: Fix short links when appUrl is misconfigured
2025-02-04 14:00:55 +01:00
ae62b3817b Dashboards: Change the way dashboard not found error is handled (#98950)
* Get rid of _dashboardLoadFailed

* Get rid of dashboardNotFound meta

* Update public dashboards tests

* Fix DashboardPage tests

* DashboardPageProxy tests

* DashboardScenePageStateManager test fix

* Beterer

* Fix merge

* Nits

* Fix test

* remove debugger

* Update get folder to throw

* translate error title

* Update public/app/features/apiserver/types.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>

* Update public/app/features/dashboard/services/DashboardLoaderSrv.ts

Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>

* Betterer

* Update test cases

* More test updates

* More translations

---------

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
2025-01-27 15:54:10 +01:00
0d302a161a BackendSrv: Support streaming chunked responses (#98691) 2025-01-15 10:01:22 +03:00
79d8201b49 Dashboards API: v0 k8s dashboards saving (#98695)
* Dashboards API: v0 k8s dashboards saving

* Build dashboard url with a slug

* fix test

* fix test

---------

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-01-08 23:58:54 +01:00
de9aec8e56 Alerting: change Settings page subtitle (#98368)
* Alerting: change Settings page subtitle

* update pseudo-locale

* fix pseudo-locale translation using `make i18n-extract`
2025-01-07 09:38:24 +01:00
0e4b503352 Alerting: Hide reducer hint for alert creation editor (#98410) 2024-12-31 11:58:01 +01:00
084aad0b84 Chore: Add no-duplicate-case eslint rule and fix violations (#97537)
* Add `no-duplicate-case` rule

* Fix basic duplicated cases

* Fix duplicated translations case

* Fix alerting case
2024-12-11 17:33:31 +00:00
4e10507c84 Chore: Remove global mock of plugin_loader (#97351)
* Remove global mock of `plugin_loader`

Removing this means we can get more accurate datasources behaviour in tests

* Fix circular dependency/undefined method when plugin_loader is unmocked

* Use optional chaining for trusted policies to stop tests failing when `bootData` is partially set

* Add plugin_loader mock back into single test that is still broken

* Revert trusted type policies changes

* Fix tests that break with trusted type policies
2024-12-11 14:50:49 +00:00
60f9ff0a07 Frontend o11y: Load SharedWorkers for crash detection (#96673)
* Load SharedWorkers from blob

* Fix typo

* Update docs

* Add more docs

* Simplify extending CorsSharedWorker

* Revert "Simplify extending CorsSharedWorker"

This reverts commit 1603e5f02f995f325011713e1bc64fb3267f150b.

* Simplify extending CorsSharedWorker

* Remove ts-ignore

* Update betterer and add docs

* Update public/app/core/crash/index.ts

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

* Update public/app/core/utils/CorsSharedWorker.ts

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

* Update public/app/core/crash/index.ts

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

* Update public/app/core/utils/CorsSharedWorker.ts

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

* Simplify getting scriptsBasePathUrl

* Disable linting for SharedWorker type assertion

---------

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2024-12-02 15:12:36 +01:00
5f1fae8efd Logs Panel: Add infinite scrolling support for Dashboards and Apps (#97095)
* LogsPanel: expose infinite scrolling to apps

* Logs panel: implement infinite scrolling callback and type guards

* Logs panel: expose infinite scrolling toggle in panel options

* Logs permalink: extract range function to a module

* Update unit test

* Logs panel: migrate test to dataplane format

* Formatting and docs

* Shortlinks: remove unnecessary mock

* Remove unnecessary params

* Formatting
2024-12-02 14:57:25 +01:00
517c6fdc9b Navigation: add dbo11y app under Infrastructure (#96763)
* add dbo11y app under Infrastructure

* add i18n for Databases nav item

* add Translation extraction results
2024-11-25 15:34:47 +01:00
2bcc46c338 Frontend: Enable TS IsolatedModules (#95586)
* chore(typescript): enable isolatedModules

* chore(frontend): fix ts errors related to isolated modules
2024-10-31 14:00:32 +01:00
315778227b Dashboards: Links to explore should respect subpath (#94525)
* Links to explore should respect subpath

* Change to using assureBaseUrl

* Change back to normal single quotes
2024-10-10 15:54:48 +02:00
8de1047f65 Change from Apps to "More Apps" (#93454)
* Change the label used for additional app links from apps to more apps so it doesn't conflict with applications, which is application observability, not the other bucket

* update to more apps

* more in german is mehr

* fix case, update translations correctly

* revert changes to de

* fix be tests

---------

Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-01 11:31:31 +01:00
c822feff9e Home: add setup guide tab under home tab (#92947)
* feat: add setup guide in home tab

* chore: add feature toggle for setup guide

* chore: add feature toggle for sub menu

* chore: run pretier

* chore: run i18n

* chore: run generated files again

* chore: update description

* chore: update comment to trigger test flow

* chore: trigger test

* chore: fix styling
2024-09-25 18:20:04 +01:00
735332570f feat: GroupSync extension UI (#91777)
* feat: supporting code for groupsync extension UI

* Add result of running i18n extraction

* Place the UI behind a feature toggle as well as the license feature

* Also add access checks to route loading of groupsync route with feature toggle

* Add access check on permissions to show External group sync in nav

* fix: New version of multiOrgRoleOptions hook

* Remove OSS route definition

* Apply feedback on nav title
2024-09-19 14:58:11 -05:00
644a315667 ShareDrawer: Improvements (#93107) 2024-09-09 19:32:45 -03:00
494376c5a9 Alerting: Fix resample expression and relativeTimeRange updates (#91689)
* Use dag to find origin nodes when updating resample queries

Co-authored-by: Gilles De Mey <gilles.demey@grafana.com>

* lint

* fix test and types

* short-circuit function

* Prevent cycles in DAG

* Handle dag cycle error

* Catch the cyclic link error in dashboard variables

---------

Co-authored-by: Gilles De Mey <gilles.demey@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-08-23 15:22:33 +02:00
ec857e1de9 Loki: Add dashboard and panel names as headers (#92096)
* feat(nameHeaders): add feature flag

* add safe parsing of headers

* use headers in loki datasource

* Loki: add option to pass headers to Loki

* Loki: add datasource tests for dashboard names

* cleanup

* DataSourceWithBackend: add test

* rename to `sanitizeHeader`

* Loki: add condition when to add headers

* Loki: add e2e tests

* Loki: change test name
2024-08-22 21:30:43 +02:00
07500e11be ShareExternally: Rename public dashboard section (#91928) 2024-08-14 17:03:19 -03:00
7cc925d319 Query Library: Enable edit description (#90009)
* WIP

* Finish getting form to populate

* WIP API

* Get PUT to work although the edit doesnt apply yet

* Complete working PUT

* PATCH v1 no json patch

* This works!

* Fix headers to be configurable

* Fix translations

* Revert "This works!"

This reverts commit d57ffcbc4bcf4fdaa414739838ce2377ca65a480.

# Conflicts:
#	public/app/features/query-library/api/factory.ts
#	public/app/features/query-library/api/query.ts
#	public/app/features/query-library/types.ts

* Use normal method of patching 😅

* Replace add to library form with generic version

* make translations generic

* Rename function, fix bad conflict resolution
2024-08-14 10:11:53 -05:00
546f4aa700 Navigation: Show list of pinned items on MegaMenu (#90280)
* Navigation: Show list of pinned ites on the navigation

* Rename section to 'Bookmarks'

* Internationalization

* Rename everything to bookmarks

* Update public/app/core/reducers/navBarTree.ts

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Ignore empty message as well

* Dont update navigation if there is an error patching

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2024-07-22 11:43:40 +01:00
3559c5c297 Revert "Frontend: Use safe stringifier in parseBody" (#90522)
Revert "Frontend: Use safe stringifier in parseBody (#90047)"

This reverts commit 434f3869820c7820b41dfd13351017a31409eff3.
2024-07-17 14:00:01 +03:00
d7c844b5b6 Alerting UX: copy changes in Groups view (#90173)
* UI and help copy changes in Alerting Groups view

* Alerting Groups view: change subtitle

* Rename Alerting page title: `Groups` to `Active notifications`

* Update pseudo-local

* update betterer

* Extract translation through `make i18n-extract`
2024-07-11 13:33:41 +02:00
62494248e3 Restore dashboards: Add RBAC (#90270)
* Restore dashboards: Add RBAC

* Add check to navtree

* Prevent non-admins from searching deleted dbs

* Add check to the route

* Cleanup

* Update translations

* Update API permissions

* Correct permissions

* Update warning message

* Update translation

* Return 401 for deleted query without admin role
2024-07-11 13:20:04 +03:00
434f386982 Frontend: Use safe stringifier in parseBody (#90047)
* Frontend: Use safe stringifier in parseBody

Closes #88064
2024-07-09 16:15:59 +01:00
8f2daacf78 Chore: Remove CancelablePromise (#89564)
* Remove CancelablePromise.ts as it wasn't used in anywhere

* Move cancelable-promise to the place where it is used
2024-06-27 13:33:35 +02:00