mirror of
https://github.com/arnaucube/goBlockchainDataAnalysis.git
synced 2026-02-07 03:36:44 +01:00
added tx page in frontend and backend route. Added address tx chart time analysis
This commit is contained in:
47
web/views/tx/tx.html
Normal file
47
web/views/tx/tx.html
Normal 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
21
web/views/tx/tx.js
Normal 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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user