diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index 327d4561..000084b0 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -171,7 +171,7 @@ available_notification_agents = notifiers.available_notification_agents()
- +

e.g. localhost or an IP, such as 0.0.0.0

@@ -180,7 +180,7 @@ available_notification_agents = notifiers.available_notification_agents()
- +
@@ -194,18 +194,18 @@ available_notification_agents = notifiers.available_notification_agents()

Enable HTTPS for web server for encrypted communication.

- +
- +
@@ -221,7 +221,7 @@ available_notification_agents = notifiers.available_notification_agents()
- +

Username for web server authentication. Leave empty to disable.

@@ -230,7 +230,7 @@ available_notification_agents = notifiers.available_notification_agents()
- +

Password for web server authentication. Leave empty to disable.

@@ -399,7 +399,7 @@ available_notification_agents = notifiers.available_notification_agents()

Instead of polling the server at regular intervals let the server tell us when something happens. This is currently experimental. Encrypted websocket is not currently supported.

@@ -983,6 +983,22 @@ available_notification_agents = notifiers.available_notification_agents() + @@ -1003,6 +1019,19 @@ $(document).ready(function() { window.location.hash = e.target.hash.replace("#", "#" + prefix); }); + // Global Variables + serverChanged = false; + authChanged = false; + httpChanged = false; + monitorChanged = false; + + // Alert the user that their changes require a restart. + function postSaveChecks() { + if ((serverChanged && $('#monitoring_use_websocket').is(":checked")) || authChanged || httpChanged || monitorChanged) { + $('#restart-modal').modal('show'); + } + } + var configForm = $("#configUpdate"); $('.save-button').click(function() { if ($("#pms_identifier").val() == "") { @@ -1010,6 +1039,7 @@ $(document).ready(function() { } else { if (configForm.parsley().validate()) { doAjaxCall('configUpdate',$(this),'tabs',true); + postSaveChecks(); return false; } else { showMsg(' Please verify your settings.',false,true,2000,true) @@ -1036,6 +1066,10 @@ $(document).ready(function() { window.location.href = "checkGithub"; }); + $("#modal_link_restart").click(function() { + window.location.href = "restart"; + }); + if ($("#api_enabled").is(":checked")) { $("#apioptions").show(); } else { @@ -1076,7 +1110,20 @@ $(document).ready(function() { } }); + $( ".http-settings" ).change(function() { + httpChanged = true; + }); + + $( ".auth-settings" ).change(function() { + authChanged = true; + }); + + $( ".monitor-settings" ).change(function() { + monitorChanged = true; + }); + $( ".pms-settings" ).change(function() { + serverChanged = true; $("#pms_identifier").val(""); $("#pms-verify-status").html(""); verifyServer(); @@ -1138,11 +1185,11 @@ $(document).ready(function() { 'Authorization': 'Basic ' + btoa($("#pms_username").val() + ':' + $("#pms_password").val()) }, error: function(jqXHR, textStatus, errorThrown) { - $("#pms-token-status").html(' Authentation failed!'); + $("#pms-token-status").html(' Authentication failed!'); }, success: function (xml) { var authToken = $(xml).find('user').attr('authenticationToken'); - $("#pms-token-status").html(' Authentation successful!'); + $("#pms-token-status").html(' Authentication successful!'); $("#pms_token").val(authToken); $('#pms-auth-modal').modal('hide'); }