You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
861 B
32 lines
861 B
2 months ago
|
$(document).ready(function () {
|
||
|
|
||
|
check_status();
|
||
|
setInterval(() => check_status(), 25000);
|
||
|
|
||
|
function check_status()
|
||
|
{
|
||
|
|
||
|
$.each($('.server_status'), function(e) {
|
||
|
var message = {
|
||
|
url: $(this).data('url'),
|
||
|
}
|
||
|
$.ajax({
|
||
|
type:'POST',
|
||
|
url: '/server_status',
|
||
|
processData: false, // tell jQuery not to process the data
|
||
|
contentType: false, // tell jQuery not to set contentType
|
||
|
data: JSON.stringify(message),
|
||
|
success: (data) => {
|
||
|
$(this).html(data['status']+' '+data['ssl_status']);
|
||
|
$(this).css( "color", data['status_color'] );
|
||
|
},
|
||
|
error:function (jqXHR, exception) {
|
||
|
|
||
|
}
|
||
|
});
|
||
|
})
|
||
|
|
||
|
}
|
||
|
|
||
|
});
|