arnaucube
arnaucube/goBlockchainDataAnalysisPublic Self-hosted repository
added pages blocks, txs, addresses, and beta section
arnaucode idoctnef@openmailbox.org
Thu, 31 Aug 2017 00:08:19 +0200
commit

58393a26e9eea1ee713a684b31264f8a8e6d5d11

parent

9092aea11b590b6d1141cc9293391428467b1646

M web/app.js → web/app.js

@@ -17,7 +17,11 @@ 'app.address',

'app.network', 'app.addressNetwork', 'app.sankey', - 'app.dateAnalysis' + 'app.dateAnalysis', + 'app.blocks', + 'app.txs', + 'app.addresses', + 'app.beta' ]). config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) { $locationProvider.hashPrefix('!');
M web/css/bootstrapMaterialDarkOverwrite.css → web/css/bootstrapMaterialDarkOverwrite.css

@@ -4,6 +4,9 @@

body { background: #424242!important; } +a { + color: #9575CD!important; +} .panel-heading { border-radius: 0px!important; }

@@ -25,7 +28,7 @@ .list-group-item p {

color: #ffffff!important; } .list-group-item a { - color: #512DA8!important; + color: #9575CD!important; } .list-group-item-text { color: #9575CD!important;
M web/css/style.css → web/css/style.css

@@ -32,7 +32,7 @@

/* sidebar */ .o_sidebar a { - color: white; + color: white!important; padding: 10px; }
M web/index.html → web/index.html

@@ -83,6 +83,10 @@ <script src="views/network/network.js"></script>

<script src="views/addressNetwork/addressNetwork.js"></script> <script src="views/sankey/sankey.js"></script> <script src="views/dateAnalysis/dateAnalysis.js"></script> + <script src="views/blocks/blocks.js"></script> + <script src="views/txs/txs.js"></script> + <script src="views/addresses/addresses.js"></script> + <script src="views/beta/beta.js"></script> </body> </html>
A web/views/addresses/addresses.html

@@ -0,0 +1,16 @@

+<div class="row"> + <div class="col-md-12"> + <div class="panel"> + <div class="panel-heading c_deepPurpleG300to500"> + <h3 class="panel-title">Last addresses used</h3> + </div> + <div class="panel-body"> + <div class="list-group-item" ng-repeat="address in addresses"> + <div class="row-content"> + <a ng-href="#!/address/{{address.hash}}" class="list-group-item-text">{{address.hash}}</a> + </div> + </div> + </div> + </div> + </div> +</div>
A web/views/addresses/addresses.js

@@ -0,0 +1,24 @@

+'use strict'; + +angular.module('app.addresses', ['ngRoute']) + + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/addresses', { + templateUrl: 'views/addresses/addresses.html', + controller: 'AddressesCtrl' + }); + }]) + + .controller('AddressesCtrl', function($scope, $http) { + + //last addr + $scope.addresses = []; + $http.get(urlapi + 'lastaddr') + .then(function(data, status, headers, config) { + console.log(data); + $scope.addresses = data.data; + }, function(data, status, headers, config) { + console.log('data error'); + }); + + });
A web/views/beta/beta.html

@@ -0,0 +1,11 @@

+<div class="row"> + <div class="col-sm-12"> + <a ng-href="#!/network" class="btn btn-raised btn-lg c_deepPurple400"> + <i class="fa fa-chain o_sidebarIcon" aria-hidden="true"></i> Network + </a> + <a ng-href="#!/sankey" class="btn btn-raised btn-lg c_deepPurple400"> + <i class="fa fa-code-fork o_sidebarIcon" aria-hidden="true"></i> Sankey Diagram + </a> + <a ng-href="#!/beta" class="btn btn-raised btn-lg c_deepPurple400">Known addresses</a> + </div> +</div>
A web/views/beta/beta.js

@@ -0,0 +1,14 @@

+'use strict'; + +angular.module('app.beta', ['ngRoute']) + + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/beta', { + templateUrl: 'views/beta/beta.html', + controller: 'BetaCtrl' + }); + }]) + + .controller('BetaCtrl', function($scope, $http, $routeParams) { + + });
A web/views/blocks/blocks.html

@@ -0,0 +1,51 @@

+<div class="row"> + <div class="col-md-12"> + <div class="panel"> + <div class="panel-heading c_deepPurpleG300to500"> + <h3 class="panel-title">Last Tx with amount</h3> + </div> + <div class="panel-body"> + <table class="table table-hover"> + <thead> + <tr> + <th>BlockHeight</th> + <th>Txid</th> + <th>Input</th> + <th>Output</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="tx in txs"> + <td style="max-width:20px; overflow:hidden;"> + <a ng-href="#!/block/{{tx.blockheight}}" class="list-group-item-text"> + {{tx.blockheight}} + </a> + </td> + <td style="max-width:20px; overflow:hidden;"> + <a ng-href="#!/address/{{tx.from}}" 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>
A web/views/blocks/blocks.js

@@ -0,0 +1,24 @@

+'use strict'; + +angular.module('app.blocks', ['ngRoute']) + + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/blocks', { + templateUrl: 'views/blocks/blocks.html', + controller: 'BlocksCtrl' + }); + }]) + + .controller('BlocksCtrl', function($scope, $http) { + + //last tx + $scope.txs = []; + $http.get(urlapi + 'lasttx') + .then(function(data, status, headers, config) { + console.log(data); + $scope.txs = data.data; + }, function(data, status, headers, config) { + console.log('data error'); + }); + + });
M web/views/sidebar.html → web/views/sidebar.html

@@ -11,28 +11,33 @@ <i class="fa fa-home o_sidebarIcon" aria-hidden="true"></i> Main

</a> </li> <li> - <a href="#!/network"> - <i class="fa fa-chain o_sidebarIcon" aria-hidden="true"></i> Network + <a href="#!/addressNetwork"> + <i class="fa fa-sitemap o_sidebarIcon" aria-hidden="true"></i> Address Network + </a> + </li> + <li> + <a href="#!/dateAnalysis"> + <i class="fa fa-bar-chart o_sidebarIcon" aria-hidden="true"></i> Date Analysis </a> </li> <li> - <a href="#!/addressNetwork"> - <i class="fa fa-sitemap o_sidebarIcon" aria-hidden="true"></i> Address Network + <a href="#!/blocks"> + <i class="fa fa-chain o_sidebarIcon" aria-hidden="true"></i> Blocks </a> </li> <li> - <a href="#!/sankey"> - <i class="fa fa-code-fork o_sidebarIcon" aria-hidden="true"></i> Sankey diagram + <a href="#!/txs"> + <i class="fa fa-square-o o_sidebarIcon" aria-hidden="true"></i> Transactions </a> </li> <li> - <a href="#!/dateAnalysis"> - <i class="fa fa-bar-chart o_sidebarIcon" aria-hidden="true"></i> Date Analysis + <a href="#!/addresses"> + <i class="fa fa-qrcode o_sidebarIcon" aria-hidden="true"></i> Addresses </a> </li> <li> - <a href="javascript:void(0)"> - <i class="fa fa-area-chart o_sidebarIcon" aria-hidden="true"></i> Timeline + <a ng-href="#!/beta"> + <i class="fa fa-bug o_sidebarIcon" aria-hidden="true"></i> Beta </a> </li> <li>
M web/views/tx/tx.html → web/views/tx/tx.html

@@ -6,6 +6,7 @@ <h3 class="panel-title">Tx {{tx.txid}}</h3>

</div> <div class="panel-body"> <div class="col-sm-12"> + BlockHeight: <a ng-href="#!/block/{{tx.blockheight}}">{{tx.blockheight}}</a> <table class="table table-hover"> <thead> <tr>
A web/views/txs/txs.html

@@ -0,0 +1,51 @@

+<div class="row"> + <div class="col-md-12"> + <div class="panel"> + <div class="panel-heading c_deepPurpleG300to500"> + <h3 class="panel-title">Last Tx with amount</h3> + </div> + <div class="panel-body"> + <table class="table table-hover"> + <thead> + <tr> + <th>BlockHeight</th> + <th>Txid</th> + <th>Input</th> + <th>Output</th> + </tr> + </thead> + <tbody> + <tr ng-repeat="tx in txs"> + <td style="max-width:20px; overflow:hidden;"> + <a ng-href="#!/block/{{tx.blockheight}}" class="list-group-item-text"> + {{tx.blockheight}} + </a> + </td> + <td style="max-width:20px; overflow:hidden;"> + <a ng-href="#!/address/{{tx.from}}" 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>
A web/views/txs/txs.js

@@ -0,0 +1,24 @@

+'use strict'; + +angular.module('app.txs', ['ngRoute']) + + .config(['$routeProvider', function($routeProvider) { + $routeProvider.when('/txs', { + templateUrl: 'views/txs/txs.html', + controller: 'TxsCtrl' + }); + }]) + + .controller('TxsCtrl', function($scope, $http) { + + //last tx + $scope.txs = []; + $http.get(urlapi + 'lasttx') + .then(function(data, status, headers, config) { + console.log(data); + $scope.txs = data.data; + }, function(data, status, headers, config) { + console.log('data error'); + }); + + });