summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorN0YB <Al_Stu@Frontier.com>2014-01-25 12:49:30 -0800
committerN0YB <Al_Stu@Frontier.com>2014-01-25 12:49:30 -0800
commitec5c28cde6f09fcdf68e28e11a3e44eb8f4cadb9 (patch)
tree46a34d009ee146d287c8b1bb4e629b188154547d /usr/local/www/system_gateways_edit.php
parent3c6787ed654000260260321d3c50213489a1a003 (diff)
downloadpfsense-ec5c28cde6f09fcdf68e28e11a3e44eb8f4cadb9.zip
pfsense-ec5c28cde6f09fcdf68e28e11a3e44eb8f4cadb9.tar.gz
Gateway Monitor Advanced Settings
Recommended changes made to calculated value input behavior. Restrict interval to integer of 1 or greater.
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php27
1 files changed, 24 insertions, 3 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index c41de63..f28a34d 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -537,7 +537,8 @@ function monitor_change() {
document.iform.monitor.disabled = document.iform.monitor_disable.checked;
}
-function interval_change() {
+function interval_change(interval_obj) {
+ valid_value(interval_obj, 1, 86400);
calculate_state_change();
calculated_change(document.iform.avg_delay_samples_calculated, document.iform.avg_delay_samples);
@@ -579,6 +580,8 @@ function calculated_change(calculated_obj, samples_obj) {
break;
default:
}
+
+ calculate_state_change();
}
function valid_value(object, min, max) {
@@ -595,14 +598,32 @@ function calculate_state_change() {
document.iform.avg_delay_samples_calculated.disabled = false;
document.iform.avg_loss_samples_calculated.disabled = false;
document.iform.avg_loss_delay_samples_calculated.disabled = false;
+
+ document.iform.avg_delay_samples.disabled = document.iform.avg_delay_samples_calculated.checked;
+ document.iform.avg_loss_samples.disabled = document.iform.avg_loss_samples_calculated.checked;
+ document.iform.avg_loss_delay_samples.disabled = document.iform.avg_loss_delay_samples_calculated.checked;
}
else {
document.iform.avg_delay_samples_calculated.disabled = true;
document.iform.avg_loss_samples_calculated.disabled = true;
document.iform.avg_loss_delay_samples_calculated.disabled = true;
document.iform.interval.value = '';
+
+ document.iform.avg_delay_samples.disabled = false;
+ document.iform.avg_loss_samples.disabled = false;
+ document.iform.avg_loss_delay_samples.disabled = false;
+
+ document.iform.avg_delay_samples_calculated.checked = false;
+ document.iform.avg_loss_samples_calculated.checked = false;
+ document.iform.avg_loss_delay_samples_calculated.checked = false;
}
}
+
+function enable_change() {
+ document.iform.avg_delay_samples.disabled = false;
+ document.iform.avg_loss_samples.disabled = false;
+ document.iform.avg_loss_delay_samples.disabled = false;
+}
//]]>
</script>
<?php if ($input_errors) print_input_errors($input_errors); ?>
@@ -775,7 +796,7 @@ function calculate_state_change() {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Probe Interval");?></td>
<td width="78%" class="vtable">
<input name="interval" type="text" class="formfld unknown" id="interval" size="2"
- value="<?=htmlspecialchars($pconfig['interval']);?>" onchange="interval_change()" />
+ value="<?=htmlspecialchars($pconfig['interval']);?>" onchange="interval_change(this)" />
<br/><span class="vexpl">
<?=gettext(sprintf("How often that an ICMP probe will be sent in seconds. Default is %d.", $apinger_default['interval']));?><br/><br/>
<?=gettext("NOTE: The quality graph is averaged over seconds, not intervals, so as the probe interval is increased the accuracy of the quality graph is decreased.");?>
@@ -840,7 +861,7 @@ function calculate_state_change() {
<tr>
<td width="22%" valign="top">&nbsp;</td>
<td width="78%">
- <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" /> <input type="button" value="<?=gettext("Cancel");?>" class="formbtn" onclick="history.back()" />
+ <input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change()" /> <input type="button" value="<?=gettext("Cancel");?>" class="formbtn" onclick="history.back()" />
<?php if (isset($id) && $a_gateways[$id]): ?>
<input name="id" type="hidden" value="<?=htmlspecialchars($id);?>" />
<?php endif; ?>
OpenPOWER on IntegriCloud