added table order

pull/5/head
cubedro 10 years ago
parent 2a7cf566f3
commit e764147d2a
  1. 3
      public/js/controllers.js
  2. 6
      views/index.jade

@ -25,6 +25,9 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
$scope.nodes = []; $scope.nodes = [];
$scope.map = []; $scope.map = [];
$scope.predicate = ['-stats.block.number', 'stats.block.propagation'];
$scope.reverse = false;
$scope.timeout = setInterval(function(){ $scope.timeout = setInterval(function(){
$scope.$apply(); $scope.$apply();
}, 1000); }, 1000);

@ -106,7 +106,7 @@ block content
thead thead
tr.text-info tr.text-info
th th
i.icon-node(data-toggle="tooltip", data-placement="top", title="Node") i.icon-node(data-toggle="tooltip", data-placement="top", title="Node name", ng-click="predicate = 'info.name'; reverse=!reverse")
th.th-nodename th.th-nodename
i.icon-laptop(data-toggle="tooltip", data-placement="top", title="Node type") i.icon-laptop(data-toggle="tooltip", data-placement="top", title="Node type")
th.th-latency th.th-latency
@ -118,7 +118,7 @@ block content
th th
i.icon-network(data-toggle="tooltip", data-placement="top", title="Pending transactions") i.icon-network(data-toggle="tooltip", data-placement="top", title="Pending transactions")
th th
i.icon-block(data-toggle="tooltip", data-placement="top", title="Last node block") i.icon-block(data-toggle="tooltip", data-placement="top", title="Last block", ng-click="predicate = ['-stats.block.number', 'stats.block.propagation']; reverse=!reverse")
th.th-blockhash   th.th-blockhash  
th th
i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions") i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions")
@ -129,7 +129,7 @@ block content
th th
i.icon-bulb(data-toggle="tooltip", data-placement="top", title="Up-time") i.icon-bulb(data-toggle="tooltip", data-placement="top", title="Up-time")
tbody tbody
tr(ng-repeat='node in nodes', class="{{ node.stats | mainClass : bestBlock }}") tr(ng-repeat='node in nodes | orderBy:predicate:reverse', class="{{ node.stats | mainClass : bestBlock }}")
td(rel="{{node.id}}") td(rel="{{node.id}}")
span.small(data-toggle="tooltip", data-placement="top", data-original-title="{{node.geo | geoTooltip}}") {{node.info.name}} span.small(data-toggle="tooltip", data-placement="top", data-original-title="{{node.geo | geoTooltip}}") {{node.info.name}}
span.small &nbsp({{node.info.ip}}) span.small &nbsp({{node.info.ip}})

Loading…
Cancel
Save