;
}
-export function ConfigFormGithubCollapse({ previews }: ConfigFormGithubCollapseProps) {
- const navigate = useNavigate();
+
+export function ConfigFormGithubCollapse({ register }: ConfigFormGithubCollapseProps) {
+ const isPublic = checkPublicAccess();
+ const hasImageRenderer = checkImageRenderer();
return (
-
- Realtime feedback
-
- {checkPublicAccess() ? (
-
-
-
- Changes in git will be quickly pulled into grafana. Pull requests can be processed.
-
-
-
- ) : (
- Instructions}
- onRemove={() => navigate(GETTING_STARTED_URL)}
- >
-
- Changes in git will eventually be pulled depending on the synchronization interval. Pull requests will not
- be processed
-
-
- )}
-
-
-
- Pull Request image previews
-
-
- {!config.rendererAvailable && (
- 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
-
-
- )}
-
-
-
- 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
-
-
- }
- >
- {previews}
+
+
+
+ Adds an image preview of dashboard changes in pull requests. Images of your Grafana dashboards will be
+ shared in your Git repository and visible to anyone with repository access.
+ {' '}
+
+
+ Requires image rendering.{' '}
+
+ Set up image rendering
+
+
+
+ >
+ }
+ {...register('generateDashboardPreviews')}
+ />
+
+ {!isPublic && (
+
+
+
+
+ Configure webhooks
+ {' '}
+ to get instant updates in Grafana as soon as changes are committed. Review and approve changes using pull
+ requests before they go live.
+
+
+
+ )}
);
}
diff --git a/public/app/features/provisioning/Config/defaults.ts b/public/app/features/provisioning/Config/defaults.ts
new file mode 100644
index 00000000000..4c7d77731ef
--- /dev/null
+++ b/public/app/features/provisioning/Config/defaults.ts
@@ -0,0 +1,25 @@
+import { RepositorySpec } from '../../../api/clients/provisioning';
+import { RepositoryFormData } from '../types';
+import { specToData } from '../utils/data';
+
+export function getDefaultValues(repository?: RepositorySpec): RepositoryFormData {
+ if (!repository) {
+ return {
+ type: 'github',
+ title: 'Repository',
+ token: '',
+ url: '',
+ branch: 'main',
+ generateDashboardPreviews: false,
+ readOnly: false,
+ prWorkflow: true,
+ path: 'grafana/',
+ sync: {
+ enabled: false,
+ target: 'instance',
+ intervalSeconds: 60,
+ },
+ };
+ }
+ return specToData(repository);
+}
diff --git a/public/app/features/provisioning/Shared/TokenPermissionsInfo.tsx b/public/app/features/provisioning/Shared/TokenPermissionsInfo.tsx
index c97bea79c18..2c995490821 100644
--- a/public/app/features/provisioning/Shared/TokenPermissionsInfo.tsx
+++ b/public/app/features/provisioning/Shared/TokenPermissionsInfo.tsx
@@ -11,7 +11,7 @@ export function TokenPermissionsInfo() {
{/* GitHub UI is English only, so these strings are not translated */}
{/* eslint-disable-next-line @grafana/no-untranslated-strings */}
-
+
Go to
GitHub Personal Access Tokens
diff --git a/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx b/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx
index dd0d5f167dd..bdc91f790f1 100644
--- a/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx
+++ b/public/app/features/provisioning/Wizard/ProvisioningWizard.tsx
@@ -10,7 +10,7 @@ import { useDeleteRepositoryMutation, useGetFrontendSettingsQuery } from 'app/ap
import { FormPrompt } from 'app/core/components/FormPrompt/FormPrompt';
import { t } from 'app/core/internationalization';
-import { getDefaultValues } from '../Config/ConfigForm';
+import { getDefaultValues } from '../Config/defaults';
import { PROVISIONING_URL } from '../constants';
import { useCreateOrUpdateRepository } from '../hooks/useCreateOrUpdateRepository';
import { dataToSpec } from '../utils/data';
@@ -41,7 +41,7 @@ const getSteps = (): Array> => {
},
{
id: 'synchronize',
- name: t('provisioning.wizard.step-synchronize', 'Synchronize'),
+ name: t('provisioning.wizard.step-synchronize', 'Synchronize with external storage'),
title: t('provisioning.wizard.title-synchronize', 'Synchronize with external storage'),
submitOnNext: false,
},
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json
index c2ecec89b32..d9037ed2ddd 100644
--- a/public/locales/en-US/grafana.json
+++ b/public/locales/en-US/grafana.json
@@ -6476,18 +6476,9 @@
"placeholder-select-repository-type": "Select repository type"
},
"config-form-github-collapse": {
- "description-attach-dashboard-previews": "Render before/after images and link them to the pull request.<1>1>NOTE: This will render dashboards into an image that can be access by a public URL",
- "instructions": "Instructions",
- "label-attach-dashboard-previews": "Attach dashboard previews to pull requests",
+ "description-realtime-feedback": "<0>Configure webhooks0> to get instant updates in Grafana as soon as changes are committed. Review and approve changes using pull requests before they go live.",
"label-git-hub-features": "GitHub features",
- "pull-request-image-previews": "Pull Request image previews",
- "realtime-feedback": "Realtime feedback",
- "text-changes-in-git-eventually-pulled": "Changes in git will eventually be pulled depending on the synchronization interval. Pull requests will not be processed",
- "text-changes-in-git-quick-pull": "Changes in git will be quickly pulled into grafana. Pull requests can be processed.",
- "text-when-image-renderer-configured": "When the image renderer is configured, pull requests can see preview images",
- "title-image-renderer-not-configured": "Image renderer not configured",
- "title-public-url-not-configured": "Public URL not configured",
- "title-webhook-will-be-created": "Webhook will be created"
+ "label-realtime-feedback": "Realtime feedback"
},
"connect-repository-button": {
"configure": "Configure",
@@ -6777,7 +6768,7 @@
"step-bootstrap": "Choose what to synchronize",
"step-connect": "Connect",
"step-finish": "Choose additional settings",
- "step-synchronize": "Synchronize",
+ "step-synchronize": "Synchronize with external storage",
"sync-description": "Sync resources with external storage. After this one-time step, all future updates will be automatically saved to the repository and provisioned back into the instance.",
"sync-option-history": "History",
"title-bootstrap": "Choose what to synchronize",