Merge pull request #15 from cmgustavo/feature/block-page

great!
This commit is contained in:
Mario Colque 2014-01-10 06:51:11 -08:00
commit 219e583c51
3 changed files with 113 additions and 64 deletions

View File

@ -40,6 +40,11 @@ body {
padding-right: 15px; padding-right: 15px;
} }
code { .code {
font-size: 80%; font-size: 80%;
} }
.address {
font-size: 10px;
}

View File

@ -3,71 +3,112 @@
<h1 data-ng-if="block">Block #{{ block.height }}</h1> <h1 data-ng-if="block">Block #{{ block.height }}</h1>
</div> </div>
<h2>Summary</h2> <div class="row">
<dl class="dl-horizontal"> <div class="col-md-6">
<dt>Number Of Transactions</dt> <div class="panel panel-default">
<dd>--</dd> <div class="panel-heading">
<dt>Output Total</dt> <h3 class="panel-title">Summary</h3>
<dd>--</dd> </div>
<dt>Estimated Transaction Volume</dt> <div class="panel-body">
<dd>--</dd> <table class="table table-striped">
<dt>Transaction Fees</dt> <tbody>
<dd>--</dd> <tr>
<dt>Height</dt> <td>Number Of Transactions</td>
<dd>{{block.height}}</dd> <td>--</td>
<dt>Timestamp</dt> </tr>
<dd>{{block.time}}</dd> <tr>
<dt>Received Time</dt> <td>Output Total</td>
<dd>{{block.time}}</dd> <td>--</td>
<dt>Relayed By</dt> </tr>
<dd>--</dd> <tr>
<dt>Difficulty</dt> <td>Estimated Transaction Volume</td>
<dd>{{block.difficulty}}</dd> <td>--</td>
<dt>Bits</dt> </tr>
<dd>{{block.bits}}</dd> <tr>
<dt>Size</dt> <td>Transaction Fees</td>
<dd>{{block.size}}</dd> <td>--</td>
<dt>Version</dt> </tr>
<dd>{{block.version}}</dd> <tr>
<dt>Nonce</dt> <td>Height</td>
<dd>{{block.nonce}}</dd> <td>{{block.height}}</td>
</dl> </tr>
<tr>
<td>Timestamp</td>
<td>{{block.time * 1000 | date:'medium'}}</td>
</tr>
<tr>
<td>Received Time</td>
<td>--<td>
</tr>
<tr>
<td>Relayed By</td>
<td>--</td>
</tr>
<tr>
<td>Difficulty</td>
<td>{{block.difficulty}}</td>
</tr>
<tr>
<td>Bits</td>
<td>{{block.bits}}</td>
</tr>
<tr>
<td>Size</td>
<td>{{block.size}}</td>
</tr>
<tr>
<td>Version</td>
<td>{{block.version}}</td>
</tr>
<tr>
<td>Nonce</td>
<td>{{block.nonce}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default" data-ng-show="!tx.isCoinBase">
<div class="panel-heading">
<h3 class="panel-title">Hashes</h3>
</div>
<div class="panel-body">
<table class="table table-striped">
<tbody>
<tr>
<td>Hash</td>
<td><a class="address" href="/#!/block/{{block.hash}}">{{block.hash}}</a></td>
</tr>
<tr>
<td>Previous Block</td>
<td><a class="address" href="/#!/block/{{block.previousblockhash}}">{{block.previousblockhash}}</a></td>
</tr>
<tr>
<td>Next Block</td>
<td><a class="address" href="/#!/block/{{block.nextblockhash}}">{{block.nextblockhash}}</a></td>
</tr>
<tr>
<td>Merkle Root</td>
<td class="address">{{block.merkleroot}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<h2>Hashes</h2> <h2>Transactions <small>Transactions contained within this block</small></h2>
<table class="table table-striped">
<thead>
<th>Hashes</th>
<th>&nbsp;</th>
</thead>
<tbody>
<tr>
<td>Hash</td>
<td><a href="/#!/block/{{block.hash}}">{{block.hash}}</a></td>
</tr>
<tr>
<td>Previous Block</td>
<td><a href="/#!/block/{{block.previousblockhash}}">{{block.previousblockhash}}</a></td>
</tr>
<tr>
<td>Next Block(s)</td>
<td><a href="/#!/block/{{block.nextblockhash}}">{{block.nextblockhash}}</a></td>
</tr>
<tr>
<td>Merkle Root</td>
<td>{{block.merkleroot}}</td>
</tr>
</tbody>
</table>
<h2>Transactions</h2>
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<th>Hash</th> <th>Hash</th>
</thead> </thead>
<tbody> <tbody>
<tr data-ng-repeat="tx in block.tx"> <tr data-ng-repeat="tx in block.tx">
<td><a href="/#!/tx/{{tx}}">{{tx}}</a></td> <td><a href="/#!/tx/{{tx}}">{{tx}}</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</section> </section>

View File

@ -1,12 +1,15 @@
<section data-ng-controller="transactionsController" data-ng-init="findOne()"> <section data-ng-controller="transactionsController" data-ng-init="findOne()">
<div class="page-header"> <div class="page-header">
<h1> <h1>
<span class="glyphicon glyphicon-transfer">&nbsp;</span> Transaction
<a href="/#!/tx/{{tx.txid}}" title="{{tx.txid}}">Transaction</a>
<small>View information about a bitcoin transaction</small> <small>View information about a bitcoin transaction</small>
</h1> </h1>
</div> </div>
<div class="well well-sm">
{{tx.txid}}
</div>
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>