- {/* template content and payload editor column – full height and half-width */}
-
- {/* template editor */}
-
- {/* primaryProps will set "minHeight: min-content;" so we have to make sure to apply minHeight to the child */}
-
-
-
- {/* examples dropdown – only available for Grafana Alertmanager */}
- {isGrafanaAlertManager && (
-
- {GlobalTemplateDataExamples.map((item, index) => (
+ {/* editor layout */}
+
+
+ {/* template content and payload editor column – full height and half-width */}
+
+ {/* template editor */}
+
+ {/* primaryProps will set "minHeight: min-content;" so we have to make sure to apply minHeight to the child */}
+
+
+
+ {/* examples dropdown – only available for Grafana Alertmanager */}
+ {isGrafanaAlertManager && (
+
+ {GlobalTemplateDataExamples.map((item, index) => (
+ appendExample(item.example)}
+ />
+ ))}
+
appendExample(item.example)}
+ label={'Examples documentation'}
+ url="https://grafana.com/docs/grafana/latest/alerting/configure-notifications/template-notifications/examples/"
+ target="_blank"
+ icon="external-link-alt"
/>
- ))}
-
-
-
- }
+
+ }
+ >
+
+
+ )}
+
-
-
- {({ width, height }) => (
- setValue('content', value)}
- containerStyles={styles.editorContainer}
- width={width}
- height={height}
- />
- )}
-
-
-
-
- {/* payload editor – only available for Grafana Alertmanager */}
- {isGrafanaAlertManager && (
- <>
-
-
-
+
+
+ {({ width, height }) => (
+ setValue('content', value)}
+ containerStyles={styles.editorContainer}
+ width={width}
+ height={height}
+ />
+ )}
+
+
- >
- )}
-
-
- {/* preview column – full height and half-width */}
- {isGrafanaAlertManager && (
- <>
-
+ {/* payload editor – only available for Grafana Alertmanager */}
+ {isGrafanaAlertManager && (
+ <>
+
+
+ >
+ )}
- >
- )}
-
+
+ {/* preview column – full height and half-width */}
+ {isGrafanaAlertManager && (
+ <>
+
+ >
+ )}
+
+
@@ -439,9 +435,6 @@ export const getStyles = (theme: GrafanaTheme2) => {
label: css({
margin: 0,
}),
- nameField: css({
- marginBottom: theme.spacing(1),
- }),
contentContainer: css({
flex: 1,
display: 'flex',
diff --git a/public/locales/en-US/grafana.json b/public/locales/en-US/grafana.json
index 8849f1b3a69..c2e79b5c104 100644
--- a/public/locales/en-US/grafana.json
+++ b/public/locales/en-US/grafana.json
@@ -295,6 +295,9 @@
"export-all": "Export all",
"loading": "Loading...",
"search-by-matchers": "Search by matchers",
+ "titles": {
+ "notification-templates": "Notification Templates"
+ },
"view": "View"
},
"contact-points": {
@@ -404,6 +407,20 @@
"title": "Alert instance routing preview",
"uninitialized": "When you have your folder selected and your query and labels are configured, click \"Preview routing\" to see the results here."
},
+ "notification-templates": {
+ "duplicate": {
+ "subTitle": "Duplicate a group of notification templates",
+ "title": "Duplicate notification template group"
+ },
+ "edit": {
+ "subTitle": "Edit a group of notification templates",
+ "title": "Edit notification template group"
+ },
+ "new": {
+ "subTitle": "Create a new group of notification templates",
+ "title": "New notification template group"
+ }
+ },
"policies": {
"default-policy": {
"description": "All alert instances will be handled by the default policy if no other matching policies are found.",
diff --git a/public/locales/pseudo-LOCALE/grafana.json b/public/locales/pseudo-LOCALE/grafana.json
index fd11d47872d..41644d694cb 100644
--- a/public/locales/pseudo-LOCALE/grafana.json
+++ b/public/locales/pseudo-LOCALE/grafana.json
@@ -295,6 +295,9 @@
"export-all": "Ēχpőřŧ äľľ",
"loading": "Ŀőäđįʼnģ...",
"search-by-matchers": "Ŝęäřčĥ þy mäŧčĥęřş",
+ "titles": {
+ "notification-templates": "Ńőŧįƒįčäŧįőʼn Ŧęmpľäŧęş"
+ },
"view": "Vįęŵ"
},
"contact-points": {
@@ -404,6 +407,20 @@
"title": "Åľęřŧ įʼnşŧäʼnčę řőūŧįʼnģ přęvįęŵ",
"uninitialized": "Ŵĥęʼn yőū ĥävę yőūř ƒőľđęř şęľęčŧęđ äʼnđ yőūř qūęřy äʼnđ ľäþęľş äřę čőʼnƒįģūřęđ, čľįčĸ \"Přęvįęŵ řőūŧįʼnģ\" ŧő şęę ŧĥę řęşūľŧş ĥęřę."
},
+ "notification-templates": {
+ "duplicate": {
+ "subTitle": "Đūpľįčäŧę ä ģřőūp őƒ ʼnőŧįƒįčäŧįőʼn ŧęmpľäŧęş",
+ "title": "Đūpľįčäŧę ʼnőŧįƒįčäŧįőʼn ŧęmpľäŧę ģřőūp"
+ },
+ "edit": {
+ "subTitle": "Ēđįŧ ä ģřőūp őƒ ʼnőŧįƒįčäŧįőʼn ŧęmpľäŧęş",
+ "title": "Ēđįŧ ʼnőŧįƒįčäŧįőʼn ŧęmpľäŧę ģřőūp"
+ },
+ "new": {
+ "subTitle": "Cřęäŧę ä ʼnęŵ ģřőūp őƒ ʼnőŧįƒįčäŧįőʼn ŧęmpľäŧęş",
+ "title": "Ńęŵ ʼnőŧįƒįčäŧįőʼn ŧęmpľäŧę ģřőūp"
+ }
+ },
"policies": {
"default-policy": {
"description": "Åľľ äľęřŧ įʼnşŧäʼnčęş ŵįľľ þę ĥäʼnđľęđ þy ŧĥę đęƒäūľŧ pőľįčy įƒ ʼnő őŧĥęř mäŧčĥįʼnģ pőľįčįęş äřę ƒőūʼnđ.",