summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Tittelbach <bernhard@tittelbach.org>2014-10-24 23:31:58 +0200
committerBernhard Tittelbach <bernhard@tittelbach.org>2014-10-24 23:33:10 +0200
commit8a675821cf93668766979bc75bd6cd4dca32e559 (patch)
treee6a704b974117d2c57ec009043c1bef6ed3823da
parenthub: Add retry to DB append in case of error. (diff)
start with last 10 minutes
-rw-r--r--src/viz/index.js5
1 files changed, 3 insertions, 2 deletions
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') {