commit
50bc5068a7
11
app.js
11
app.js
@ -65,7 +65,10 @@ api.on('connection', function(spark) {
|
|||||||
|
|
||||||
if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id))
|
if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id))
|
||||||
{
|
{
|
||||||
spark.emit('history', Nodes.getHistory().getHistoryRequestInterval());
|
var range = Nodes.getHistory().getHistoryRequestInterval();
|
||||||
|
console.log("asked " + data.id + " for history");
|
||||||
|
console.log('interval', range);
|
||||||
|
spark.emit('history', range);
|
||||||
askedForHistory = true;
|
askedForHistory = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,13 +92,17 @@ api.on('connection', function(spark) {
|
|||||||
|
|
||||||
if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id))
|
if(Nodes.getHistory().requiresUpdate() && !askedForHistory && Nodes.canNodeUpdate(data.id))
|
||||||
{
|
{
|
||||||
spark.emit('history', Nodes.getHistory().getHistoryRequestInterval());
|
var range = Nodes.getHistory().getHistoryRequestInterval();
|
||||||
|
console.log("asked " + data.id + " for history");
|
||||||
|
console.log('interval', range);
|
||||||
|
spark.emit('history', range);
|
||||||
askedForHistory = true;
|
askedForHistory = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
spark.on('history', function(data){
|
spark.on('history', function(data){
|
||||||
|
console.log("got history from " + data.id);
|
||||||
client.write({action: 'charts', data: Nodes.addHistory(data.id, data.history)});
|
client.write({action: 'charts', data: Nodes.addHistory(data.id, data.history)});
|
||||||
askedForHistory = false;
|
askedForHistory = false;
|
||||||
});
|
});
|
||||||
|
@ -275,7 +275,7 @@ angular.module('netStatsApp.filters', [])
|
|||||||
var tooltip = [];
|
var tooltip = [];
|
||||||
var string = '';
|
var string = '';
|
||||||
|
|
||||||
if(node.info.node !== '') {
|
if(node.info.node !== '' && typeof node.info.node !== 'undefined') {
|
||||||
var eth_version = node.info.node.split('/');
|
var eth_version = node.info.node.split('/');
|
||||||
|
|
||||||
if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.')
|
if(eth_version[1][0] !== 'v' && eth_version[1][2] !== '.')
|
||||||
|
Loading…
Reference in New Issue
Block a user