sysutils/monit: set mailserver type to CSVListField, fix validation

This commit is contained in:
Frank Brendel 2017-06-14 14:44:03 +02:00 committed by Franco Fichtner
parent 7a7df459d5
commit 3437539f35
3 changed files with 8 additions and 5 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= monit
PLUGIN_VERSION= 1.2
PLUGIN_VERSION= 1.3
PLUGIN_COMMENT= Proactive system monitoring
PLUGIN_MAINTAINER= frank.brendel@eurolog.com
PLUGIN_DEPENDS= monit

View file

@ -20,7 +20,9 @@
<field>
<id>monit.general.mailserver</id>
<label>Mail Server</label>
<type>text</type>
<type>select_multiple</type>
<allownew>true</allownew>
<style>tokenize</style>
<help><![CDATA[Comma separated list of SMTP servers for alert delivery.]]></help>
</field>
<field>

View file

@ -22,10 +22,11 @@
<MaximumValue>86400</MaximumValue>
<ValidationMessage>Start Delay needs to be an integer value between 0 and 86400</ValidationMessage>
</startdelay>
<mailserver type="TextField">
<mailserver type="CSVListField">
<default>127.0.0.1</default>
<Required>Y</Required>
<mask>/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-4]|2[0-5][0-9]|[01]?[0-9][0-9]?)$/</mask>
<multiple>Y</multiple>
<mask>/^((?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]),?)+$/</mask>
<ValidationMessage>Mail Server must be a valid IPv4 address</ValidationMessage>
</mailserver>
<port type="IntegerField">
@ -119,7 +120,7 @@
<name type="TextField">
<Required>Y</Required>
<mask>/^([0-9a-zA-Z\._\-\$]){1,255}$/u</mask>
<ValidationMessage>Should be a string between 1 and 255 characters. Allowed characters are letters and numbers as well as underscore, minus and dot.</ValidationMessage>
<ValidationMessage>Should be a string between 1 and 255 characters. Allowed characters are letters and numbers as well as underscore, minus, dot and the dollar sign.</ValidationMessage>
</name>
<type type="OptionField">
<Required>Y</Required>