CC-2363: Diagnostic screen in Web UI
-working with ajax now!
This commit is contained in:
parent
787e0375ed
commit
19d61ad780
5 changed files with 71 additions and 43 deletions
20
airtime_mvc/public/js/airtime/status/status.js
Normal file
20
airtime_mvc/public/js/airtime/status/status.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
function success(data, textStatus, jqXHR){
|
||||
var services = data.status.services;
|
||||
|
||||
for (var i=0; i<services.length; i++){
|
||||
var children = $("#"+services[i].name).children();
|
||||
console.log(services[i].status);
|
||||
$($(children[1]).children()[0]).attr("class", services[i].status ? "checked-icon": "not-available-icon");
|
||||
$(children[2]).text(services[i].uptime_seconds);
|
||||
}
|
||||
}
|
||||
|
||||
function updateStatus(){
|
||||
$.getJSON( "api/status/format/json", null, success);
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
updateStatus();
|
||||
setInterval(updateStatus, 5000);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue