From cacdf00067cd3ada5d03d4917ebbca61b9cd1ac9 Mon Sep 17 00:00:00 2001 From: Pepe Cano <825430+ppcano@users.noreply.github.com> Date: Mon, 17 Mar 2025 11:28:29 +0100 Subject: [PATCH] alerting(ui): add external links to read more about labels and annotations (#102187) * alerting(ui): add external link to read about labels * alerting(ui): add external link to read about annotations * fix i18n settings * fix i18n * fix i18n error with `make 18n-extract` --- .../rule-editor/AnnotationsStep.tsx | 27 ++++++++++++++++--- .../rule-editor/labels/LabelsField.tsx | 2 ++ .../rule-editor/labels/LabelsFieldInForm.tsx | 2 ++ public/locales/en-US/grafana.json | 5 ++++ 4 files changed, 33 insertions(+), 3 deletions(-) diff --git a/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx b/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx index aabe2aed1bd..7148c0e17e7 100644 --- a/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx @@ -98,9 +98,30 @@ const AnnotationsStep = () => { Add more context to your alert notifications. +

+ {t( + 'alerting.rule-form.annotations.description1', + 'Annotations add additional information to alerts, helping alert responders identify and address potential issues.' + )} +

+

+ {t( + 'alerting.rule-form.annotations.description2', + 'For example, add a Summary annotation to tell you which value caused the alert to fire or which server it happened on.' + )} +

+ {t( + 'alerting.rule-form.annotations.description3', + 'Annotations can contain a combination of text and template code, which is used to include data from queries.' + )} + + } title="Annotations" /> diff --git a/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx b/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx index b3d3dd81927..f3919ed0b09 100644 --- a/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx +++ b/public/app/features/alerting/unified/components/rule-editor/labels/LabelsField.tsx @@ -404,6 +404,8 @@ function LabelsField() { {getLabelText(type)}