[v11.0.x] Alerting: Fix max alerts (#87300)

Alerting: Fix max alerts (#87271)

(cherry picked from commit 12fa9e56e6)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
pull/87305/head
grafana-delivery-bot[bot] 1 year ago committed by GitHub
parent cc53e4fc38
commit 5b5032c7b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      public/app/features/alerting/unified/utils/cloud-alertmanager-notifier-types.ts

@ -322,8 +322,12 @@ export const cloudNotifierTypes: Array<NotifierDTO<CloudNotifierType>> = [
'The maximum number of alerts to include in a single webhook message. Alerts above this threshold are truncated. When leaving this at its default value of 0, all alerts are included.',
{
placeholder: '0',
inputType: 'number',
validationRule: '(^\\d+$|^$)',
setValueAs: (value) => (typeof value === 'string' ? parseInt(value, 10) : 0),
setValueAs: (value) => {
const integer = Number(value);
return Number.isFinite(integer) ? integer : 0;
},
}
),
httpConfigOption,

Loading…
Cancel
Save