From 8a675821cf93668766979bc75bd6cd4dca32e559 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Fri, 24 Oct 2014 23:31:58 +0200 Subject: start with last 10 minutes --- src/viz/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/viz/index.js') diff --git a/src/viz/index.js b/src/viz/index.js index a984cb6..31b6880 100644 --- a/src/viz/index.js +++ b/src/viz/index.js @@ -1,6 +1,7 @@ var qintv_ms = 5000; var uripart = "/updates?"; -var lastfrom = ""; +//var lastfrom = ""; +var lastfrom = "from="+(new Date(Date.now() - 600000)).toISOString(); var possible_display_functions = {"Off":"none", "Value":showvalue, "Gauge":showgauge, "Graph":showasgraph}; var stuff_to_display = {"clients":"none","*":showvalue,"client-count":showasgraph, "bytes-sent":showasgraph, "fuckups-per-second":showasgraph}; var sidseen = []; @@ -101,8 +102,8 @@ function graphS5Status(data) { lastfrom = "from="+stream["start-time"]; var jsdate = new Date(stream["start-time"]); qintv_ms = stream["duration-ms"]; //doesnt really change anything yet + jsdate = new Date(jsdate.getTime() + qintv_ms); var data = stream.data; - console.log(data); for (var key in data) { showasetting(key); if (typeof(stuff_to_display[key]) == 'function') { -- cgit v1.2.3