diff --git a/.betterer.results b/.betterer.results
index d050edb043e..05c8396c389 100644
--- a/.betterer.results
+++ b/.betterer.results
@@ -945,9 +945,6 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
[0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"]
],
- "public/app/core/components/NestedFolderPicker/FolderRepo.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"]
- ],
"public/app/core/components/OptionsUI/color.tsx:5381": [
[0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"]
],
@@ -2521,27 +2518,6 @@ exports[`better eslint`] = {
"public/app/features/browse-dashboards/api/browseDashboardsAPI.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`@reduxjs/toolkit/query/react\`)", "0"]
],
- "public/app/features/browse-dashboards/components/NewProvisionedFolderForm.tsx:5381": [
- [0, 0, 0, "Do not use any type assertions.", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "8"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "9"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "10"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "11"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "12"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "13"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "14"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "15"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "16"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "17"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "18"]
- ],
"public/app/features/browse-dashboards/state/index.ts:5381": [
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
@@ -4318,264 +4294,9 @@ exports[`better eslint`] = {
"public/app/features/profile/UserSessions.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"]
],
- "public/app/features/provisioning/Config/ConfigForm.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "8"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "9"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "10"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "11"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "12"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "13"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "14"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "15"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "16"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "17"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "18"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "19"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "20"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "21"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "22"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "23"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "24"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "25"]
- ],
- "public/app/features/provisioning/Config/ConfigFormGithubCollapse.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "8"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "9"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "10"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "11"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "12"]
- ],
- "public/app/features/provisioning/File/FileHistoryPage.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
- ],
"public/app/features/provisioning/File/FileStatusPage.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
- [0, 0, 0, "Do not use any type assertions.", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "8"]
- ],
- "public/app/features/provisioning/File/FilesView.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
- ],
- "public/app/features/provisioning/GettingStarted/EnhancedFeatures.tsx:5381": [
- [0, 0, 0, "Do not use any type assertions.", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"]
- ],
- "public/app/features/provisioning/GettingStarted/FeaturesList.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"]
- ],
- "public/app/features/provisioning/GettingStarted/GettingStarted.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
- ],
- "public/app/features/provisioning/GettingStarted/SetupModal.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
- ],
- "public/app/features/provisioning/HomePage.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"]
- ],
- "public/app/features/provisioning/Job/JobStatus.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"]
- ],
- "public/app/features/provisioning/Job/RecentJobs.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "Unexpected any. Specify a different type.", "6"]
- ],
- "public/app/features/provisioning/Repository/CheckRepository.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"]
- ],
- "public/app/features/provisioning/Repository/DeleteRepositoryButton.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"]
- ],
- "public/app/features/provisioning/Repository/EditRepositoryPage.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"]
- ],
- "public/app/features/provisioning/Repository/RepositoryActions.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"]
- ],
- "public/app/features/provisioning/Repository/RepositoryCard.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
- ],
- "public/app/features/provisioning/Repository/RepositoryHealth.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"]
- ],
- "public/app/features/provisioning/Repository/RepositoryOverview.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "8"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "9"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "10"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "11"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "12"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "13"]
- ],
- "public/app/features/provisioning/Repository/RepositoryResources.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"]
- ],
- "public/app/features/provisioning/Repository/RepositoryStatusPage.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"]
- ],
- "public/app/features/provisioning/Repository/SyncRepository.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"]
- ],
- "public/app/features/provisioning/Shared/ConnectRepositoryButton.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
- ],
- "public/app/features/provisioning/Shared/FolderRepositoryList.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"]
- ],
- "public/app/features/provisioning/Shared/TokenPermissionsInfo.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "8"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "9"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "10"]
- ],
- "public/app/features/provisioning/Wizard/BootstrapStep.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "7"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "8"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "9"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "10"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "11"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "12"]
- ],
- "public/app/features/provisioning/Wizard/ConnectStep.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "8"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "9"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "10"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "11"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "12"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "13"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "14"]
- ],
- "public/app/features/provisioning/Wizard/FinishStep.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "1"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "2"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "3"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "4"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "5"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "6"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "7"],
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "8"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "9"]
- ],
- "public/app/features/provisioning/Wizard/MigrateStep.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"]
- ],
- "public/app/features/provisioning/Wizard/PullStep.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"]
- ],
- "public/app/features/provisioning/Wizard/Stepper.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"]
- ],
- "public/app/features/provisioning/Wizard/WizardContent.tsx:5381": [
- [0, 0, 0, "No untranslated strings in text props. Wrap text with or use t()", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"]
+ [0, 0, 0, "Do not use any type assertions.", "1"]
],
"public/app/features/provisioning/hooks/index.ts:5381": [
[0, 0, 0, "Do not re-export imported variable (\`./useCreateOrUpdateRepositoryFile\`)", "0"],
diff --git a/public/app/core/components/NestedFolderPicker/FolderRepo.tsx b/public/app/core/components/NestedFolderPicker/FolderRepo.tsx
index eecbd23f31f..7eff53a058e 100644
--- a/public/app/core/components/NestedFolderPicker/FolderRepo.tsx
+++ b/public/app/core/components/NestedFolderPicker/FolderRepo.tsx
@@ -1,4 +1,5 @@
import { Badge } from '@grafana/ui';
+import { t } from 'app/core/internationalization';
import { ManagerKind } from 'app/features/apiserver/types';
import { useIsProvisionedInstance } from 'app/features/provisioning/hooks/useIsProvisionedInstance';
import { NestedFolderDTO } from 'app/features/search/service/types';
@@ -19,5 +20,5 @@ export function FolderRepo({ folder }: Props) {
return null;
}
- return ;
+ return ;
}
diff --git a/public/app/features/browse-dashboards/components/NewProvisionedFolderForm.tsx b/public/app/features/browse-dashboards/components/NewProvisionedFolderForm.tsx
index 5414e5ac9c3..76bb9a5a299 100644
--- a/public/app/features/browse-dashboards/components/NewProvisionedFolderForm.tsx
+++ b/public/app/features/browse-dashboards/components/NewProvisionedFolderForm.tsx
@@ -8,9 +8,11 @@ import { getAppEvents } from '@grafana/runtime';
import { Alert, Button, Field, Input, RadioButtonGroup, Spinner, Stack, TextArea } from '@grafana/ui';
import { useGetFolderQuery } from 'app/api/clients/folder';
import { useCreateRepositoryFilesWithPathMutation } from 'app/api/clients/provisioning';
+import { t, Trans } from 'app/core/internationalization';
import { AnnoKeyManagerIdentity, AnnoKeySourcePath, Resource } from 'app/features/apiserver/types';
import { getDefaultWorkflow, getWorkflowOptions } from 'app/features/dashboard-scene/saving/provisioned/defaults';
import { validationSrv } from 'app/features/manage-dashboards/services/ValidationSrv';
+import { BranchValidationError } from 'app/features/provisioning/Shared/BranchValidationError';
import { PROVISIONING_URL } from 'app/features/provisioning/constants';
import { usePullRequestParam, useRepositoryList } from 'app/features/provisioning/hooks';
import { WorkflowOption } from 'app/features/provisioning/types';
@@ -48,7 +50,12 @@ export function NewProvisionedFolderForm({ onSubmit, onCancel, parentFolder }: P
const folderQuery = useGetFolderQuery(parentFolder ? { name: parentFolder.uid } : skipToken);
const repositoryName = folderQuery.data?.metadata?.annotations?.[AnnoKeyManagerIdentity];
if (!items && !isLoading) {
- return ;
+ return (
+
+ );
}
const repository = repositoryName ? items?.find((item) => item?.metadata?.name === repositoryName) : items?.[0];
@@ -77,9 +84,16 @@ export function NewProvisionedFolderForm({ onSubmit, onCancel, parentFolder }: P
appEvents.publish({
type: AppEvents.alertSuccess.name,
- payload: ['Folder created successfully'],
+ payload: [
+ t(
+ 'browse-dashboards.new-provisioned-folder-form.alert-folder-created-successfully',
+ 'Folder created successfully'
+ ),
+ ],
});
+ // TODO: Update when the upsert type is fixed
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const folder = request.data.resource?.upsert as Resource;
if (folder?.metadata?.name) {
navigate(`/dashboards/f/${folder?.metadata?.name}/`);
@@ -94,7 +108,10 @@ export function NewProvisionedFolderForm({ onSubmit, onCancel, parentFolder }: P
} else if (request.isError) {
appEvents.publish({
type: AppEvents.alertError.name,
- payload: ['Error creating folder', request.error],
+ payload: [
+ t('browse-dashboards.new-provisioned-folder-form.alert-error-creating-folder', 'Error creating folder'),
+ request.error,
+ ],
});
}
}, [
@@ -121,7 +138,7 @@ export function NewProvisionedFolderForm({ onSubmit, onCancel, parentFolder }: P
if (e instanceof Error) {
return e.message;
}
- return 'Invalid folder name';
+ return t('browse-dashboards.new-provisioned-folder-form.error-invalid-folder-name', 'Invalid folder name');
}
};
@@ -163,26 +180,43 @@ export function NewProvisionedFolderForm({ onSubmit, onCancel, parentFolder }: P
It cannot start with '/' or end with '/', '.', or whitespace.
-
It cannot contain '//' or '..'.
-
It cannot contain invalid characters: '~', '^', ':', '?', '*', '[', '\\', or ']'.
-
It must have at least one valid character.
-
- >
- );
-};
diff --git a/public/app/features/dashboard-scene/saving/provisioned/SaveProvisionedDashboardForm.tsx b/public/app/features/dashboard-scene/saving/provisioned/SaveProvisionedDashboardForm.tsx
index afac776a754..ff2dfff60ab 100644
--- a/public/app/features/dashboard-scene/saving/provisioned/SaveProvisionedDashboardForm.tsx
+++ b/public/app/features/dashboard-scene/saving/provisioned/SaveProvisionedDashboardForm.tsx
@@ -12,6 +12,7 @@ import { t, Trans } from 'app/core/internationalization';
import kbn from 'app/core/utils/kbn';
import { Resource } from 'app/features/apiserver/types';
import { validationSrv } from 'app/features/manage-dashboards/services/ValidationSrv';
+import { BranchValidationError } from 'app/features/provisioning/Shared/BranchValidationError';
import { PROVISIONING_URL } from 'app/features/provisioning/constants';
import { useCreateOrUpdateRepositoryFile } from 'app/features/provisioning/hooks/useCreateOrUpdateRepositoryFile';
import { WorkflowOption } from 'app/features/provisioning/types';
@@ -292,34 +293,6 @@ export function SaveProvisionedDashboardForm({
);
}
-const BranchValidationError = () => (
- <>
- Invalid branch name.
-
-
-
- It cannot start with '/' or end with '/', '.', or whitespace.
-
-
-
-
- It cannot contain '//' or '..'.
-
-
-
-
- It cannot contain invalid characters: '~', '^', ':', '?', '*', '[', '\\', or ']'.
-
-
-
-
- It must have at least one valid character.
-
-
-
- >
-);
-
/**
* Dashboard title validation to ensure it's not the same as the folder name
* and meets other naming requirements.
diff --git a/public/app/features/provisioning/Config/ConfigForm.tsx b/public/app/features/provisioning/Config/ConfigForm.tsx
index 138fa353b27..7487c1e740f 100644
--- a/public/app/features/provisioning/Config/ConfigForm.tsx
+++ b/public/app/features/provisioning/Config/ConfigForm.tsx
@@ -1,4 +1,4 @@
-import { useEffect, useState } from 'react';
+import { useEffect, useMemo, useState } from 'react';
import { Controller, useForm } from 'react-hook-form';
import { useNavigate } from 'react-router-dom-v5-compat';
@@ -19,6 +19,7 @@ import {
} from '@grafana/ui';
import { Repository, RepositorySpec } from 'app/api/clients/provisioning';
import { FormPrompt } from 'app/core/components/FormPrompt/FormPrompt';
+import { t } from 'app/core/internationalization';
import { TokenPermissionsInfo } from '../Shared/TokenPermissionsInfo';
import { useCreateOrUpdateRepository } from '../hooks';
@@ -27,16 +28,18 @@ import { dataToSpec, specToData } from '../utils/data';
import { ConfigFormGithubCollapse } from './ConfigFormGithubCollapse';
-const typeOptions = ['GitHub', 'Local'].map((label) => ({ label, value: label.toLowerCase() }));
-const targetOptions = [
- { value: 'instance', label: 'Entire instance' },
- { value: 'folder', label: 'Managed folder' },
-];
-
export function getWorkflowOptions(type?: 'github' | 'local'): Array> {
const opts: Array> = [
- { label: 'Branch', value: 'branch', description: 'Create a branch (and pull request) for changes' },
- { label: 'Write', value: 'write', description: 'Allow writing updates to the remote repository' },
+ {
+ label: t('provisioning.config-form.option-branch', 'Branch'),
+ value: 'branch',
+ description: t('provisioning.config-form.description-branch', 'Create a branch (and pull request) for changes'),
+ },
+ {
+ label: t('provisioning.config-form.option-write', 'Write'),
+ value: 'write',
+ description: t('provisioning.config-form.description-write', 'Allow writing updates to the remote repository'),
+ },
];
if (type === 'github') {
return opts;
@@ -87,13 +90,29 @@ export function ConfigForm({ data }: ConfigFormProps) {
const navigate = useNavigate();
const type = watch('type');
+ const typeOptions = useMemo(
+ () => [
+ { value: 'github', label: t('provisioning.config-form.option-github', 'GitHub') },
+ { value: 'local', label: t('provisioning.config-form.option-local', 'Local') },
+ ],
+ []
+ );
+
+ const targetOptions = useMemo(
+ () => [
+ { value: 'instance', label: t('provisioning.config-form.option-entire-instance', 'Entire instance') },
+ { value: 'folder', label: t('provisioning.config-form.option-managed-folder', 'Managed folder') },
+ ],
+ []
+ );
+
useEffect(() => {
if (request.isSuccess) {
const formData = getValues();
appEvents.publish({
type: AppEvents.alertSuccess.name,
- payload: ['Repository settings saved'],
+ payload: [t('provisioning.config-form.alert-repository-settings-saved', 'Repository settings saved')],
});
reset(formData);
setTimeout(() => {
@@ -116,7 +135,7 @@ export function ConfigForm({ data }: ConfigFormProps) {
return (
diff --git a/public/app/features/provisioning/Config/ConfigFormGithubCollapse.tsx b/public/app/features/provisioning/Config/ConfigFormGithubCollapse.tsx
index cb5109b7015..13202655ed9 100644
--- a/public/app/features/provisioning/Config/ConfigFormGithubCollapse.tsx
+++ b/public/app/features/provisioning/Config/ConfigFormGithubCollapse.tsx
@@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom-v5-compat';
import { config } from '@grafana/runtime';
import { Alert, ControlledCollapse, Field } from '@grafana/ui';
+import { t, Trans } from 'app/core/internationalization';
import { checkPublicAccess } from '../GettingStarted/features';
import { GETTING_STARTED_URL } from '../constants';
@@ -14,45 +15,77 @@ export function ConfigFormGithubCollapse({ previews }: ConfigFormGithubCollapseP
const navigate = useNavigate();
return (
-
-
Realtime feedback
+
+
+ Realtime feedback
+
{checkPublicAccess() ? (
-
- Changes in git will be quickly pulled into grafana. Pull requests can be processed.
+
+
+ Changes in git will be quickly pulled into grafana. Pull requests can be processed.
+
) : (
Instructions}
+ buttonContent={Instructions}
onRemove={() => navigate(GETTING_STARTED_URL)}
>
- Changes in git will eventually be pulled depending on the synchronization interval. Pull requests will not be
- processed
+
+ Changes in git will eventually be pulled depending on the synchronization interval. Pull requests will not
+ be processed
+
)}
-
Pull Request image previews
+
+
+ Pull Request image previews
+
+
{!config.rendererAvailable && (
Instructions}
+ buttonContent={Instructions}
onRemove={() => window.open('https://grafana.com/grafana/plugins/grafana-image-renderer/', '_blank')}
>
- When the image renderer is configured, pull requests can see preview images
+
+ When the image renderer is configured, pull requests can see preview images
+
)}
- Render before/after images and link them to the pull request.
-
- NOTE! this will render dashboards into an image that can be access by a public URL
+
+ Render before/after images and link them to the pull request.
+
+ NOTE: This will render dashboards into an image that can be access by a public URL
+
}
>
diff --git a/public/app/features/provisioning/File/FileHistoryPage.tsx b/public/app/features/provisioning/File/FileHistoryPage.tsx
index a91b733076b..5f72d9af9e2 100644
--- a/public/app/features/provisioning/File/FileHistoryPage.tsx
+++ b/public/app/features/provisioning/File/FileHistoryPage.tsx
@@ -3,6 +3,7 @@ import { useParams } from 'react-router-dom-v5-compat';
import { Card, EmptyState, Spinner, Stack, Text, TextLink, UserIcon } from '@grafana/ui';
import { useGetRepositoryHistoryWithPathQuery, useGetRepositoryStatusQuery } from 'app/api/clients/provisioning';
import { Page } from 'app/core/components/Page/Page';
+import { Trans } from 'app/core/internationalization';
import { isNotFoundError } from 'app/features/alerting/unified/api/util';
import { PROVISIONING_URL } from '../constants';
@@ -28,8 +29,14 @@ export default function FileHistoryPage() {
{notFound ? (
- Make sure the repository config exists in the configuration file.
- Back to repositories
+
+
+ Make sure the repository config exists in the configuration file.
+
+
+
+ Back to repositories
+
) : (
//@ts-expect-error TODO fix history response types
@@ -48,7 +55,7 @@ interface Props {
function HistoryView({ history, path, repo }: Props) {
if (!history.items) {
- return