mirror of
https://github.com/arnaucube/blockchainIDsystem.git
synced 2026-02-07 11:06:41 +01:00
peers propagation working fine, started to implement serverCA
This commit is contained in:
19
serverCA/webapp/views/main/main.html
Normal file
19
serverCA/webapp/views/main/main.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
22
serverCA/webapp/views/main/main.js
Normal file
22
serverCA/webapp/views/main/main.js
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.main', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/main', {
|
||||
templateUrl: 'views/main/main.html',
|
||||
controller: 'MainCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('MainCtrl', function($scope, $http) {
|
||||
$scope.peerslist = {};
|
||||
$http.get(urlapi + 'peers')
|
||||
.then(function(data, status, headers, config) {
|
||||
console.log('data success');
|
||||
console.log(data.data);
|
||||
$scope.peerslist = data.data;
|
||||
}, function(data, status, headers, config) {
|
||||
console.log('data error');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user