commit
45c5b47505
@ -23,7 +23,8 @@ var Node = function Node(data)
|
||||
arrival: 0,
|
||||
propagation: 0,
|
||||
received: 0,
|
||||
transactions: []
|
||||
transactions: [],
|
||||
uncles: []
|
||||
},
|
||||
blocktimeAvg: 0,
|
||||
blockTimes: [],
|
||||
|
@ -17,4 +17,7 @@
|
||||
.icon-clock:before { content: '\e80f'; } /* '' */
|
||||
.icon-group:before { content: '\e810'; } /* '' */
|
||||
.icon-gas:before { content: '\e811'; } /* '' */
|
||||
.icon-difficulty:before { content: '\e812'; } /* '' */
|
||||
.icon-difficulty:before { content: '\e812'; } /* '' */
|
||||
.icon-uncle:before { content: '\e813'; } /* '' */
|
||||
.icon-hashrate:before { content: '\e814'; } /* '' */
|
||||
.icon-gasprice:before { content: '\e815'; } /* '' */
|
File diff suppressed because one or more lines are too long
@ -17,4 +17,7 @@
|
||||
.icon-clock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-group { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-gas { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-difficulty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-difficulty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-uncle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-hashrate { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-gasprice { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
@ -2,14 +2,14 @@
|
||||
font-family: 'minimal-icons';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
||||
|
||||
/* fix buttons height */
|
||||
line-height: 1em;
|
||||
|
||||
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
}
|
||||
|
||||
|
||||
.icon-truck { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-database { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-mining { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
@ -28,4 +28,7 @@
|
||||
.icon-clock { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-group { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-gas { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-difficulty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-difficulty { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-uncle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-hashrate { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-gasprice { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
@ -1,10 +1,10 @@
|
||||
@font-face {
|
||||
font-family: 'minimal-icons';
|
||||
src: url('../fonts/minimal-icons.eot?55431205');
|
||||
src: url('../fonts/minimal-icons.eot?55431205#iefix') format('embedded-opentype'),
|
||||
url('../fonts/minimal-icons.woff?55431205') format('woff'),
|
||||
url('../fonts/minimal-icons.ttf?55431205') format('truetype'),
|
||||
url('../fonts/minimal-icons.svg?55431205#minimal-icons') format('svg');
|
||||
src: url('../fonts/minimal-icons.eot?7541141');
|
||||
src: url('../fonts/minimal-icons.eot?7541141#iefix') format('embedded-opentype'),
|
||||
url('../fonts/minimal-icons.woff?7541141') format('woff'),
|
||||
url('../fonts/minimal-icons.ttf?7541141') format('truetype'),
|
||||
url('../fonts/minimal-icons.svg?7541141#minimal-icons') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@ -14,7 +14,7 @@
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'minimal-icons';
|
||||
src: url('../fonts/minimal-icons.svg?55431205#minimal-icons') format('svg');
|
||||
src: url('../fonts/minimal-icons.svg?7541141#minimal-icons') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
@ -46,6 +46,10 @@
|
||||
/* you can be more comfortable with increased icons size */
|
||||
/* font-size: 120%; */
|
||||
|
||||
/* Font smoothing. That was taken from TWBS */
|
||||
/*-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;*/
|
||||
|
||||
/* Uncomment for 3D effect */
|
||||
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||
}
|
||||
@ -68,4 +72,7 @@
|
||||
.icon-clock:before { content: '\e80f'; } /* '' */
|
||||
.icon-group:before { content: '\e810'; } /* '' */
|
||||
.icon-gas:before { content: '\e811'; } /* '' */
|
||||
.icon-difficulty:before { content: '\e812'; } /* '' */
|
||||
.icon-difficulty:before { content: '\e812'; } /* '' */
|
||||
.icon-uncle:before { content: '\e813'; } /* '' */
|
||||
.icon-hashrate:before { content: '\e814'; } /* '' */
|
||||
.icon-gasprice:before { content: '\e815'; } /* '' */
|
@ -7,14 +7,14 @@ body {
|
||||
min-width: 1900px;
|
||||
font-smooth: auto;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
table td {
|
||||
font-size: 14px;
|
||||
white-space: nowrap !important;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
}
|
||||
|
||||
.propagationBox {
|
||||
@ -115,8 +115,13 @@ div.small-title-miner {
|
||||
}
|
||||
|
||||
span.small-title span.small {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
line-height: 16px;
|
||||
letter-spacing: 0px;
|
||||
color: #666;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
}
|
||||
|
||||
.big-info .big-details {
|
||||
@ -127,8 +132,12 @@ span.small-title span.small {
|
||||
letter-spacing: -4px;
|
||||
}
|
||||
|
||||
.big-info.chart {
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.big-info.chart .big-details {
|
||||
padding-top: 15px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
.big-info.chart {
|
||||
@ -143,13 +152,13 @@ span.small-title span.small {
|
||||
|
||||
.blocks-holder {
|
||||
width: 288px;
|
||||
padding-top: 5px;
|
||||
padding-top: 6px;
|
||||
margin-left: -2px;
|
||||
}
|
||||
|
||||
.blocks-holder {
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
}
|
||||
|
||||
.blocks-holder div.small-title-miner {
|
||||
@ -187,24 +196,33 @@ span.small-title span.small {
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
.page-latency {
|
||||
position: absolute;
|
||||
top: 395px;
|
||||
left: 15px;
|
||||
.second-row .box {
|
||||
height: 40px;
|
||||
line-height: 24px !important;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.page-latency .small-title {
|
||||
letter-spacing: 0px;
|
||||
opacity: .8;
|
||||
.second-row .box i {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
left: -3px;
|
||||
font-size: 24px;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
margin-right: 7px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.tableHolder {
|
||||
padding-top: 20px;
|
||||
padding-right: 20px;
|
||||
.second-row .box .small-value {
|
||||
font-weight: 300;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
float: right;
|
||||
}
|
||||
|
||||
table i {
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
}
|
||||
|
||||
table th,
|
||||
@ -274,13 +292,11 @@ table td.peerPropagationChart {
|
||||
}
|
||||
|
||||
#mapHolder {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-bottom: 56.25%;
|
||||
height: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 284px;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
#mapHolder > svg {
|
||||
@ -395,7 +411,7 @@ svg .axis text {
|
||||
font-family: "Source Sans Pro";
|
||||
font-weight: 700;
|
||||
-webkit-font-smoothing: subpixel-antialiased;
|
||||
-moz-font-smoothing: subpixel-antialiased;
|
||||
-moz-osx-font-smoothing: auto;
|
||||
}
|
||||
|
||||
svg .y.axis .tick:first-child text {
|
||||
|
Binary file not shown.
@ -25,6 +25,9 @@
|
||||
<glyph glyph-name="group" unicode="" d="m500 429c-58 0-105 48-105 106 0 59 47 107 105 107 58 0 106-48 106-107 0-58-48-106-106-106z m0 181c-40 0-74-33-74-75s34-75 74-75c41 0 74 34 74 75s-33 75-74 75z m243-356h-31c0 63-97 115-211 115-115 0-212-52-212-115h-31c0 82 107 147 243 147 136 0 242-65 242-147z m-544 327c-50 0-91 41-91 90 0 50 41 91 91 91 50 0 91-41 91-91 0-49-41-90-91-90z m0 149c-33 0-60-26-60-59 0-32 27-59 60-59 33 0 60 27 60 59 0 33-27 59-60 59z m181-309h-32c0 57-63 99-150 99-88 0-151-42-151-99h-31c0 75 76 130 182 130 105 0 182-55 182-130z m422 158c-50 0-90 41-90 91 0 50 40 91 90 91s91-41 91-91c0-50-41-91-91-91z m0 151c-32 0-59-27-59-60 0-33 27-59 59-59s60 26 60 59c0 33-27 60-60 60z m182-309h-31c0 58-63 100-150 100-88 0-151-42-151-100h-31c0 76 76 131 182 131 105 0 181-55 181-131z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="gas" unicode="" d="m500 16c-267 0-484 217-484 484 0 103 32 202 93 285l25-19c-57-77-86-169-86-266 0-250 203-453 452-453 250 0 452 203 452 453 0 250-202 453-452 453-79 0-156-20-224-59l-15 27c72 41 155 63 239 63 267 0 484-217 484-484 0-267-217-484-484-484z m280 453l-13 28 66 28c-6 179-153 322-333 322-183 0-333-149-333-332h-31c0 201 163 364 364 364 201 0 364-163 364-364v-10l-84-36z m-280-270v31c25 0 45 20 45 44 0 44-24 259-45 309-21-50-45-265-45-309h-31c0 18 7 102 18 181 21 154 40 167 58 167 19 0 37-13 58-167 11-79 18-163 18-181 0-41-34-75-76-75z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="difficulty" unicode="" d="m498 21c-9 0-17 3-23 9l-450 450c-12 13-12 33 0 45l140 140c-23 6-43 17-60 34-24 24-38 57-38 92s14 67 38 92c25 25 57 38 92 38s68-13 92-38c25-25 39-58 38-93l-31 0c0 27-10 52-29 71-19 19-43 29-70 29-26 0-51-11-70-29-18-19-29-44-29-70 0-26 11-51 29-70 19-19 45-30 71-29l39 0-190-189 450-451 452 450-140 141c-6-23-17-43-34-60-25-24-57-38-92-38s-67 14-92 38c-25 25-38 57-38 92 0 35 13 68 38 92 17 17 37 29 60 34l-153 152-30-29-22 22 29 29c13 13 33 13 46 0l201-201-38 0c-27 1-52-10-71-29-19-19-29-43-29-70s10-51 29-70c19-18 44-29 70-29s51 11 70 29c19 19 29 44 29 71l-1 39 190-190c6-6 9-14 9-22s-3-17-9-23l-450-450c-6-6-15-9-23-9z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="uncle" unicode="" d="m659 0c-125 0-228 102-228 228 0 41 11 81 32 116l-75 75c-28-17-60-25-92-25-101 0-182 81-182 182s81 182 182 182v-31c-84 0-151-68-151-151s68-151 151-151c30 0 60 9 85 27l11 7 111-111-7-11c-22-32-33-70-33-109 0-109 88-197 196-197s196 88 196 197-88 196-196 196c-46 0-90-16-125-45l-11-9-110 110 7 10c17 26 27 55 27 86 0 27-8 53-22 77l-6 10 128 129 11-6c15-9 31-13 48-13 54 0 98 44 98 98s-44 98-98 98c-16 0-32-4-46-11-32-18-52-51-52-87 0-17 5-34 13-48l6-11-117-117-22 22 100 101c-7 17-11 35-11 53 0 48 26 92 69 114 18 10 39 15 60 15 71 0 129-58 129-129 0-71-58-129-129-129-18 0-36 4-53 11l-95-95c13-26 20-54 20-82 0-33-9-64-25-92l72-72c39 28 86 43 134 43 125 0 228-102 228-227s-103-228-228-228z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="hashrate" unicode="" d="m367 39c-163 37-286 115-340 215-31 57-35 117-13 175l7 20 17-13c80-62 99-64 103-63 4 8-2 42-7 70-8 49-19 110-10 170 17 110 96 175 235 195l24 3-7-23c-15-52-8-91 19-109 31-21 85-11 127 23 67 53 85 142 48 239l-15 38 36-19c271-138 195-309 158-391-7-17-16-37-15-43 3-5 32-40 69-37 39 2 78 46 113 126l12 30 16-28c63-115 73-229 30-331-49-114-161-203-307-242l-8 30c137 37 241 119 286 225 36 84 31 178-14 274-37-74-80-113-128-115-54-3-92 45-97 54-9 16 1 37 15 69 35 81 94 213-110 333 24-95-1-182-69-236-54-43-121-54-164-25-21 14-51 47-37 120-111-21-172-75-186-164-8-55 2-114 10-161 7-44 12-73 2-91-4-8-11-13-20-14-17-4-43 5-111 55-10-43-4-87 19-129 48-91 167-165 319-200l-7-30z" horiz-adv-x="1000" />
|
||||
<glyph glyph-name="gasprice" unicode="" d="m430 1c-8 0-16 3-22 9l-398 398c-12 12-12 32 0 44l345 345 22-22-345-345 398-398 494 494c3 17 11 90 18 161 8 75 17 160 25 222l-58 58c-62-8-146-17-221-24-71-8-145-16-162-19l-8-9-23 22 12 12c6 6 7 7 178 25 77 8 165 17 228 25l8 1 79-79-1-8c-8-63-17-151-26-229-17-170-18-171-24-177l-497-497c-6-6-14-9-22-9z m420 771c-21 0-41 8-55 23-15 14-23 34-23 55 0 21 8 40 23 55s34 23 55 23c21 0 40-8 55-23l-22-22c-18 18-49 18-66 0-9-9-14-21-14-33 0-13 5-24 14-33 17-18 48-18 66 0l22-22c-15-15-34-23-55-23z m-430-565l-22 22 177 177c-73-16-121 29-121 30l21 22-10-11 10 11c4-3 80-72 188 36l0 0 23-22-266-265z" horiz-adv-x="1000" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Binary file not shown.
@ -14,11 +14,11 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
$scope.lastDifficulty = 0;
|
||||
$scope.upTimeTotal = 0;
|
||||
$scope.avgBlockTime = 0;
|
||||
$scope.unclesInLast = 0;
|
||||
$scope.uncleCount = 0;
|
||||
$scope.bestStats = {};
|
||||
|
||||
$scope.lastBlocksTime = [];
|
||||
$scope.difficultyChange = [];
|
||||
$scope.difficultyChart = [];
|
||||
$scope.transactionDensity = [];
|
||||
$scope.gasSpending = [];
|
||||
$scope.miners = [];
|
||||
@ -26,7 +26,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
$scope.nodes = [];
|
||||
$scope.map = [];
|
||||
$scope.blockPropagationChart = [];
|
||||
$scope.uncleCount = [];
|
||||
$scope.uncleCountChart = [];
|
||||
|
||||
$scope.latency = 0;
|
||||
|
||||
@ -132,10 +132,10 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
break;
|
||||
|
||||
case "uncleCount":
|
||||
$scope.uncleCount = data;
|
||||
$scope.unclesInLast = data[0];
|
||||
$scope.uncleCountChart = data;
|
||||
$scope.uncleCount = data[0] + data[1];
|
||||
|
||||
jQuery('.spark-uncles').sparkline($scope.uncleCount.reverse(), {type: 'bar', barSpacing: 1});
|
||||
jQuery('.spark-uncles').sparkline($scope.uncleCountChart.reverse(), {type: 'bar', barSpacing: 1});
|
||||
|
||||
break;
|
||||
|
||||
@ -224,7 +224,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
|
||||
$scope.lastBlock = $scope.bestStats.block.received;
|
||||
$scope.lastBlocksTime = $scope.bestStats.blockTimes;
|
||||
$scope.difficultyChange = $scope.bestStats.difficulty;
|
||||
$scope.difficultyChart = $scope.bestStats.difficulty;
|
||||
$scope.transactionDensity = $scope.bestStats.txDensity;
|
||||
$scope.gasSpending = $scope.bestStats.gasSpending;
|
||||
|
||||
@ -233,14 +233,12 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
|
||||
}
|
||||
|
||||
jQuery('.spark-blocktimes').sparkline($scope.lastBlocksTime.reverse(), {type: 'bar', tooltipSuffix: ' s'});
|
||||
jQuery('.spark-difficulty').sparkline($scope.difficultyChange.reverse(), {type: 'bar'});
|
||||
jQuery('.spark-difficulty').sparkline($scope.difficultyChart.reverse(), {type: 'bar'});
|
||||
jQuery('.spark-transactions').sparkline($scope.transactionDensity.reverse(), {type: 'bar'});
|
||||
jQuery('.spark-gasspending').sparkline($scope.gasSpending.reverse(), {type: 'bar'});
|
||||
}
|
||||
|
||||
$scope.lastDifficulty = _.max($scope.nodes, function(node) {
|
||||
return parseInt(node.stats.block.number);
|
||||
}).stats.block.difficulty;
|
||||
$scope.lastDifficulty = $scope.bestStats.block.difficulty;
|
||||
|
||||
$scope.avgBlockTime = _.max($scope.nodes, function(node) {
|
||||
return parseInt(node.stats.block.number);
|
||||
|
@ -60,19 +60,9 @@ angular.module('netStatsApp.directives', []).
|
||||
|
||||
scope.init();
|
||||
|
||||
window.onresize = function() {
|
||||
scope.$apply();
|
||||
};
|
||||
|
||||
scope.$watch('data', function() {
|
||||
scope.map.bubbles(scope.data, bubbleConfig);
|
||||
}, true);
|
||||
|
||||
scope.$watch(function() {
|
||||
return angular.element(window)[0].innerWidth;
|
||||
}, function() {
|
||||
scope.init();
|
||||
});
|
||||
}
|
||||
};
|
||||
}]).
|
||||
@ -85,7 +75,7 @@ angular.module('netStatsApp.directives', []).
|
||||
link: function(scope, element, attrs) {
|
||||
var margin = {top: 0, right: 0, bottom: 0, left: 0};
|
||||
var width = 280 - margin.left - margin.right,
|
||||
height = 50 - margin.top - margin.bottom;
|
||||
height = 63 - margin.top - margin.bottom;
|
||||
|
||||
var TICKS = 40;
|
||||
|
||||
@ -149,7 +139,9 @@ angular.module('netStatsApp.directives', []).
|
||||
svg.append("g")
|
||||
.attr("class", "x axis")
|
||||
.attr("transform", "translate(0," + height + ")")
|
||||
.call(xAxis);
|
||||
.call(xAxis)
|
||||
.selectAll("text")
|
||||
.attr("y", 6);
|
||||
|
||||
svg.append("g")
|
||||
.attr("class", "y axis")
|
||||
|
@ -42,22 +42,22 @@ angular.module('netStatsApp.filters', [])
|
||||
return (! mining ? 'icon-cancel' : 'icon-check');
|
||||
};
|
||||
})
|
||||
.filter('hashpowerClass', function() {
|
||||
return function(mining) {
|
||||
if(! mining)
|
||||
.filter('hashrateClass', function() {
|
||||
return function(mining, active) {
|
||||
if(! mining || ! active)
|
||||
return 'text-gray';
|
||||
|
||||
return 'text-success';
|
||||
};
|
||||
})
|
||||
.filter('hashrateFilter', function() {
|
||||
.filter('hashrateFilter', ['$filter', function(filter) {
|
||||
return function(hashrate) {
|
||||
if(typeof hashrate === 'undefined' || !hashrate)
|
||||
return 0;
|
||||
|
||||
return hashrate/1000;
|
||||
return filter('number')((hashrate/1000).toFixed(2));
|
||||
}
|
||||
})
|
||||
}])
|
||||
.filter('nodeVersion', function($sce) {
|
||||
return function(version) {
|
||||
if(typeof version !== 'undefined')
|
||||
@ -100,6 +100,32 @@ angular.module('netStatsApp.filters', [])
|
||||
return (best - current.block.number <= 1 ? 'text-success' : (best - current.block.number > 1 && best - current.block.number < 4 ? 'text-warning' : 'text-danger'));
|
||||
};
|
||||
})
|
||||
.filter('gasPriceFilter', ['$filter', function(filter) {
|
||||
var numberFilter = filter('number');
|
||||
return function(price) {
|
||||
console.log("--------------------");
|
||||
console.log(price.length);
|
||||
if(price.length < 4)
|
||||
return price + " wei";
|
||||
|
||||
if(price.length < 7)
|
||||
return (price/1000) + " kwei";
|
||||
|
||||
if(price.length < 10)
|
||||
return (price/1000000) + " mwei";
|
||||
|
||||
if(price.length < 13)
|
||||
return (price/1000000000) + " gwei";
|
||||
|
||||
if(price.length < 16)
|
||||
return (price/1000000000000) + " szabo";
|
||||
|
||||
if(price.length < 19)
|
||||
return (price.substr(0, price.length - 15)) + " finney";
|
||||
|
||||
return numberFilter(price.substr(0, price.length - 18)) + " ether";
|
||||
}
|
||||
}])
|
||||
.filter('gasFilter', function() {
|
||||
return function(gas) {
|
||||
return (typeof gas !== 'undefined' ? parseInt(gas) : '?');
|
||||
|
@ -5,7 +5,7 @@
|
||||
$(this).tooltip('hide');
|
||||
});
|
||||
|
||||
$.fn.sparkline.defaults.bar.height = 50;
|
||||
$.fn.sparkline.defaults.bar.height = 63;
|
||||
$.fn.sparkline.defaults.bar.barWidth = 6;
|
||||
$.fn.sparkline.defaults.bar.barSpacing = 2;
|
||||
$.fn.sparkline.defaults.bar.tooltipClassname = 'jqstooltip';
|
||||
|
224
views/index.jade
224
views/index.jade
@ -2,9 +2,6 @@ extends layout
|
||||
|
||||
block content
|
||||
div.container-fluid(ng-controller='StatsCtrl')
|
||||
div.page-latency(ng-cloak)
|
||||
span.small-title page latency:#[ ]
|
||||
span(class="{{ {active: true, latency: latency} | latencyClass }}") {{latency}} ms
|
||||
div.row(ng-cloak)
|
||||
div.col-xs-2.stat-holder
|
||||
div.big-info.nodesactive(class="{{ nodesActive | nodesActiveClass : nodesTotal }}")
|
||||
@ -14,13 +11,21 @@ block content
|
||||
span.small-title active nodes
|
||||
span.big-details {{nodesActive}}/{{nodesTotal}}
|
||||
div.clearfix
|
||||
//- div.col-xs-2.stat-holder
|
||||
//- div.big-info.uptime(class="{{ upTimeTotal | upTimeClass : true }}")
|
||||
//- div.pull-left.icon-full-width
|
||||
//- i.icon-bulb
|
||||
//- div.pull-left
|
||||
//- span.small-title up-time
|
||||
//- span.big-details {{ upTimeTotal | upTimeFilter }}
|
||||
//- div.clearfix
|
||||
div.col-xs-2.stat-holder
|
||||
div.big-info.uptime(class="{{ upTimeTotal | upTimeClass : true }}")
|
||||
div.big-info.bestblock.text-info
|
||||
div.pull-left.icon-full-width
|
||||
i.icon-bulb
|
||||
i.icon-block
|
||||
div.pull-left
|
||||
span.small-title up-time
|
||||
span.big-details {{ upTimeTotal | upTimeFilter }}
|
||||
span.small-title best block
|
||||
span.big-details {{'#'}}{{ bestBlock | number}}
|
||||
div.clearfix
|
||||
div.col-xs-2.stat-holder
|
||||
div.big-info.difficulty.text-info
|
||||
@ -31,12 +36,13 @@ block content
|
||||
span.big-details {{ lastDifficulty | number }}
|
||||
div.clearfix
|
||||
div.col-xs-2.stat-holder
|
||||
div.big-info.bestblock.text-info
|
||||
div.big-info.uncleCount.text-info
|
||||
div.pull-left.icon-full-width
|
||||
i.icon-block
|
||||
i.icon-uncle
|
||||
div.pull-left
|
||||
span.small-title best block
|
||||
span.big-details {{'#'}}{{ bestBlock | number}}
|
||||
span.small-title uncles #[ ]
|
||||
span.small (current / last 50)
|
||||
span.big-details {{ bestStats.block.uncles.length }}/{{ uncleCount }}
|
||||
div.clearfix
|
||||
div.col-xs-2.stat-holder
|
||||
div.big-info.blocktime(class="{{ lastBlock | timeClass : true }}")
|
||||
@ -54,46 +60,55 @@ block content
|
||||
span.small-title avg block time
|
||||
span.big-details {{ avgBlockTime | avgTimeFilter }}
|
||||
div.clearfix
|
||||
|
||||
div.clearfix
|
||||
|
||||
|
||||
div.row(ng-cloak)
|
||||
div.col-xs-6.stats-boxes(style="padding-top: 30px;")
|
||||
div.col-xs-8.stats-boxes(style="padding-top: 0px;")
|
||||
div.row.second-row
|
||||
//- div.col-xs-3.stat-holder.box
|
||||
//- div.active-nodes(class="{{ nodesActive | nodesActiveClass : nodesTotal }}")
|
||||
//- i.icon-node
|
||||
//- span.small-title active nodes
|
||||
//- span.small-value {{nodesActive}}/{{nodesTotal}}
|
||||
div.col-xs-3.stat-holder.box
|
||||
div.difficulty.text-info
|
||||
i.icon-difficulty
|
||||
span.small-title difficulty
|
||||
span.small-value {{ lastDifficulty | number }}
|
||||
div.col-xs-3.stat-holder.box
|
||||
div.gasprice.text-info
|
||||
i.icon-gasprice
|
||||
span.small-title gas price
|
||||
span.small-value {{ bestStats.gasPrice.toString() | gasPriceFilter }}
|
||||
div.col-xs-3.stat-holder.box
|
||||
div.page-latency(class="{{ {active: true, latency: latency} | latencyClass }}")
|
||||
i.icon-clock
|
||||
span.small-title page latency
|
||||
span.small-value {{latency}} ms
|
||||
div.col-xs-3.stat-holder.box
|
||||
div.uptime(class="{{ upTimeTotal | upTimeClass : true }}")
|
||||
i.icon-bulb
|
||||
span.small-title uptime
|
||||
span.small-value {{ upTimeTotal | upTimeFilter }}
|
||||
|
||||
div.row
|
||||
div.col-xs-4.stat-holder
|
||||
div.col-xs-3.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title block time
|
||||
span.big-details.spark-blocktimes
|
||||
|
||||
div.col-xs-4.stat-holder
|
||||
div.col-xs-3.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title difficulty
|
||||
span.big-details.spark-difficulty
|
||||
|
||||
div.col-xs-4.stat-holder.pull-right
|
||||
div.col-xs-3.stat-holder.xpull-right
|
||||
div.big-info.chart.xdouble-chart
|
||||
span.small-title block propagation
|
||||
histogram.big-details.d3-blockpropagation(data="blockPropagationChart")
|
||||
|
||||
div.col-xs-4.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title uncle count #[ ]
|
||||
span.small (25 blocks per bar)
|
||||
span.big-details.spark-uncles
|
||||
|
||||
div.col-xs-4.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title transactions
|
||||
span.big-details.spark-transactions
|
||||
|
||||
div.col-xs-4.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title gas spending
|
||||
span.big-details.spark-gasspending
|
||||
|
||||
div.col-xs-2.stats-boxes(style="padding-top: 30px;")
|
||||
div.row
|
||||
div.col-xs-12.stat-holder
|
||||
div.col-xs-3.stat-holder.pull-right
|
||||
div.big-info.chart.double-chart
|
||||
span.small-title last blocks miners
|
||||
div.blocks-holder(ng-repeat='miner in miners', data-toggle="tooltip", data-placement="right", title="{{miner.blocks}}")
|
||||
@ -102,66 +117,85 @@ block content
|
||||
div.block(ng-repeat="i in getNumber(miner.blocks) track by $index", class="{{miner.blocks | minerBlocksClass}}")
|
||||
div.clearfix
|
||||
|
||||
div.col-xs-3.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title uncle count #[ ]
|
||||
span.small (25 blocks per bar)
|
||||
span.big-details.spark-uncles
|
||||
|
||||
div.col-xs-3.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title transactions
|
||||
span.big-details.spark-transactions
|
||||
|
||||
div.col-xs-3.stat-holder
|
||||
div.big-info.chart
|
||||
span.small-title gas spending
|
||||
span.big-details.spark-gasspending
|
||||
|
||||
|
||||
|
||||
div.col-xs-4
|
||||
div.col-xs-12
|
||||
nodemap#mapHolder(data="map")
|
||||
//- div.col-xs-12
|
||||
nodemap#mapHolder(data="map")
|
||||
|
||||
div.clearfix
|
||||
//- div.clearfix
|
||||
|
||||
div.row(ng-cloak)
|
||||
div.col-xs-12
|
||||
div.row
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr.text-info
|
||||
th.th-nodename
|
||||
i.icon-node(data-toggle="tooltip", data-placement="top", title="Node name", ng-click="orderTable(['-stats.active', 'info.name'], false)")
|
||||
th.th-nodetype
|
||||
i.icon-laptop(data-toggle="tooltip", data-placement="top", title="Node type", ng-click="orderTable(['-stats.active', 'info.node'], false)")
|
||||
th.th-latency
|
||||
i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency", ng-click="orderTable(['-stats.active', 'stats.latency'], false)")
|
||||
th
|
||||
i.icon-mining(data-toggle="tooltip", data-placement="top", title="Is mining", ng-click="orderTable(['-stats.active', '-stats.mining'], false)")
|
||||
th
|
||||
i.icon-mining(data-toggle="tooltip", data-placement="top", title="Hashrate", ng-click="orderTable(['-stats.active', '-stats.mining', '-stats.hashrate'], false)")
|
||||
th
|
||||
i.icon-group(data-toggle="tooltip", data-placement="top", title="Peers", ng-click="orderTable(['-stats.active', '-stats.peers'], false)")
|
||||
th
|
||||
i.icon-network(data-toggle="tooltip", data-placement="top", title="Pending transactions", ng-click="orderTable(['-stats.active', '-stats.pending'], false)")
|
||||
th
|
||||
i.icon-block(data-toggle="tooltip", data-placement="top", title="Last block", ng-click="orderTable(['-stats.active', '-stats.block.number', 'stats.block.propagation'], false)")
|
||||
th.th-blockhash #[ ]
|
||||
th
|
||||
i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions", ng-click="orderTable(['-stats.active', '-stats.block.transactions.length'], false)")
|
||||
th.th-blocktime
|
||||
i.icon-time(data-toggle="tooltip", data-placement="top", title="Last block time", ng-click="orderTable(['-stats.active', '-stats.block.received'], false)")
|
||||
th.th-peerPropagationTime
|
||||
i.icon-gas(data-toggle="tooltip", data-placement="top", title="Propagation time", ng-click="orderTable(['-stats.active', '-stats.block.number', 'stats.block.propagation'], false)")
|
||||
th.th-peerPropagationChart
|
||||
th
|
||||
i.icon-bulb(data-toggle="tooltip", data-placement="top", title="Up-time", ng-click="orderTable(['-stats.active', '-stats.uptime'], false)")
|
||||
tbody(ng-cloak)
|
||||
tr(ng-repeat='node in nodes | orderBy:predicate:reverse', class="{{ node.stats | mainClass : bestBlock }}")
|
||||
td.nodeInfo(rel="{{node.id}}")
|
||||
span.small(data-toggle="tooltip", data-placement="top", data-html="true", data-original-title="{{node | geoTooltip}}") {{node.info.name}}
|
||||
span.small #[ ]({{node.info.ip}})
|
||||
td
|
||||
div.small(ng-bind-html="node.info.node | nodeVersion")
|
||||
td(class="{{ node.stats | latencyClass }}")
|
||||
span.small {{node.stats | latencyFilter}}
|
||||
td(class="{{ node.stats.mining | miningClass : node.stats.active }}")
|
||||
i(class="{{ node.stats.mining | miningIconClass }}")
|
||||
td(class="{{ node.stats.mining | hashpowerClass }}")
|
||||
span.small {{node.stats.hashrate | hashrateFilter}} kH/s
|
||||
td(class="{{ node.stats.peers | peerClass : node.stats.active }}", style="padding-left: 11px;") {{node.stats.peers}}
|
||||
td(style="padding-left: 15px;") {{node.stats.pending}}
|
||||
td(class="{{ node.stats | blockClass : bestBlock }}") {{'#'}}{{ node.stats.block.number | number }}
|
||||
td(class="{{ node.stats | blockClass : bestBlock }}")
|
||||
span.small {{node.stats.block.hash | hashFilter}}
|
||||
td(style="padding-left: 14px;") {{node.stats.block.transactions.length || 0}}
|
||||
td(class="{{ node.stats.block.arrived | timeClass : node.stats.active }}") {{node.stats.block.arrived | blockTimeFilter }}
|
||||
td(class="{{ node.stats | propagationTimeClass : bestBlock }}")
|
||||
div.propagationBox
|
||||
span {{node.stats.block.propagation | blockPropagationFilter}}
|
||||
td.peerPropagationChart(class="{{node.id}}")
|
||||
td(class="{{ node.stats.uptime | upTimeClass : node.stats.active }}") {{ node.stats.uptime | upTimeFilter }}
|
||||
div.row(ng-cloak, style="padding-top: 10px")
|
||||
table.table.table-striped
|
||||
thead
|
||||
tr.text-info
|
||||
th.th-nodename
|
||||
i.icon-node(data-toggle="tooltip", data-placement="top", title="Node name", ng-click="orderTable(['-stats.active', 'info.name'], false)")
|
||||
th.th-nodetype
|
||||
i.icon-laptop(data-toggle="tooltip", data-placement="top", title="Node type", ng-click="orderTable(['-stats.active', 'info.node'], false)")
|
||||
th.th-latency
|
||||
i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency", ng-click="orderTable(['-stats.active', 'stats.latency'], false)")
|
||||
th
|
||||
i.icon-mining(data-toggle="tooltip", data-placement="top", title="Is mining", ng-click="orderTable(['-stats.active', '-stats.mining'], false)")
|
||||
th
|
||||
i.icon-hashrate(data-toggle="tooltip", data-placement="top", title="Hashrate", ng-click="orderTable(['-stats.active', '-stats.mining', '-stats.hashrate'], false)")
|
||||
th
|
||||
i.icon-group(data-toggle="tooltip", data-placement="top", title="Peers", ng-click="orderTable(['-stats.active', '-stats.peers'], false)")
|
||||
th
|
||||
i.icon-network(data-toggle="tooltip", data-placement="top", title="Pending transactions", ng-click="orderTable(['-stats.active', '-stats.pending'], false)")
|
||||
th
|
||||
i.icon-block(data-toggle="tooltip", data-placement="top", title="Last block", ng-click="orderTable(['-stats.active', '-stats.block.number', 'stats.block.propagation'], false)")
|
||||
th.th-blockhash #[ ]
|
||||
th
|
||||
i.icon-check-o(data-toggle="tooltip", data-placement="top", title="Block transactions", ng-click="orderTable(['-stats.active', '-stats.block.transactions.length'], false)")
|
||||
th
|
||||
i.icon-uncle(data-toggle="tooltip", data-placement="top", title="Uncles", ng-click="orderTable(['-stats.active', '-stats.block.uncles.length'], false)")
|
||||
th.th-blocktime
|
||||
i.icon-time(data-toggle="tooltip", data-placement="top", title="Last block time", ng-click="orderTable(['-stats.active', '-stats.block.received'], false)")
|
||||
th.th-peerPropagationTime
|
||||
i.icon-gas(data-toggle="tooltip", data-placement="top", title="Propagation time", ng-click="orderTable(['-stats.active', '-stats.block.number', 'stats.block.propagation'], false)")
|
||||
th.th-peerPropagationChart
|
||||
th
|
||||
i.icon-bulb(data-toggle="tooltip", data-placement="top", title="Up-time", ng-click="orderTable(['-stats.active', '-stats.uptime'], false)")
|
||||
tbody(ng-cloak)
|
||||
tr(ng-repeat='node in nodes | orderBy:predicate:reverse', class="{{ node.stats | mainClass : bestBlock }}")
|
||||
td.nodeInfo(rel="{{node.id}}")
|
||||
span.small(data-toggle="tooltip", data-placement="top", data-html="true", data-original-title="{{node | geoTooltip}}") {{node.info.name}}
|
||||
span.small #[ ]({{node.info.ip}})
|
||||
td
|
||||
div.small(ng-bind-html="node.info.node | nodeVersion")
|
||||
td(class="{{ node.stats | latencyClass }}")
|
||||
span.small {{node.stats | latencyFilter}}
|
||||
td(class="{{ node.stats.mining | miningClass : node.stats.active }}")
|
||||
i(class="{{ node.stats.mining | miningIconClass }}")
|
||||
td(class="{{ node.stats.mining | hashrateClass : node.stats.active }}")
|
||||
span.small {{node.stats.hashrate | hashrateFilter}} kH/s
|
||||
td(class="{{ node.stats.peers | peerClass : node.stats.active }}", style="padding-left: 11px;") {{node.stats.peers}}
|
||||
td(style="padding-left: 15px;") {{node.stats.pending}}
|
||||
td(class="{{ node.stats | blockClass : bestBlock }}") {{'#'}}{{ node.stats.block.number | number }}
|
||||
td(class="{{ node.stats | blockClass : bestBlock }}")
|
||||
span.small {{node.stats.block.hash | hashFilter}}
|
||||
td(style="padding-left: 14px;") {{node.stats.block.transactions.length || 0}}
|
||||
td(style="padding-left: 14px;") {{node.stats.block.uncles.length || 0}}
|
||||
td(class="{{ node.stats.block.arrived | timeClass : node.stats.active }}") {{node.stats.block.arrived | blockTimeFilter }}
|
||||
td(class="{{ node.stats | propagationTimeClass : bestBlock }}")
|
||||
div.propagationBox
|
||||
span {{node.stats.block.propagation | blockPropagationFilter}}
|
||||
td.peerPropagationChart(class="{{node.id}}")
|
||||
td(class="{{ node.stats.uptime | upTimeClass : node.stats.active }}") {{ node.stats.uptime | upTimeFilter }}
|
||||
|
Loading…
Reference in New Issue
Block a user