$(document).ready(function() {
(function update_table(){
$.ajax({
url: "monitor/all",
type: "GET",
dataType: "json",
success: function(response) {
var trHTML = '';
$.each(response, function(key, value) {
trHTML += '<tr><td>' + value.id + '</td><td>' + value.url + '</td><td>' + value.exceptedHttpResponseCode + '</td><td>' + value.status + '</td><td>' + value.active + '</td></tr>';
});
$('#monitorTable').append(trHTML);
setTimeout(update_table,2000);
}
});
})();
});