added pending as a separate call
This commit is contained in:
@@ -155,6 +155,9 @@ netStatsApp.controller('StatsCtrl', function($scope, $filter, socket, _, toastr)
|
||||
|
||||
if( index >= 0 && !_.isUndefined($scope.nodes[index]) && !_.isUndefined($scope.nodes[index].stats) )
|
||||
{
|
||||
if( !_.isUndefined($scope.nodes[index].stats.latency) )
|
||||
data.stats.latency = $scope.nodes[index].stats.latency;
|
||||
|
||||
if( _.isUndefined(data.stats.hashrate) )
|
||||
data.stats.hashrate = 0;
|
||||
|
||||
@@ -178,6 +181,19 @@ netStatsApp.controller('StatsCtrl', function($scope, $filter, socket, _, toastr)
|
||||
|
||||
break;
|
||||
|
||||
case "pending":
|
||||
var index = findIndex({id: data.id});
|
||||
|
||||
if( !_.isUndefined(data.id) && index >= 0 )
|
||||
{
|
||||
var node = $scope.nodes[index];
|
||||
|
||||
if( !_.isUndefined(node) && !_.isUndefined(node.stats) && !_.isUndefined(node.stats.pending) )
|
||||
$scope.nodes[index].stats.pending = data.pending;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "info":
|
||||
var index = findIndex({id: data.id});
|
||||
|
||||
@@ -263,6 +279,7 @@ netStatsApp.controller('StatsCtrl', function($scope, $filter, socket, _, toastr)
|
||||
var node = $scope.nodes[index];
|
||||
|
||||
if( !_.isUndefined(node) && !_.isUndefined(node.stats) && !_.isUndefined(node.stats.latency) )
|
||||
// console.log(data.latency);
|
||||
$scope.nodes[index].stats.latency = data.latency;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user