added tx page in frontend and backend route. Added address tx chart time analysis

This commit is contained in:
arnaucode
2017-08-30 00:32:56 +02:00
parent 99af4a76ff
commit 52ec7f0a0a
10 changed files with 205 additions and 28 deletions

47
web/views/tx/tx.html Normal file
View File

@@ -0,0 +1,47 @@
<div class="row">
<div class="col-sm-12">
<div class="panel">
<div class="panel-heading c_deepPurpleG300to500">
<h3 class="panel-title">Tx {{tx.txid}}</h3>
</div>
<div class="panel-body">
<div class="col-sm-12">
<table class="table table-hover">
<thead>
<tr>
<th>Txid</th>
<th>Input</th>
<th>Output</th>
</tr>
</thead>
<tbody>
<tr>
<td style="max-width:20px; overflow:hidden;">
<a ng-href="#!/tx/{{tx.txid}}" class="list-group-item-text">
{{tx.txid}}
</a>
</td>
<td style="max-width:20px; overflow:hidden;">
<table><tbody><tr ng-repeat="vin in tx.vin"><td>
<a ng-href="#!/address/{{vin.address}}" class="list-group-item-text">
{{vin.address}}
</a>
:{{vin.amount}}
</td></tr></tbody></table>
</td>
<td style="max-width:20px; overflow:hidden;">
<table><tbody><tr ng-repeat="vout in tx.vout"><td>
<a ng-href="#!/address/{{vout.address}}" class="list-group-item-text">
{{vout.address}}
</a>
:{{vout.value}}
</td></tr></tbody></table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>

21
web/views/tx/tx.js Normal file
View File

@@ -0,0 +1,21 @@
'use strict';
angular.module('app.tx', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/tx/:txid', {
templateUrl: 'views/tx/tx.html',
controller: 'TxCtrl'
});
}])
.controller('TxCtrl', function($scope, $http, $routeParams) {
$scope.tx = {};
$http.get(urlapi + 'tx/' + $routeParams.txid)
.then(function(data, status, headers, config) {
console.log(data);
$scope.tx = data.data;
}, function(data, status, headers, config) {
console.log('data error');
});
});