NTP enhancements

- Add new parameter "NTP interval", this can be useful when you run your own NTP servers
- Add pool support, this allows a round-robin selection of NTP servers out of a pool, and improves server availability
This commit is contained in:
bergware
2024-11-01 21:47:05 +01:00
parent 092c6e0445
commit f7cb0f2f00
3 changed files with 30 additions and 5 deletions

View File

@@ -59,6 +59,14 @@ _(Use NTP)_:
:use_ntp_help:
_(NTP interval)_:
: <select name="display_ntppoll">
<?=mk_option(_var($display,'ntppoll'), "", _('Default'))?>
<?=mk_option(_var($display,'ntppoll'), "8", _('Slow'))?>
<?=mk_option(_var($display,'ntppoll'), "5", _('Medium'))?>
<?=mk_option(_var($display,'ntppoll'), "3", _('Fast'))?>
</select><span class="ntp orange-text">_(Use DEFAULT setting when public NTP servers are defined)_</span>
_(NTP server)_ 1:
: <input type="text" name="NTP_SERVER1" maxlength="40" class="narrow" value="<?=htmlspecialchars($var['NTP_SERVER1'])?>">
@@ -107,12 +115,14 @@ function presetTime(form) {
function checkDateTimeSettings(form) {
if (form.USE_NTP.value=="yes") {
form.newDateTime.disabled=true;
form.display_ntppoll.disabled=false;
form.NTP_SERVER1.disabled=false;
form.NTP_SERVER2.disabled=false;
form.NTP_SERVER3.disabled=false;
form.NTP_SERVER4.disabled=false;
} else {
form.newDateTime.disabled=false;
form.display_ntppoll.disabled=true;
form.NTP_SERVER1.disabled=true;
form.NTP_SERVER2.disabled=true;
form.NTP_SERVER3.disabled=true;

View File

@@ -0,0 +1 @@
span.ntp{margin-left:40px}