mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Fix max alerts (#87271)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user