css fixes

This commit is contained in:
cubedro 2015-04-05 19:22:49 +03:00
parent ff5d8bd31a
commit 4ed81109b4
3 changed files with 68 additions and 38 deletions

View File

@ -1,10 +1,19 @@
html {
width: 100%;
}
body { body {
width: 100%;
min-width: 1900px; min-width: 1900px;
font-smooth: auto; font-smooth: auto;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased; -moz-font-smoothing: antialiased;
} }
.stat-holder {
}
.big-info { .big-info {
padding-bottom: 15px; padding-bottom: 15px;
padding-top: 15px; padding-top: 15px;
@ -12,6 +21,10 @@ body {
border: 1px solid rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.05);
} }
.stats-boxes .big-info {
margin-right: -30px;
}
.big-info .icon-full-width i { .big-info .icon-full-width i {
display: block; display: block;
width: 85px; width: 85px;
@ -117,10 +130,30 @@ table td i {
left: 0; left: 0;
} }
table td {
white-space: nowrap !important;
}
.table>tbody>tr>td,
.table>thead>tr>th {
padding: 5px;
}
.th-nodename {
width: 400px;
}
.th-latency { .th-latency {
width: 100px; width: 100px;
} }
.th-blockhash {
width: 460px;
}
.th-blocktime {
width: 110px;
}
@media only screen and (max-width: 639px) { @media only screen and (max-width: 639px) {
/*.big-info { /*.big-info {
padding-bottom: 15px; padding-bottom: 15px;

View File

@ -74,16 +74,7 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
break; break;
case "update": case "update":
var index = findIndex({id: data.id}); $scope.nodes[findIndex({id: data.id})].stats = data.stats;
// if(data.stats.block.number > $scope.nodes[index].stats.block.number) {
// data.stats.block.firstarrived = (data.stats.block.number > $scope.bestBlock ? data.stats.block.received : $scope.lastBlock);
// } else {
// data.stats.block.firstarrived = $scope.nodes[index].stats.block.firstarrived;
// }
$scope.nodes[index].stats = data.stats;
break; break;
case "info": case "info":
@ -155,18 +146,24 @@ function StatsCtrl($scope, $filter, socket, _, toastr) {
return parseInt(node.stats.block.number); return parseInt(node.stats.block.number);
}).stats.difficulty; }).stats.difficulty;
$scope.difficultyChange.pop();
jQuery('.spark-difficulty').sparkline($scope.difficultyChange.reverse(), {type: 'bar'}); jQuery('.spark-difficulty').sparkline($scope.difficultyChange.reverse(), {type: 'bar'});
$scope.transactionDensity = _.max($scope.nodes, function(node) { $scope.transactionDensity = _.max($scope.nodes, function(node) {
return parseInt(node.stats.block.number); return parseInt(node.stats.block.number);
}).stats.txDensity; }).stats.txDensity;
$scope.transactionDensity.pop();
jQuery('.spark-transactions').sparkline($scope.transactionDensity.reverse(), {type: 'bar'}); jQuery('.spark-transactions').sparkline($scope.transactionDensity.reverse(), {type: 'bar'});
$scope.gasSpending = _.max($scope.nodes, function(node) { $scope.gasSpending = _.max($scope.nodes, function(node) {
return parseInt(node.stats.block.number); return parseInt(node.stats.block.number);
}).stats.gasSpending; }).stats.gasSpending;
$scope.gasSpending.pop();
jQuery('.spark-gasspending').sparkline($scope.gasSpending.reverse(), {type: 'bar'}); jQuery('.spark-gasspending').sparkline($scope.gasSpending.reverse(), {type: 'bar'});
} }

View File

@ -63,28 +63,29 @@ block content
div.col-xs-12 div.col-xs-12
div.row div.row
div.col-xs-8(style="padding-top: 30px;") div.col-xs-4.stats-boxes(style="padding-top: 30px;")
div.col-xs-3.stat-holder div.row
div.row.big-info.chart div.col-xs-6.stat-holder
div.big-info.chart
span.small-title block time span.small-title block time
span.big-details.spark-blocktimes span.big-details.spark-blocktimes
div.col-xs-3.stat-holder div.col-xs-6.stat-holder
div.row.big-info.chart div.big-info.chart
span.small-title difficulty span.small-title difficulty
span.big-details.spark-difficulty span.big-details.spark-difficulty
div.col-xs-3.stat-holder div.col-xs-6.stat-holder
div.row.big-info.chart div.big-info.chart
span.small-title transactions span.small-title transactions
span.big-details.spark-transactions span.big-details.spark-transactions
div.col-xs-3.stat-holder div.col-xs-6.stat-holder
div.row.big-info.chart div.big-info.chart
span.small-title gas spending span.small-title gas spending
span.big-details.spark-gasspending span.big-details.spark-gasspending
//- div.clearfix div.col-xs-4
div.col-xs-4 div.col-xs-4
div.col-xs-12 div.col-xs-12
@ -100,7 +101,7 @@ block content
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")
th 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
i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency") i.icon-clock(data-toggle="tooltip", data-placement="top", title="Node latency")
@ -112,10 +113,10 @@ block content
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 node block")
th.hidden-sm.hidden-xs   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")
th th.th-blocktime
i.icon-time(data-toggle="tooltip", data-placement="top", title="Last block time") i.icon-time(data-toggle="tooltip", data-placement="top", title="Last block time")
th th
i.icon-gas(data-toggle="tooltip", data-placement="top", title="Propagation time") i.icon-gas(data-toggle="tooltip", data-placement="top", title="Propagation time")
@ -124,7 +125,7 @@ block content
tbody tbody
tr(ng-repeat='node in nodes', class="{{ node.stats | mainClass : bestBlock }}") tr(ng-repeat='node in nodes', class="{{ node.stats | mainClass : bestBlock }}")
td(rel="{{node.id}}") td(rel="{{node.id}}")
span(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}})
td td
div.small(ng-bind-html="node.info.node | nodeVersion") div.small(ng-bind-html="node.info.node | nodeVersion")
@ -132,13 +133,12 @@ block content
td.small(class="{{ node.stats | latencyClass }}") {{node.stats | latencyFilter}} td.small(class="{{ node.stats | latencyClass }}") {{node.stats | latencyFilter}}
td(class="{{ node.stats.mining | miningClass }}") td(class="{{ node.stats.mining | miningClass }}")
i.small(class="{{ node.stats.mining | miningIconClass }}") i.small(class="{{ node.stats.mining | miningIconClass }}")
td(class="{{ node.stats.peers | peerClass }}", style="padding-left: 18px;") {{node.stats.peers}} td(class="{{ node.stats.peers | peerClass }}", style="padding-left: 11px;") {{node.stats.peers}}
td(style="padding-left: 18px;") {{node.stats.pending}} td(style="padding-left: 15px;") {{node.stats.pending}}
td(class="{{ node.stats.block.number | blockClass : bestBlock }}") {{'#' + node.stats.block.number}} td(class="{{ node.stats.block.number | blockClass : bestBlock }}") {{'#' + node.stats.block.number}}
td(class="{{ node.stats.block.number | blockClass : bestBlock }}").hidden-sm.hidden-xs td(class="{{ node.stats.block.number | blockClass : bestBlock }}")
span.small {{node.stats.block.hash | hashFilter}} span.small {{node.stats.block.hash}}
//- div.small Difficulty: {{node.stats.block.difficulty | gasFilter}} | Gas used: {{node.stats.block.gasUsed | gasFilter}} | Min gas price: {{node.stats.block.minGasPrice | gasFilter}} | Gas limit: {{node.stats.block.gasLimit | gasFilter}} td(style="padding-left: 14px;") {{node.stats.block.transactions.length || 0}}
td(style="padding-left: 18px;") {{node.stats.block.transactions.length || 0}}
td(class="{{ node.stats.block.timestamp | timeClass }}") {{node.stats.block.received | blockTimeFilter }} td(class="{{ node.stats.block.timestamp | timeClass }}") {{node.stats.block.received | blockTimeFilter }}
td(class="{{ node.stats.block.propagation | propagationTimeClass }}") {{node.stats.block.propagation | blockPropagationFilter}} td(class="{{ node.stats.block.propagation | propagationTimeClass }}") {{node.stats.block.propagation | blockPropagationFilter}}
td(class="{{ node.stats.uptime | upTimeClass }}") {{ node.stats.uptime | upTimeFilter }} td(class="{{ node.stats.uptime | upTimeClass }}") {{ node.stats.uptime | upTimeFilter }}