Get Network Info on Index page
This commit is contained in:
parent
0c40d113b4
commit
5c070d0e65
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "flosight-ui",
|
||||
"description": "An open-source frontend for the Flosight API. The Flosight API provides you with a convenient, powerful and simple way to query and broadcast data on the florincoin network and build your own services with it.",
|
||||
"version": "5.0.0-beta.58",
|
||||
"version": "5.0.0-beta.59",
|
||||
"repository": "git://github.com/bitpay/flosight-ui.git",
|
||||
"bugs": {
|
||||
"url": "https://github.com/bitpay/flosight-ui/issues"
|
||||
|
||||
@ -4,7 +4,7 @@ var TRANSACTION_DISPLAYED = 10;
|
||||
var BLOCKS_DISPLAYED = 5;
|
||||
|
||||
angular.module('flosight.system').controller('IndexController',
|
||||
function($scope, Global, getSocket, Blocks) {
|
||||
function($scope, Global, getSocket, Blocks, Status) {
|
||||
$scope.global = Global;
|
||||
|
||||
var _getBlocks = function(loadTxs) {
|
||||
@ -49,7 +49,18 @@ angular.module('flosight.system').controller('IndexController',
|
||||
_startSocket();
|
||||
});
|
||||
|
||||
|
||||
var _getStatus = function(q) {
|
||||
Status.get({
|
||||
q: 'get' + q
|
||||
},
|
||||
function(d) {
|
||||
$scope.loaded = 1;
|
||||
angular.extend($scope, d);
|
||||
},
|
||||
function(e) {
|
||||
$scope.error = 'API ERROR: ' + e.data;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.humanSince = function(time) {
|
||||
var m = moment.unix(time);
|
||||
@ -59,6 +70,7 @@ angular.module('flosight.system').controller('IndexController',
|
||||
$scope.index = function() {
|
||||
_getBlocks(true);
|
||||
_startSocket();
|
||||
_getStatus('Info');
|
||||
};
|
||||
|
||||
$scope.txs = [];
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
<div id="search-form-mobile" class="visible-xs" data-ng-include src="'views/includes/search.html'"></div>
|
||||
|
||||
<h1 translate>Latest Blocks</h1>
|
||||
<h1 translate>Latest Blocks {{info.network}}</h1>
|
||||
<table class="table table-hover table-striped" style="table-layout: fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user