85 Commits

Author SHA1 Message Date
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
abb885c585 I18n: Move eslint rule to package (#105860) 2025-05-29 16:11:59 +02:00
c7cd06d5f5 i18n: exports TFunction from @grafana/i18n package (#105921) 2025-05-23 10:34:35 +02: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
9ed3c9ee8a Internationalisation: Final mark up of strings (#104165)
* some more markup

* more markup

* more markup

* almost there...

* more markup

* more markup

* last markup!

* fix unit tests
2025-04-22 11:02:01 +01:00
190f5a234f Cloud migrations: Update links to docs in cloud stack page (#103789)
* modify links

* new tab links

* remove line
2025-04-10 20:08:00 +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
b58b6e828e CloudMigrations: Enable high-level resource type selection (#103011)
* CloudMigrations: Enable snapshot resource type configuration

* ConfigureSnapshot: Update resource type order

* ConfigureSnapshot: Add compile-time check for all resource types

* Fix trickier merge conflicts

* E2E: Fix intercept calls to get snapshot results to match new query params for sorting

* ConfigureSnapshot: Break text into newline

* ConfigureSnapshot: Add spacing on resources list

* Chore: Run betterer

* ConfigureSnapshot: Make secondary text bold

* ConfigureSnapshot: Update copy which resources to migrate

* ConfigureSnapshot: Add tooltip near build snapshot button with ETA
2025-04-10 14:14:13 +02:00
3fad6183aa CloudMigrations: Create resource dependency map to validate snapshot request (#102594)
* CloudMigrations: Create resource dependency map to validate snapshot request

* CloudMigrations: Validate resource types dependencies in create snapshot request

* CloudMigrations: Update service interface to pass parsed resource types for creation

* CloudMigrations: Conditionally append resource to snapshot if enabled

* CloudMigrations: Add /cloudmigration/resources/dependencies endpoint

* CloudMigrations: Properly filter dashboards and folders from snapshot
2025-04-08 17:46:25 +02:00
0fd7dfeb2a CloudMigrations: Implement table sorting in the UI (#103061)
* implement sorting

* swagger gen

* minor fixes

* clean up param reading

* add todo

* add errors only prop

* codegen stuff

* fix copy paste error

* forgot the api gen

* implement sorting on the frontend

* remove unused enums

* cleanup

* remove tests that are obe

* fix merge

* change page length based on checked box

* cleanup

* fix test

* i18n-extract

* var name tweaks

* use switch and conditional rendering instead of checkbox

* i18n-extract

* use initial sort

* fix type

* fix layout

* fix bugs

* make betterer happy

* fix var names
2025-04-08 08:14:17 -04:00
ba653c22c3 CloudMigrations: Update footer copy to reflect a wider range of resources can be migrated (#103544) 2025-04-08 10:49:13 +02:00
7165bc553a CloudMigrations: Add Cypress happy path test case scenarios (#103250) 2025-04-03 10:34:32 +02:00
58a475cb03 CloudMigrations: Refactor and unify resource naming/icon resolution (#103258)
This is more in preparation for the snapshot configuration option,
to avoid having to duplicate the functions that would:
- Find an icon based on resource type
- Find a label based on resource type

Since we use those for other components, I figured we could just
make a helper function to reuse them.
2025-04-02 13:05:02 +02:00
88e51d549c CloudMigrations: Add sorting and error filtering to Snapshot Results backend (#102753)
* implement sorting

* swagger gen

* minor fixes

* clean up param reading

* add todo

* add errors only prop

* codegen stuff

* fix copy paste error

* forgot the api gen

* cleanup

* remove tests that are obe

* fix test
2025-03-30 10:42:45 -04:00
dc5badd9b2 Internationalisation: More automatic markup (#102792)
* more automatic i18n markup

* better labels

* little bit of tidy up

* fix unit tests
2025-03-27 10:12:25 +00:00
20f9902ed5 CloudMigrations: Remove public preview banner (#102354) 2025-03-18 16:21:16 +01:00
c9f563e576 Grafana UI: Use package.json exports for internal code (#101815)
* feat(grafana-ui): introduce development exports to prevent importing from grafana/ui/src

* refactor(theme-generation): move theme templates into scripts so themes continue to build

* refactor(frontend): replace  grafana/ui paths that use nested src with /internal or /unstable

* chore(betterer): update better results file

* feat(grafana-ui): support enterprise, remove Text component from internal

* docs(packages): update readme with exporting code conventions
2025-03-12 14:14:32 +01:00
c1b48cc488 Dashboards: Add apiVersion to dashboard table (#100845) 2025-03-04 07:47:45 +03:00
fde475e3d9 CloudMigrations: save snapshot of alert rule groups (#100109) 2025-02-06 12:35:59 +01:00
665974e751 CloudMigrations: Update link to cloud migration assistant page (#99915)
* change link

* consolidate banners

* remove banner on plugins
2025-02-05 12:01:04 +00:00
f728b2df12 API client generation: Dedupe scripts and centralise them (#99970)
dedupe scripts and centralise them
2025-02-03 15:26:23 +00:00
f51eacef9a RTK APIs: Extract base query logic (#99800)
* RTK APIs: Extract base query function

* Add error handling

* Add return type

* Use createBaseQuery in browseDashboards

* Support custom manageError

* Export getConfigError

* Remove redundant type

* data -> body
2025-01-31 14:25:16 +02:00
d198fa1dd0 Chore: add lint rule prevent t import from i18next (#99761)
* also handle i18next import

* fix violations
2025-01-29 15:46:13 +00:00
b4802e7116 CloudMigrations: Update Banner on Cloud Stack (#99741)
* add message with flag

* message only in cloud
2025-01-29 14:11:01 +00:00
1699dfa307 CloudMigrations: Add support for migration of plugin resources (#95612)
* start plugins migration

* more plugin work

* add warning

* fakepluginsettings test

* tests get plugins

* lint

* load logos

* go lint

* get all plugins once

* locales

* josh suggestion to inject query in rtk

* more plugin filters

* remove datasource warning

* access control for plugins

* remove unused method

* lint

* use gcom list
2025-01-06 10:37:15 +00:00
59f71566df Update dependency @rtk-query/codegen-openapi to v2 (#98135)
* Update dependency @rtk-query/codegen-openapi to v2

* update cloud migration generated endpoints

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-12-18 18:16:21 +02:00
a33f16d568 Frontend: Set moduleResolution to bundler in TSconfig (#96450)
* build(typescript): switch module resolution to bundler for exports imports goodness

* chore: bump react-calendar and temp patch prometheus-io package

* Wip

* feat(decoupled-plugin): fix types errors in tests by including testing-library/jest-dom

* chore(betterer): pass custom tsconfig so betterer continues to run
2024-12-03 07:22:49 +01:00
69f185b459 CloudMigrations: handle provisioned data source error (#95473) 2024-10-28 12:02:46 +01:00
b2de69d741 CloudMigrations: create snapshot for Alert Rules (#95404)
* CloudMigrations: create snapshot for Alert Rules

* CloudMigrations: display Alert Rules in resource list summary
2024-10-25 17:20:05 +02:00
152b83b3fb CloudMigrations: handle more error codes from GMS backend (#95257)
* CloudMigrations: remove unnecessary if feature toggle gating

* CloudMigrations: handle new error codes from backend
2024-10-24 15:55:02 +02:00
98e5048370 CloudMigration - Display different error messages for create migration errors (#94683)
* start on tokens

* more error messages

* more handling

* rephrased with suggestions from Daniel

* separate gms parse method

* use translation

* refactor initial idea to use error obj

* use error dto result

* handle gms client

* clean logs and comments

* fix tests

* tests for gms

* test and lint

* lint

* one more handling from gms

* typing in fe

* use error interface

* use validation error

* remove unused gms error

* use errorlib and helper function in fe

* regen api

* use same error util

* one more error to handle
2024-10-21 09:45:54 +01:00
a50507e645 CloudMigration: Interpret error code from migration resource item (#94407)
* start on loading the error code

* error code to message mapping

* use resource code type

* use defined error code

* partial updates from comments

* i18nKey gen

* fixed t

* fixed translations

* typing
2024-10-17 14:09:09 +01:00
1051561154 CloudMigrations: create snapshot for Notification Policies (#94852)
* CloudMigrations: create snapshot for Notification Policy

* CloudMigrations: add notification policy constants and components

* CloudMigrations: add uid to resources that have it
2024-10-17 14:58:05 +02:00
47115c714a CloudMigrations: create snapshot for Contact Points (#94719)
* CloudMigrations: create snapshot for Contact Points

* CloudMigrations: add contact point copies and components in frontend

* CloudMigrations: temporarily use bell for all alerts resources
2024-10-15 16:27:28 +02:00
016dea1143 CloudMigrations: create snapshot for Notification Templates (#94676)
* CloudMigrations: create snapshot for Notification Templates

* CloudMigrations: add notification templates resource to frontend
2024-10-15 12:55:33 +02:00
081ec57443 CloudMigrations: create snapshot for Mute Timings (#94668)
* CloudMigrations: Create snapshot for Mute Timings

* CloudMigrations: add mute timings icon and copies to frontend
2024-10-15 09:44:41 +02:00
1830820363 CloudMigrations: add basic resource component and update migration message with many resource types (#94423)
* CloudMigrations: display generic success message with more than 4 resource types

* CloudMigrations: create generic named resource component
2024-10-14 08:08:33 +02:00
9af095d730 CloudMigrations: Add data types for alerts resources (#94251) 2024-10-07 12:52:31 +02:00
d88be2819d CloudMigrations: Store parent folder name in cloud_migration_resource table (#94009)
* use name in fe

* store parent folder name in local db

* clean up

* tiny test

* trial react

* rename to parent name

* go lint

* generate api and ts

* go tests

* rearrange

* clean

* update with suggestions from josh

* make library elements work

* updates from comments

* global migration types

* parent name for alter table
2024-10-07 11:35:08 +01:00
1635a3cd67 CloudMigrations: Add support for migration of Library Elements (Panels) resources (#93898)
* CloudMigrations: create snapshots of Library Elements

* CloudMigrations: render library element resource in resources table

* CloudMigrations: create newtype with necessary fields for library element creation
2024-10-03 11:54:54 +02:00
821bb235b3 CloudMigrations: document and re-generate api for syncing (#94063)
* CloudMigrations: document frontend open-api generator steps

* CloudMigrations: re-run api generation
2024-10-01 14:09:42 +02:00
1a31abe254 CloudMigrations: Limit frontend query to get latest snapshots (#93639)
* latest param to endpoint and adapt frontend query

* change to sort param

* api

* remove description
2024-10-01 09:28:25 +01:00
14abf2dab3 CloudMigrations: add Library Element as a valid migration resource type (#93781) 2024-09-26 15:29:28 +02:00
54d52d0bf9 E2C: Add rudderstack reporting for cloud-side token generation (#93334) 2024-09-25 10:23:31 +01:00
b132d921b7 CloudMigrations: point cloud instance to sef-serve guide (#92471) 2024-08-27 13:25:51 +01:00
83d8fde5be E2C: Post success toast when migration finishes (#91640) 2024-08-08 11:18:37 +01:00
1bca86c8d5 E2C: use TextLink component for consistency (#91642)
use TextLink component for consistency
2024-08-08 09:10:20 +01:00
6cd0971dc6 CloudMigration: Show warning message for successfully migrated non-core data sources (#91545)
* minor performance improvement

* apply a warning to any non-core plugins that successfully migrate

* commit frontend wip while I refactor some stuff

* update api

* repurpose error dialog to be a generic details dialog

* whitespace

* add unit test

* fixes from testing

* fix migration summary

* add comment

* fix localization stuff

* fix backend test

* reduce number of queries to the db

* some PR feedback

* whitespace
2024-08-06 19:35:10 +03:00
14c2e4631a CloudMigrations: Update preview banner text (#91561)
* add link to docs page

* add link to docs

* a word
2024-08-06 19:16:43 +03:00
c070b39dae E2C: Add a 'supported types' disclosure to the bottom of the resources table (#91475) 2024-08-02 14:17:14 +01:00