From 33c06ef791a58d95df4c6674a8e87e5b1186689c Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 28 Jul 2011 20:31:46 +0000 Subject: Add a new option to allow disabling of gateway monitoring. This gateways will always be reported as up. --- usr/local/www/system_gateways_edit.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'usr/local') 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; +}
@@ -366,6 +372,14 @@ function show_advanced_gateway() { + + + onClick="monitor_change()" /> +
+ + + + -- cgit v1.1