Skip to content

Commit

Permalink
Merge pull request #227 from PiBa-NL/haproxy-0.51
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Dec 12, 2016
2 parents fffce28 + d5dbd8c commit fb91986
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion net/pfSense-pkg-haproxy-devel/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-pkg-haproxy-devel
PORTVERSION= 0.51
PORTVERSION= 0.52
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,9 @@ function haproxy_writeconf($configpath) {
}

$fd = fopen($configfile, "w");
fwrite ($fd, "# Automaticaly generated, dont edit manually.\n");
$d = date("Y-m-d H:i");
fwrite ($fd, "# Generated on: {$d}\n");
if (is_array($a_global)) {
fwrite ($fd, "global\n");
if ($a_global['maxconn']) {
Expand Down Expand Up @@ -2545,7 +2548,7 @@ function get_haproxy_frontends($excludeitem = "") {
foreach ($serveraddress as $addr) {
$serveradresstext .=($serveradresstext == null ? "" : ", ") . "{$addr['addr']}:{$addr['port']}";
}
$result[$frontend['name']]['name'] = "{$frontend['name']} - {$frontend['type']} ({$serveradresstext})";
$result[$frontend['name']]['name'] = "{$frontend['name']} - {$frontend['type']}";
$result[$frontend['name']]['ref'] = &$frontend;
}
uasort($result, haproxy_compareByName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,19 @@ class HaproxyHtmlList
$result = "";
$itemnamenr = $this->tablename . $itemname . $counter;
$itemtype = $item['type'];
$itemmaxwidth = $item['maxwidth'];
$style = "";
$stylevalue = "";
if ($itemmaxwidth) {
$stylevalue .= ";max-width:".$itemmaxwidth;
}
if ($stylevalue) {
$style = ' style="'.$stylevalue.'"';
}
if ($editable) {
$itemtype = $item['type'];
if ($itemtype == "select") {
$result .= echo_html_select($itemnamenr, $item['items'], $itemvalue,"-none available-","html_listitem_change(\"{$this->tablename}\",\"{$itemname}\",\"{$counter}\",this);", "");
$result .= echo_html_select($itemnamenr, $item['items'], $itemvalue,"-none available-","html_listitem_change(\"{$this->tablename}\",\"{$itemname}\",\"{$counter}\",this);", $stylevalue);
} elseif ($itemtype == "checkbox") {
$checked = $itemvalue=='yes' ? " checked" : "";
$result .= "<input onclick='html_listitem_change(\"{$this->tablename}\",\"{$itemname}\",\"{$counter}\",this);' name='$itemnamenr' id='$itemnamenr' type='checkbox'$checked value='yes' />";
Expand All @@ -127,7 +136,7 @@ class HaproxyHtmlList
$result .= $item['text'];
} else {
$itemvalue = htmlspecialchars($itemvalue, ENT_QUOTES);
$result .= "<input name='$itemnamenr' id='$itemnamenr' type='text' value='{$itemvalue}' />";
$result .= "<input name='$itemnamenr' id='$itemnamenr' type='text' value='{$itemvalue}' {$style}/>";
}
} else {
if ($itemtype == "select") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
))->setHelp(<<<EOD
Defaults to 1 if left blank ({$cpucores} CPU core(s) detected).<br/>
Note : Consider leaving this value empty or 1 because in multi-process mode (nbproc > 1) memory is not shared between the processes, which could result in random behaviours for several options like ACL's, sticky connections, stats pages, admin maintenance options and some others.<br/>
For more information about the <b>"nbproc"</b> option please see <b><a href='http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#nbproc' target='_blank'>HAProxy Documentation</a></b>
For more information about the <b>"nbproc"</b> option please see <b><a href='http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#nbproc' target='_blank'>HAProxy Documentation</a></b>
EOD
);

Expand Down Expand Up @@ -397,7 +397,7 @@
Sets the maximum size of the Diffie-Hellman parameters used for generating
the ephemeral/temporary Diffie-Hellman key in case of DHE key exchange.
Minimum and default value is: 1024, bigger values might increase CPU usage.<br/>
For more information about the <b>"tune.ssl.default-dh-param"</b> option please see <b><a href='http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#3.2-tune.ssl.default-dh-param' target='_blank'>HAProxy Documentation</a></b><br/>
For more information about the <b>"tune.ssl.default-dh-param"</b> option please see <b><a href='http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#tune.ssl.default-dh-param' target='_blank'>HAProxy Documentation</a></b><br/>
NOTE: HAProxy will emit a warning when starting when this setting is used but not configured.
EOD
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ function cert_get_purpose(){
$fields_externalAddress[0]['type']="select";
$fields_externalAddress[0]['size']="200px";
$fields_externalAddress[0]['items']=&$interfaces;
$fields_externalAddress[0]['maxwidth']="200px";
$fields_externalAddress[1]['name']="extaddr_custom";
$fields_externalAddress[1]['columnheader']="Custom address";
$fields_externalAddress[1]['colwidth']="25%";
Expand Down Expand Up @@ -697,7 +698,7 @@ function type_change(type) {
</table>
<br/>
acl's with the same name will be 'combined' using OR criteria.<br/>
For more information about ACL's please see <a href='http://haproxy.1wt.eu/download/1.5/doc/configuration.txt' target='_blank'>HAProxy Documentation</a> Section 7 - Using ACL's<br/><br/>
For more information about ACL's please see <a href='http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#7' target='_blank'>HAProxy Documentation</a> Section 7 - Using ACL's<br/><br/>
<strong>NOTE Important change in behaviour, since package version 0.32</strong><br/>
-acl's are no longer combined with logical AND operators, list multiple acl's below where needed.<br/>
-acl's alone no longer implicitly generate use_backend configuration. Add 'actions' below to accomplish this behaviour.
Expand Down Expand Up @@ -735,7 +736,7 @@ function type_change(type) {
'Default Backend',
$pconfig['backend_serverpool'],
haproxy_keyvalue_array($listitem_none + $backends)
))->setHelp('If actions above or in other shared frontends no default is needed and backend is selected with actions above this can be left to "None".');
))->setHelp('If a backend is selected with actions above or in other shared frontends, no default is needed and this can be left to "None".');


$form->add($section);
Expand All @@ -756,7 +757,7 @@ function type_change(type) {

$section->addInput(new Form_Checkbox(
'dontlognull',
'Dont log null',
"Don't log null",
'A connection on which no data has been transferred will not be logged.',
$pconfig['dontlognull']
))->setHelp("To skip logging probes from monitoring systems that otherwise would pollute the logging.
Expand All @@ -775,7 +776,7 @@ function type_change(type) {
$section->addInput(new Form_Checkbox(
'log-separate-errors',
'Raise level for errors',
'Change the level changes from "info" to "err" for potentially interesting information.',
'Change the level from "info" to "err" for potentially interesting information.',
$pconfig['log-separate-errors']
))->setHelp("This option makes haproxy raise the level of logs containing potentially interesting information such
as errors, timeouts, retries, redispatches, or HTTP status codes 5xx.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
$fields_servers[2]['type']="select";
$fields_servers[2]['size']="100px";
$fields_servers[2]['items']=&$primaryfrontends;
$fields_servers[2]['maxwidth']="100px";
$fields_servers[3]['name']="address";
$fields_servers[3]['columnheader']="Address";
$fields_servers[3]['colwidth']="10%";
Expand All @@ -105,6 +106,7 @@
$fields_servers[4]['colwidth']="5%";
$fields_servers[4]['type']="textbox";
$fields_servers[4]['size']="5";
$fields_servers[4]['maxwidth']="50px";
$fields_servers[5]['name']="ssl";
$fields_servers[5]['columnheader']="SSL";
$fields_servers[5]['colwidth']="5%";
Expand All @@ -115,6 +117,7 @@
$fields_servers[6]['colwidth']="8%";
$fields_servers[6]['type']="textbox";
$fields_servers[6]['size']="5";
$fields_servers[6]['maxwidth']="50px";

$listitem_none['']['name']="None";

Expand Down Expand Up @@ -793,7 +796,7 @@ function updatevisibility()
</tr>
</table>
<br/>
For more information about ACL's please see <a href='http://haproxy.1wt.eu/download/1.5/doc/configuration.txt' target='_blank'>HAProxy Documentation</a> Section 7 - Using ACL's<br/> Actions should be added below to use the result of the acl as a conditional parameter.
For more information about ACL's please see <a href='http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#7' target='_blank'>HAProxy Documentation</a> Section 7 - Using ACL's<br/> Actions should be added below to use the result of the acl as a conditional parameter.
</div>
EOT
));
Expand Down Expand Up @@ -884,7 +887,7 @@ function updatevisibility()
'Agent checks',
'Use agent checks',
$pconfig['agent_check']
))->setHelp("Use a TCP connection to read an ASCII string of the form 100%,75%,drain,down (more about this in the <a href='http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#agent-check' target='_blank'>haproxy manual</a>)");
))->setHelp("Use a TCP connection to read an ASCII string of the form 100%,75%,drain,down (more about this in the <a href='http://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.2-agent-check' target='_blank'>haproxy manual</a>)");
$section->addInput(new Form_Input('agent_port', 'Agent port', 'number', $pconfig['agent_port']
),"haproxy_agent_check")->setHelp('Fill in the TCP portnumber the healthcheck should be performed on.');
$section->addInput(new Form_Input('agent_inter', 'Agent interval', 'text', $pconfig['agent_inter']
Expand Down

0 comments on commit fb91986

Please sign in to comment.