+ {isGrafanaManagedAlertmanager && (
+
+
+ The internal Grafana Alertmanager configuration cannot be manually changed. To change this configuration,
+ edit the individual resources through the UI.
+
+
+ )}
{/* form error state */}
{errors.configJSON && (
{
setDataSourceName(dataSourceName);
setOpen(true);
@@ -33,14 +37,29 @@ export function useEditConfigurationDrawer() {
}
const isGrafanaAlertmanager = dataSourceName === GRAFANA_RULES_SOURCE_NAME;
- const title = isGrafanaAlertmanager ? 'Internal Grafana Alertmanager' : dataSourceName;
+ const title = isGrafanaAlertmanager
+ ? t(
+ 'alerting.use-edit-configuration-drawer.drawer.internal-grafana-alertmanager-title',
+ 'Grafana built-in Alertmanager'
+ )
+ : dataSourceName;
+
+ const subtitle = readOnly
+ ? t(
+ 'alerting.use-edit-configuration-drawer.drawer.title-view-the-alertmanager-configuration',
+ 'View Alertmanager configuration'
+ )
+ : t(
+ 'alerting.use-edit-configuration-drawer.drawer.title-edit-the-alertmanager-configuration',
+ 'Edit Alertmanager configuration'
+ );
// @todo check copy
return (
);
- }, [open, dataSourceName, handleDismiss, activeTab, updateAlertmanagerSettings, resetAlertmanagerSettings]);
+ }, [open, dataSourceName, readOnly, handleDismiss, activeTab, updateAlertmanagerSettings, resetAlertmanagerSettings]);
return [drawer, showConfiguration, handleDismiss] as const;
}
diff --git a/public/app/features/alerting/unified/components/settings/InternalAlertmanager.tsx b/public/app/features/alerting/unified/components/settings/InternalAlertmanager.tsx
index add2e0f852d..b40619143f3 100644
--- a/public/app/features/alerting/unified/components/settings/InternalAlertmanager.tsx
+++ b/public/app/features/alerting/unified/components/settings/InternalAlertmanager.tsx
@@ -30,6 +30,7 @@ export default function InternalAlertmanager({ onEditConfiguration }: Props) {
onEditConfiguration={handleEditConfiguration}
onEnable={handleEnable}
onDisable={handleDisable}
+ readOnly
/>
);
}
diff --git a/public/app/features/alerting/unified/components/settings/VersionManager.tsx b/public/app/features/alerting/unified/components/settings/VersionManager.tsx
index b5285d5f990..9a47437094e 100644
--- a/public/app/features/alerting/unified/components/settings/VersionManager.tsx
+++ b/public/app/features/alerting/unified/components/settings/VersionManager.tsx
@@ -94,11 +94,15 @@ const AlertmanagerConfigurationVersionManager = ({
}
if (isLoading) {
- return 'Loading...';
+ return Loading...;
}
if (!historicalConfigs.length) {
- return 'No previous configurations';
+ return (
+
+ No previous configurations
+
+ );
}
// with this function we'll compute the diff with the previous version; that way the user can get some idea of how many lines where changed in each update that was applied
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json
index e7633b9d8a3..f01845beb3f 100644
--- a/public/locales/en-US/grafana.json
+++ b/public/locales/en-US/grafana.json
@@ -413,16 +413,21 @@
},
"alertmanager-card": {
"disable": "Disable",
+ "edit-configuration": "Edit configuration",
"enable": "Enable",
"not-receiving-grafana-managed-alerts": "Not receiving Grafana managed alerts",
"text-activation-in-progress": "Activation in progress",
"text-failed-to-adopt-alertmanager": "Failed to adopt Alertmanager",
"text-inconclusive": "Inconclusive",
"text-receiving-grafanamanaged-alerts": "Receiving Grafana-managed alerts",
- "title-alerting-settings": "Alerting settings"
+ "title-alerting-settings": "Alerting settings",
+ "view-configuration": "View configuration"
},
"alertmanager-config": {
+ "gma-manual-configuration-description": "The internal Grafana Alertmanager configuration cannot be manually changed. To change this configuration, edit the individual resources through the UI.",
+ "gma-manual-configuration-is-not-supported": "Manual configuration changes not supported",
"reset": "Reset",
+ "reset-confirmation": "Are you sure you want to reset configuration for \"{{alertmanagerName}}\"? Contact points and notification policies will be reset to their defaults.",
"resetting-configuration-might-while": "Resetting configuration, this might take a while.",
"title-failed-to-load-alertmanager-configuration": "Failed to load Alertmanager configuration",
"title-oops-something-went-wrong": "Oops, something went wrong",
@@ -435,6 +440,8 @@
"restore": "Restore",
"text-latest": "Latest"
},
+ "loading": "Loading...",
+ "no-previous-configurations": "No previous configurations",
"this-might-take-a-while": "This might take a while...",
"title-failed-to-load-configuration-history": "Failed to load configuration history",
"title-restore-version": "Restore version",
@@ -2075,8 +2082,11 @@
},
"use-edit-configuration-drawer": {
"drawer": {
+ "internal-grafana-alertmanager-title": "Grafana built-in Alertmanager",
"label-json-model": "JSON Model",
- "label-versions": "Versions"
+ "label-versions": "Versions",
+ "title-edit-the-alertmanager-configuration": "Edit Alertmanager configuration",
+ "title-view-the-alertmanager-configuration": "View Alertmanager configuration"
}
},
"use-edit-policy-modal": {