31 lines
760 B
JavaScript
31 lines
760 B
JavaScript
'use strict';
|
|
|
|
angular.module('insight.status').controller('StatusController', ['$scope', '$routeParams', '$location', 'Global', 'Status', function ($scope, $routeParams, $location, Global, Status) {
|
|
$scope.global = Global;
|
|
|
|
$scope.getData = function(q) {
|
|
Status.get({
|
|
q: q
|
|
}, function(d) {
|
|
if (q === 'getInfo') {
|
|
$scope.info = d.info;
|
|
}
|
|
if (q === 'getDifficulty') {
|
|
$scope.difficulty = d.difficulty;
|
|
}
|
|
if (q === 'getTxOutSetInfo') {
|
|
$scope.txoutsetinfo = d.txoutsetinfo;
|
|
}
|
|
if (q === 'getBestBlockHash') {
|
|
$scope.bestblockhash = d.bestblockhash;
|
|
}
|
|
if (q === 'getLastBlockHash') {
|
|
$scope.lastblockhash = d.lastblockhash;
|
|
}
|
|
|
|
});
|
|
};
|
|
|
|
}]);
|
|
|