Alerting: Fix max_alerts field handling (#86651)

Fix max_alerts field parsing
This commit is contained in:
Konrad Lalik 2024-04-22 12:25:04 +02:00 committed by GitHub
parent 7dc6540ead
commit 1b930c341d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -320,7 +320,11 @@ export const cloudNotifierTypes: Array<NotifierDTO<CloudNotifierType>> = [
'max_alerts', 'max_alerts',
'Max alerts', 'Max alerts',
'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.', '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', validationRule: '(^\\d+$|^$)' } {
placeholder: '0',
validationRule: '(^\\d+$|^$)',
setValueAs: (value) => (typeof value === 'string' ? parseInt(value, 10) : 0),
}
), ),
httpConfigOption, httpConfigOption,
], ],