summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-07-28 20:31:46 +0000
committerErmal <eri@pfsense.org>2011-07-28 20:31:57 +0000
commit33c06ef791a58d95df4c6674a8e87e5b1186689c (patch)
tree16ded2b30af558c4e53a0f982dbd9baa63707cd9 /usr
parent4c41b626539a103834a9e93f5be34afcfa6777a9 (diff)
downloadpfsense-33c06ef791a58d95df4c6674a8e87e5b1186689c.zip
pfsense-33c06ef791a58d95df4c6674a8e87e5b1186689c.tar.gz
Add a new option to allow disabling of gateway monitoring. This gateways will always be reported as up.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/system_gateways_edit.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index f34df9f..0d35424 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -78,6 +78,7 @@ if (isset($id) && $a_gateways[$id]) {
$pconfig['losshigh'] = $a_gateway_item[$id]['losshigh'];
$pconfig['down'] = $a_gateway_item[$id]['down'];
$pconfig['monitor'] = $a_gateways[$id]['monitor'];
+ $pconfig['monitor_disable'] = isset($a_gateways[$id]['monitor_disable']);
$pconfig['descr'] = $a_gateways[$id]['descr'];
$pconfig['attribute'] = $a_gateways[$id]['attribute'];
}
@@ -233,7 +234,9 @@ if ($_POST) {
$gateway['name'] = $_POST['name'];
$gateway['weight'] = $_POST['weight'];
$gateway['descr'] = $_POST['descr'];
- if (is_ipaddr($_POST['monitor']))
+ if ($_POST['monitor_disable'] == "yes")
+ $gateway['monitor_disable'] = true;
+ else if (is_ipaddr($_POST['monitor']))
$gateway['monitor'] = $_POST['monitor'];
if ($_POST['defaultgw'] == "yes" || $_POST['defaultgw'] == "on") {
@@ -307,6 +310,9 @@ function show_advanced_gateway() {
aodiv = document.getElementById('showgatewayadv');
aodiv.style.display = "block";
}
+function monitor_change() {
+ document.iform.monitor.disabled = document.iform.monitor_disable.checked;
+}
</script>
<?php if ($input_errors) print_input_errors($input_errors); ?>
<form action="system_gateways_edit.php" method="post" name="iform" id="iform">
@@ -366,6 +372,14 @@ function show_advanced_gateway() {
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Disable Gateway Monitoring"); ?></td>
+ <td width="78%" class="vtable">
+ <input name="monitor_disable" type="checkbox" id="monitor_disable" value="yes" <?php if ($pconfig['monitor_disable'] == true) echo "checked"; ?> onClick="monitor_change()" />
+ <strong><?=gettext("Disable Gateway Monitoring"); ?></strong><br />
+ <?=gettext("This will consider this gateway as always being up"); ?>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Monitor IP"); ?></td>
<td width="78%" class="vtable">
<?php
@@ -461,7 +475,7 @@ function show_advanced_gateway() {
</form>
<?php include("fend.inc"); ?>
<script language="JavaScript">
-enable_change(document.iform.defaultgw);
+monitor_change();
</script>
</body>
</html>
OpenPOWER on IntegriCloud