mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
sysutils/monit: set mailserver type to CSVListField, fix validation
This commit is contained in:
parent
7a7df459d5
commit
3437539f35
3 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue