Merge branch 'master' of ssh://git.zeus.gent:2222/kelder/rubygoldberg-tracker

This commit is contained in:
Maxime Bloch 2019-10-08 18:14:45 +02:00
commit b8614879ba
No known key found for this signature in database
GPG key ID: CE32A7D95B7D6418

View file

@ -46,19 +46,23 @@ require(['jquery', 'socket.io'], function(jq, io) {
socket.on('live_request', function(request_data) { socket.on('live_request', function(request_data) {
console.log("live request"); console.log("live request");
request_time = new Date(request_data["time"] * 1000); request_time = new Date(request_data["time"] * 1000);
addLiveRequest(request_data["hostname"], request_time); addLiveRequest(request_data["hostname"], request_time, request_data["route"]);
}); });
}); });
function addLiveRequest(request_host, request_time) { function addLiveRequest(request_host, request_time, link_route) {
let hostname = request_host; let hostname = request_host;
let timesting = request_time.getHours() + ":" + request_time.getMinutes(); let timesting = request_time.getHours() + ":" + request_time.getMinutes();
let route = link_route;
let html = ` let html = `
<div class="item"> <div class="item">
<div> <div>
${hostname} ${hostname}
</div> </div>
<div>
${route}
</div>
<div> <div>
${timesting} ${timesting}
</div> </div>