diff --git a/package.json b/package.json index ed8cbfe..907184b 100644 --- a/package.json +++ b/package.json @@ -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.60", + "version": "5.0.0-beta.61", "repository": "git://github.com/bitpay/flosight-ui.git", "bugs": { "url": "https://github.com/bitpay/flosight-ui/issues" diff --git a/public/src/js/controllers/header.js b/public/src/js/controllers/header.js index 2579488..e2a360e 100644 --- a/public/src/js/controllers/header.js +++ b/public/src/js/controllers/header.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('flosight.system').controller('HeaderController', - function($scope, $rootScope, $modal, getSocket, Global, Block) { + function($scope, $rootScope, $modal, getSocket, Global, Block, Status) { $scope.global = Global; $rootScope.currency = { @@ -25,6 +25,19 @@ angular.module('flosight.system').controller('HeaderController', }); }; + $scope.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; + }); + }; + var _getBlock = function(hash) { Block.get({ blockHash: hash