config: introduce maxAge setting

This commit is contained in:
Nils Schneider 2015-04-26 13:12:11 +02:00
commit 115444f1cb
3 changed files with 8 additions and 2 deletions

View file

@ -22,7 +22,7 @@ function (config, moment, Router, L, GUI, numeral) {
})
var now = moment()
var age = moment(now).subtract(14, "days")
var age = moment(now).subtract(config.maxAge, "days")
var newnodes = limit("firstseen", age, sortByKey("firstseen", nodes).filter(online))
var lostnodes = limit("lastseen", age, sortByKey("lastseen", nodes).filter(offline))