diff --git a/public/app/features/alerting/unified/components/contact-points/ContactPoints.v2.tsx b/public/app/features/alerting/unified/components/contact-points/ContactPoints.v2.tsx index 0881c8222a4..90d8c227b52 100644 --- a/public/app/features/alerting/unified/components/contact-points/ContactPoints.v2.tsx +++ b/public/app/features/alerting/unified/components/contact-points/ContactPoints.v2.tsx @@ -48,8 +48,8 @@ import { UnusedContactPointBadge } from '../receivers/ReceiversTable'; import { ReceiverMetadataBadge } from '../receivers/grafanaAppReceivers/ReceiverMetadataBadge'; import { ReceiverPluginMetadata } from '../receivers/grafanaAppReceivers/useReceiversMetadata'; -import { MessageTemplates } from './MessageTemplates'; import { useDeleteContactPointModal } from './Modals'; +import { NotificationTemplates } from './NotificationTemplates'; import { RECEIVER_META_KEY, RECEIVER_PLUGIN_META_KEY, @@ -61,7 +61,7 @@ import { ContactPointWithMetadata, getReceiverDescription, isProvisioned, Receiv enum ActiveTab { ContactPoints, - MessageTemplates, + NotificationTemplates, } const DEFAULT_PAGE_SIZE = 10; @@ -83,7 +83,7 @@ const ContactPoints = () => { const [ExportDrawer, showExportDrawer] = useExportContactPoint(); const showingContactPoints = activeTab === ActiveTab.ContactPoints; - const showingMessageTemplates = activeTab === ActiveTab.MessageTemplates; + const showNotificationTemplates = activeTab === ActiveTab.NotificationTemplates; if (error) { // TODO fix this type casting, when error comes from "getContactPointsStatus" it probably won't be a SerializedError @@ -105,9 +105,9 @@ const ContactPoints = () => { onChangeTab={() => setActiveTab(ActiveTab.ContactPoints)} /> setActiveTab(ActiveTab.MessageTemplates)} + label="Notification Templates" + active={showNotificationTemplates} + onChangeTab={() => setActiveTab(ActiveTab.NotificationTemplates)} /> @@ -162,19 +162,19 @@ const ContactPoints = () => { )} )} - {/* Message Templates tab */} - {showingMessageTemplates && ( + {/* Notification Templates tab */} + {showNotificationTemplates && ( <> - Create message templates to customize your notifications. + Create notification templates to customize your notifications. - Add message template + Add notification template - + )} diff --git a/public/app/features/alerting/unified/components/contact-points/DuplicateMessageTemplate.tsx b/public/app/features/alerting/unified/components/contact-points/DuplicateMessageTemplate.tsx index b59d348aac6..4f24ff072b2 100644 --- a/public/app/features/alerting/unified/components/contact-points/DuplicateMessageTemplate.tsx +++ b/public/app/features/alerting/unified/components/contact-points/DuplicateMessageTemplate.tsx @@ -15,7 +15,7 @@ const NewMessageTemplate = ({ match }: Props) => { const name = match?.params.name; if (!name) { - return ; + return ; } if (isLoading && !data) { diff --git a/public/app/features/alerting/unified/components/contact-points/EditMessageTemplate.tsx b/public/app/features/alerting/unified/components/contact-points/EditMessageTemplate.tsx index b8227ff1bca..51b10f92c98 100644 --- a/public/app/features/alerting/unified/components/contact-points/EditMessageTemplate.tsx +++ b/public/app/features/alerting/unified/components/contact-points/EditMessageTemplate.tsx @@ -16,7 +16,7 @@ const EditMessageTemplate = ({ match }: Props) => { const name = match?.params.name; if (!name) { - return ; + return ; } if (isLoading && !data) { @@ -25,7 +25,7 @@ const EditMessageTemplate = ({ match }: Props) => { if (error) { return ( - + {String(error)} ); diff --git a/public/app/features/alerting/unified/components/contact-points/GlobalConfig.tsx b/public/app/features/alerting/unified/components/contact-points/GlobalConfig.tsx index c5a453c6ef6..d86cec101ff 100644 --- a/public/app/features/alerting/unified/components/contact-points/GlobalConfig.tsx +++ b/public/app/features/alerting/unified/components/contact-points/GlobalConfig.tsx @@ -16,7 +16,7 @@ const NewMessageTemplate = () => { if (error) { return ( - + {String(error)} ); diff --git a/public/app/features/alerting/unified/components/contact-points/NewMessageTemplate.tsx b/public/app/features/alerting/unified/components/contact-points/NewMessageTemplate.tsx index 5a0e658d832..fce6ff95057 100644 --- a/public/app/features/alerting/unified/components/contact-points/NewMessageTemplate.tsx +++ b/public/app/features/alerting/unified/components/contact-points/NewMessageTemplate.tsx @@ -16,7 +16,7 @@ const NewMessageTemplate = () => { if (error) { return ( - + {String(error)} ); diff --git a/public/app/features/alerting/unified/components/contact-points/MessageTemplates.tsx b/public/app/features/alerting/unified/components/contact-points/NotificationTemplates.tsx similarity index 80% rename from public/app/features/alerting/unified/components/contact-points/MessageTemplates.tsx rename to public/app/features/alerting/unified/components/contact-points/NotificationTemplates.tsx index 415188bc1d6..67077810fa9 100644 --- a/public/app/features/alerting/unified/components/contact-points/MessageTemplates.tsx +++ b/public/app/features/alerting/unified/components/contact-points/NotificationTemplates.tsx @@ -6,12 +6,12 @@ import { useAlertmanagerConfig } from '../../hooks/useAlertmanagerConfig'; import { useAlertmanager } from '../../state/AlertmanagerContext'; import { TemplatesTable } from '../receivers/TemplatesTable'; -export const MessageTemplates = () => { +export const NotificationTemplates = () => { const { selectedAlertmanager } = useAlertmanager(); const { data, error } = useAlertmanagerConfig(selectedAlertmanager); if (error) { - return {String(error)}; + return {String(error)}; } if (data) { diff --git a/public/app/features/alerting/unified/components/receivers/ReceiversAndTemplatesView.tsx b/public/app/features/alerting/unified/components/receivers/ReceiversAndTemplatesView.tsx index a4de8059101..4572f7978a7 100644 --- a/public/app/features/alerting/unified/components/receivers/ReceiversAndTemplatesView.tsx +++ b/public/app/features/alerting/unified/components/receivers/ReceiversAndTemplatesView.tsx @@ -25,7 +25,7 @@ export const ReceiversAndTemplatesView = ({ config, alertManagerName }: Props) = return ( - {/* Vanilla flavored Alertmanager does not support editing message templates via the UI */} + {/* Vanilla flavored Alertmanager does not support editing notification templates via the UI */} {!isVanillaAM && } {/* Grafana manager Alertmanager does not support global config, Mimir and Cortex do */} {!isGrafanaManagedAlertmanager && }