diff --git a/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.helpers.ts b/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.helpers.ts index b98f400d..f1d9d8fd 100644 --- a/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.helpers.ts +++ b/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.helpers.ts @@ -16,5 +16,5 @@ export const getIsTooManyLabelsWarningVisible = ( export const getIsAddBtnDisabled = ({ custom }: AlertReceiveChannel['alert_group_labels']) => { const lastItem = custom.at(-1); - return lastItem?.key.id === undefined || lastItem?.value.id === undefined; + return lastItem && (lastItem?.key.id === undefined || lastItem?.value.id === undefined); }; diff --git a/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.tsx b/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.tsx index bd408a1e..5bb92a29 100644 --- a/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.tsx +++ b/grafana-plugin/src/containers/IntegrationLabelsForm/IntegrationLabelsForm.tsx @@ -312,7 +312,7 @@ const CustomLabels = (props: CustomLabelsProps) => { return ( - Dynamic & Static labels ss + Dynamic & Static labels Dynamic: label values are extracted from the alert payload using Jinja. Keys remain static.
diff --git a/grafana-plugin/src/containers/Labels/Labels.tsx b/grafana-plugin/src/containers/Labels/Labels.tsx index 4057df30..ef1aadfb 100644 --- a/grafana-plugin/src/containers/Labels/Labels.tsx +++ b/grafana-plugin/src/containers/Labels/Labels.tsx @@ -1,7 +1,7 @@ import React, { forwardRef, useCallback, useImperativeHandle, useState } from 'react'; import { ServiceLabels, ServiceLabelsProps } from '@grafana/labels'; -import { Field, Icon, Label } from '@grafana/ui'; +import { Field, Label } from '@grafana/ui'; import { isEmpty } from 'lodash-es'; import { observer } from 'mobx-react'; @@ -104,14 +104,7 @@ const Labels = observer( return (
- {description}
}> - Labels  - - - } - > + {description}}>Labels}> = ob value={getValues(WebhookFormFieldName.Labels) || []} errors={labelsFormErrors} onDataUpdate={onDataUpdate} + description="Labels applied to the webhook will be included in the webhook payload, along with alert group and integration labels." /> );