Add getStatus call to header controller
This commit is contained in:
parent
6c7776904a
commit
b00f80b967
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user