[TASK] Remove unnecessary moment
This commit is contained in:
parent
712c3f21ce
commit
2192500d05
@ -1,5 +1,5 @@
|
|||||||
define(['sorttable', 'snabbdom', 'd3-interpolate', 'moment', 'helper', 'utils/node'],
|
define(['sorttable', 'snabbdom', 'd3-interpolate', 'helper', 'utils/node'],
|
||||||
function (SortTable, V, d3Interpolate, moment, helper, nodef) {
|
function (SortTable, V, d3Interpolate, helper, nodef) {
|
||||||
'use strict';
|
'use strict';
|
||||||
V = V.default;
|
V = V.default;
|
||||||
|
|
||||||
|
@ -20,8 +20,7 @@ define(['moment', 'utils/router', 'leaflet', 'gui', 'helper', 'utils/language'],
|
|||||||
node.lastseen = moment.utc(node.lastseen).local();
|
node.lastseen = moment.utc(node.lastseen).local();
|
||||||
});
|
});
|
||||||
|
|
||||||
var now = moment();
|
var age = moment().subtract(config.maxAge, 'days');
|
||||||
var age = moment(now).subtract(config.maxAge, 'days');
|
|
||||||
|
|
||||||
var online = nodes.filter(function (d) {
|
var online = nodes.filter(function (d) {
|
||||||
return d.is_online;
|
return d.is_online;
|
||||||
@ -58,7 +57,7 @@ define(['moment', 'utils/router', 'leaflet', 'gui', 'helper', 'utils/language'],
|
|||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
now: now,
|
now: moment(),
|
||||||
timestamp: moment.utc(timestamp).local(),
|
timestamp: moment.utc(timestamp).local(),
|
||||||
nodes: {
|
nodes: {
|
||||||
all: nodes,
|
all: nodes,
|
||||||
|
Loading…
Reference in New Issue
Block a user