From 40aa56f7217fd717e8b4ee4700b0e72fe79d7157 Mon Sep 17 00:00:00 2001 From: Hannes Klinckaert Date: Tue, 8 Oct 2019 18:04:42 +0200 Subject: [PATCH] added route --- watcher/static/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/watcher/static/index.js b/watcher/static/index.js index 37bc8dd..abba472 100644 --- a/watcher/static/index.js +++ b/watcher/static/index.js @@ -46,19 +46,23 @@ require(['jquery', 'socket.io'], function(jq, io) { socket.on('live_request', function(request_data) { console.log("live request"); 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 timesting = request_time.getHours() + ":" + request_time.getMinutes(); + let route = link_route; let html = `
${hostname}
+
+ ${route} +
${timesting}