mirror of
https://github.com/arnaucube/blockchainIDsystem.git
synced 2026-02-07 02:56:43 +01:00
added GetBlockchain in REST API of the serverCA, also added the visualization to the serverCA webapp
This commit is contained in:
@@ -1,16 +1,45 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
{{peerslist.PeerID}}
|
||||
<div class="card-body" style="max-height: 500px; overflow-y:scroll;">
|
||||
<div ng-repeat="peer in peerslist.peerslist">
|
||||
<b>{{peer.id}}</b> - {{peer.role}}
|
||||
<br>
|
||||
- {{peer.ip}}:{{peer.port}}, {{peer.restport}}
|
||||
<hr>
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
Peers
|
||||
</h4>
|
||||
{{peerslist.PeerID}}
|
||||
<div style="max-height: 500px; overflow-y:scroll;">
|
||||
<div ng-repeat="peer in peerslist.peerslist">
|
||||
<b>{{peer.id}}</b> - {{peer.role}}
|
||||
<br>
|
||||
- {{peer.ip}}:{{peer.port}}, {{peer.restport}}
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">
|
||||
Blockchain
|
||||
</h4>
|
||||
<div style="max-height: 500px; overflow-y:scroll;">
|
||||
<div ng-repeat="block in blockchain.blocks">
|
||||
Hash: <b>{{block.hash}}</b> - Height: {{block.height}}
|
||||
<br>
|
||||
Emitter: {{block.emitter}}
|
||||
<br>
|
||||
Date: {{block.date}}
|
||||
<br>
|
||||
Data: {{block.data}}
|
||||
<br>
|
||||
PreviousHash: {{block.previoushash}}
|
||||
<br>
|
||||
NextHash: {{block.nexthash}}
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,4 +19,14 @@ angular.module('app.main', ['ngRoute'])
|
||||
}, function(data, status, headers, config) {
|
||||
console.log('data error');
|
||||
});
|
||||
|
||||
$scope.blockchain={};
|
||||
$http.get(urlapi + 'blockchain')
|
||||
.then(function(data, status, headers, config) {
|
||||
console.log('data success');
|
||||
console.log(data.data);
|
||||
$scope.blockchain = data.data;
|
||||
}, function(data, status, headers, config) {
|
||||
console.log('data error');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user