Added the facility to accept an alarm from the web interface ("/acceptalarm" url), and added button to web interface page.

This commit is contained in:
Graham Jones
2017-05-07 20:13:54 +01:00
parent b0b61b9fd2
commit 98f6af1083
4 changed files with 19 additions and 5 deletions

View File

@@ -59,8 +59,9 @@
</div>
</div>
<div id="settingsDiv">
<h2>Seizure Detector Settings</h2>
<button id="muteButton">Mute Alarm</button>
<h2>Seizure Detector Settings</h2>
<button id="acceptButton">Accept Alarm</button>
<button id="muteButton">Mute Alarm</button>
<div id="sdSettings">
SD Settings
</div>

View File

@@ -162,7 +162,11 @@ toggleMute = function() {
sd_muted = 1;
$("#muteButton").text("Un-mute Audible Alarm");
}
}
};
acceptAlarm = function() {
$.ajax({url:"/acceptalarm"});
};
$(document).ready(function() {
sd_muted = 0;
@@ -173,4 +177,5 @@ $(document).ready(function() {
setInterval("get_settings();",10000);
setInterval("get_spectrum();",5000);
$("#muteButton").click(toggleMute);
$("#acceptButton").click(acceptAlarm);
});