mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net/haproxy: add support for time format (#45)
* net/haproxy: add support for time format * net/haproxy: use time format for default values * net/haproxy: bump version * net/haproxy: use strict validation for time format * net/haproxy: fix regular expression
This commit is contained in:
parent
e2e98422a5
commit
fc6ec40d5b
5 changed files with 29 additions and 35 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= haproxy
|
||||
PLUGIN_VERSION= 1.5
|
||||
PLUGIN_VERSION= 1.6
|
||||
PLUGIN_COMMENT= Reliable, high performance TCP/HTTP load balancer
|
||||
PLUGIN_DEPENDS= haproxy
|
||||
PLUGIN_MAINTAINER= opnsense@moov.de
|
||||
|
|
|
|||
|
|
@ -114,14 +114,14 @@
|
|||
<id>backend.tuning_timeoutConnect</id>
|
||||
<label>Connection Timeout</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum time (in milliseconds) to wait for a connection attempt to a server to succeed.]]></help>
|
||||
<help><![CDATA[Set the maximum time to wait for a connection attempt to a server to succeed. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.tuning_timeoutServer</id>
|
||||
<label>Server Timeout</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum inactivity time (in milliseconds) on the server side.]]></help>
|
||||
<help><![CDATA[Set the maximum inactivity time on the server side. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
<id>frontend.tuning_timeoutClient</id>
|
||||
<label>Client Timeout</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum inactivity time (in milliseconds) on the client side.]]></help>
|
||||
<help><![CDATA[Set the maximum inactivity time on the client side. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
|
|
|
|||
|
|
@ -100,19 +100,19 @@
|
|||
<id>haproxy.general.defaults.timeoutClient</id>
|
||||
<label>Client Timeout</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum inactivity time (in milliseconds) on the client side.]]></help>
|
||||
<help><![CDATA[Set the maximum inactivity time on the client side. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.defaults.timeoutConnect</id>
|
||||
<label>Connection Timeout</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum time (in milliseconds) to wait for a connection attempt to a server to succeed.]]></help>
|
||||
<help><![CDATA[Set the maximum time to wait for a connection attempt to a server to succeed. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.defaults.timeoutServer</id>
|
||||
<label>Server Timeout</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[Set the maximum inactivity time (in milliseconds) on the server side.]]></help>
|
||||
<help><![CDATA[Set the maximum inactivity time on the server side. Defaults to milliseconds. Optionally the unit may be specified as either "d", "h", "m", "s", "ms" or "us".]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>haproxy.general.defaults.retries</id>
|
||||
|
|
|
|||
|
|
@ -82,25 +82,22 @@
|
|||
<ValidationMessage>Please specify a value between 1 and 500000.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</maxConnections>
|
||||
<timeoutClient type="IntegerField">
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>1000000</MaximumValue>
|
||||
<default>30000</default>
|
||||
<ValidationMessage>Please specify a value between 1 and 1000000.</ValidationMessage>
|
||||
<timeoutClient type="TextField">
|
||||
<default>30s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</timeoutClient>
|
||||
<timeoutConnect type="IntegerField">
|
||||
<MinimumValue>100</MinimumValue>
|
||||
<MaximumValue>1000000</MaximumValue>
|
||||
<default>30000</default>
|
||||
<ValidationMessage>Please specify a value between 100 and 1000000.</ValidationMessage>
|
||||
<timeoutConnect type="TextField">
|
||||
<default>30s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</timeoutConnect>
|
||||
<timeoutServer type="IntegerField">
|
||||
<MinimumValue>100</MinimumValue>
|
||||
<MaximumValue>1000000</MaximumValue>
|
||||
<default>30000</default>
|
||||
<ValidationMessage>Please specify a value between 100 and 1000000.</ValidationMessage>
|
||||
<timeoutServer type="TextField">
|
||||
<default>30s</default>
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</timeoutServer>
|
||||
<retries type="IntegerField">
|
||||
|
|
@ -295,10 +292,9 @@
|
|||
<ValidationMessage>Please specify a value between 1 and 500000.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</tuning_maxConnections>
|
||||
<tuning_timeoutClient type="IntegerField">
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>1000000</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 1 and 1000000.</ValidationMessage>
|
||||
<tuning_timeoutClient type="TextField">
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</tuning_timeoutClient>
|
||||
<!-- XXX: add tag <logging> once nesting is supported by our framework -->
|
||||
|
|
@ -455,7 +451,7 @@
|
|||
<stickiness_expire type="TextField">
|
||||
<Required>Y</Required>
|
||||
<default>30m</default>
|
||||
<mask>/^([0-9]{1,5}[d|h|m|s|ms]{1})*/u</mask>
|
||||
<mask>/^([0-9]{1,5}(?:ms|s|m|h|d)?)/u</mask>
|
||||
<ChangeCase>lower</ChangeCase>
|
||||
<ValidationMessage>Should be a number between 1 and 5 characters followed by either "d", "h", "m", "s" or "ms".</ValidationMessage>
|
||||
</stickiness_expire>
|
||||
|
|
@ -478,16 +474,14 @@
|
|||
<Required>N</Required>
|
||||
</stickiness_cookielength>
|
||||
<!-- XXX: add tag <tuning> once nesting is supported by our framework -->
|
||||
<tuning_timeoutConnect type="IntegerField">
|
||||
<MinimumValue>100</MinimumValue>
|
||||
<MaximumValue>1000000</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 100 and 1000000.</ValidationMessage>
|
||||
<tuning_timeoutConnect type="TextField">
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</tuning_timeoutConnect>
|
||||
<tuning_timeoutServer type="IntegerField">
|
||||
<MinimumValue>100</MinimumValue>
|
||||
<MaximumValue>1000000</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 100 and 1000000.</ValidationMessage>
|
||||
<tuning_timeoutServer type="TextField">
|
||||
<mask>/^([0-9]{1,8}(?:us|ms|s|m|h|d)?)/u</mask>
|
||||
<ValidationMessage>Should be a number between 1 and 8 characters, optionally followed by either "d", "h", "m", "s", "ms" or "us".</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</tuning_timeoutServer>
|
||||
<tuning_retries type="IntegerField">
|
||||
|
|
|
|||
Loading…
Reference in a new issue