messaging subsystem wip

This commit is contained in:
Sebastien
2020-02-19 08:02:58 -05:00
parent 8c3a52d40c
commit 4de4e07d99
28 changed files with 369 additions and 143 deletions

View File

@@ -646,12 +646,24 @@ function refreshAPHTML(data){
$( "#wifi-list" ).html(h)
}
function getMessages() {
$.getJSON("/messages.json", function(data) {
data.forEach(function(msg) {
});
})
.fail(function(xhr, ajaxOptions, thrownError) {
console.log(xhr.status);
console.log(thrownError);
if (thrownError != '') showMessage(thrownError, 'ERROR');
});
}
function checkStatus(){
RepeatCheckStatusInterval();
if (!enableStatusTimer) return;
if (blockAjax) return;
blockAjax = true;
getMessages();
$.getJSON( "/status.json", function( data ) {
if (data.hasOwnProperty('ssid') && data['ssid'] != ""){
if (data["ssid"] === selectedSSID){
@@ -881,6 +893,7 @@ function getConfig() {
});
}
function showMessage(message, severity) {
if (severity == 'INFO') {
$('#message').css('background', '#6af');