mirror of
https://github.com/arnaucube/goBlockchainDataAnalysis.git
synced 2026-02-07 03:36:44 +01:00
added origin node, upgraded webapp with angularbootstrapmaterial and better files distribution
This commit is contained in:
54
web/views/main/main.html
Normal file
54
web/views/main/main.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="panel">
|
||||
<div class="panel-heading c_blueGrey300">
|
||||
<h3 class="panel-title">Last blocks</h3>
|
||||
</div>
|
||||
<div class="panel-body" style="max-height: 500px;overflow-y: scroll;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="panel">
|
||||
<div class="panel-heading c_blueGrey300">
|
||||
<h3 class="panel-title">Last transactions</h3>
|
||||
</div>
|
||||
<div class="panel-body" style="max-height: 500px;overflow-y: scroll;">
|
||||
<table class="table table-striped table-hover ">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Hash</th>
|
||||
<th>From</th>
|
||||
<th>Date</th>
|
||||
<th>nºSubtx</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="tx in txs">
|
||||
<td>
|
||||
txhash
|
||||
</td>
|
||||
<td>{{tx.f}}</td>
|
||||
<td>{{tx.date}}</td>
|
||||
<td>{{tx.subtx.length}}</td>
|
||||
<td><a ng-href="#!/tx/{{tx.id}}">View</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="panel">
|
||||
<div class="panel-heading c_blueGrey300">
|
||||
<h3 class="panel-title">Other</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
14
web/views/main/main.js
Normal file
14
web/views/main/main.js
Normal file
@@ -0,0 +1,14 @@
|
||||
'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) {
|
||||
|
||||
});
|
||||
43
web/views/navbar.html
Normal file
43
web/views/navbar.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<div ng-controller="NavbarCtrl">
|
||||
<div class="navbar c_grey800">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/">goBlockchainDataAnalysis</a>
|
||||
</div>
|
||||
<div class="navbar-collapse collapse navbar-responsive-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#!/network">Network</a></li>
|
||||
<li><a href="#!/sankey">Sankey diagram</a></li>
|
||||
<li><a href="javascript:void(0)">Timeline</a></li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-left">
|
||||
<div class="form-group">
|
||||
<input class="form-control col-md-8" placeholder="Search" type="text">
|
||||
</div>
|
||||
</form>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="https://github.com/arnaucode/goBlockchainDataAnalysis" target="_blank">Info</a></li>
|
||||
<li class="dropdown">
|
||||
<a href="bootstrap-elements.html" data-target="#" class="dropdown-toggle" data-toggle="dropdown">Settings
|
||||
<b class="caret"></b></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="javascript:void(0)">Action</a></li>
|
||||
<li><a href="javascript:void(0)">Another action</a></li>
|
||||
<li><a href="javascript:void(0)">Something else here</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="javascript:void(0)">Separated link</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<div ng-click="goBack()" class="btn"><span class="glyphicon glyphicon-arrow-left"></span> Back</div>
|
||||
-->
|
||||
</div>
|
||||
18
web/views/navbar.js
Normal file
18
web/views/navbar.js
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.navbar', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/navbar', {
|
||||
templateUrl: 'views/navbar/navbar.html',
|
||||
controller: 'NavbarCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('NavbarCtrl', function($scope, $http, $routeParams, $location) {
|
||||
$scope.locationHash = $location.path();
|
||||
$scope.goBack = function() {
|
||||
console.log("goBack");
|
||||
window.history.back();
|
||||
};
|
||||
});
|
||||
12
web/views/network/network.html
Normal file
12
web/views/network/network.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel-heading c_blueGrey300">
|
||||
<h3 class="panel-title">Network</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div id="mynetwork" style="height:500px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
53
web/views/network/network.js
Normal file
53
web/views/network/network.js
Normal file
@@ -0,0 +1,53 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.network', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/network', {
|
||||
templateUrl: 'views/network/network.html',
|
||||
controller: 'NetworkCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('NetworkCtrl', function($scope, $http, $routeParams) {
|
||||
$scope.data = [];
|
||||
$scope.nodes = [];
|
||||
$scope.edges = [];
|
||||
var nodes, edges, container;
|
||||
var options = {
|
||||
layout: {
|
||||
improvedLayout: false
|
||||
}
|
||||
/*,
|
||||
physics:{
|
||||
//stabilization: false,
|
||||
// enabled: false
|
||||
}*/
|
||||
};
|
||||
|
||||
|
||||
$scope.showMap = function() {
|
||||
var nodes = $scope.nodes;
|
||||
var edges = $scope.edges;
|
||||
|
||||
var container = document.getElementById('mynetwork');
|
||||
var data = {
|
||||
nodes: nodes,
|
||||
edges: edges
|
||||
};
|
||||
var network = new vis.Network(container, data, options);
|
||||
};
|
||||
|
||||
$http.get(urlapi + 'map')
|
||||
.then(function(data, status, headers, config) {
|
||||
console.log('data success');
|
||||
console.log(data);
|
||||
|
||||
$scope.nodes = data.data.nodes;
|
||||
$scope.edges = data.data.edges;
|
||||
$scope.showMap();
|
||||
}, function(data, status, headers, config) {
|
||||
console.log('data error');
|
||||
});
|
||||
|
||||
});
|
||||
12
web/views/sankey/sankey.html
Normal file
12
web/views/sankey/sankey.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel-heading c_blueGrey300">
|
||||
<h3 class="panel-title">Sankey</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
15
web/views/sankey/sankey.js
Normal file
15
web/views/sankey/sankey.js
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.sankey', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/sankey', {
|
||||
templateUrl: 'views/sankey/sankey.html',
|
||||
controller: 'SankeyCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('SankeyCtrl', function($scope, $http, $routeParams) {
|
||||
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user