aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/haproxy_global.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-02-09 20:11:21 -0500
committerjim-p <jimp@pfsense.org>2015-02-09 20:11:21 -0500
commit7a051d65eba3b5b78911a55124e7985220916fb1 (patch)
treec5d0429201ffff68092cbb5209b61633e938c7ab /config/haproxy-devel/haproxy_global.php
parent55b1712ee8e24b0f70efea8badab6ab7c50bc2d5 (diff)
parent5f8d58ffef12096558a0fb7a8b6a03f83a50bb06 (diff)
downloadpfsense-packages-7a051d65eba3b5b78911a55124e7985220916fb1.tar.gz
pfsense-packages-7a051d65eba3b5b78911a55124e7985220916fb1.tar.bz2
pfsense-packages-7a051d65eba3b5b78911a55124e7985220916fb1.zip
Merge pull request #815 from PiBa-NL/haproxy-devel_0_13
Diffstat (limited to 'config/haproxy-devel/haproxy_global.php')
-rwxr-xr-xconfig/haproxy-devel/haproxy_global.php26
1 files changed, 6 insertions, 20 deletions
diff --git a/config/haproxy-devel/haproxy_global.php b/config/haproxy-devel/haproxy_global.php
index 60c2fd9d..978d778d 100755
--- a/config/haproxy-devel/haproxy_global.php
+++ b/config/haproxy-devel/haproxy_global.php
@@ -271,26 +271,12 @@ function enable_change(enable_change) {
Carp monitor
</td>
<td class="vtable">
- <select name="carpdev" class="formfld">
- <option value="disabled" <?php if (!isset($pconfig['carpdev'])) echo "selected"; ?>>
- disabled
- </option>
- <?php
- if(is_array($config['virtualip']['vip'])) {
- foreach($config['virtualip']['vip'] as $carp):
- if ($carp['mode'] != "carp") continue;
- $ipaddress = $carp['subnet'];
- $carp_int = trim(find_carp_interface($ipaddress));
- ?>
- <option value="<?=$carp_int;?>"
- <?php if (isset($pconfig['carpdev']) && $carp_int == $pconfig['carpdev']) echo "selected"; ?>>
- <?=$carp_int;?> (<?=$ipaddress;?>)
- </option>
- <?php
- endforeach;
- }
- ?>
- </select>
+ <?php
+ $vipinterfaces = array();
+ $vipinterfaces[] = array('ip' => '', 'name' => 'Disabled');
+ $vipinterfaces += haproxy_get_bindable_interfaces($ipv="ipv4,ipv6", $interfacetype="carp");
+ echo_html_select('carpdev',$vipinterfaces, $pconfig['carpdev'],"No carp interfaces pressent");
+ ?>
<br/>
Monitor carp interface and only run haproxy on the firewall which is MASTER.
</td>