insight-ui-zcash/public/js/controllers/status.js

31 lines
762 B
JavaScript
Raw Normal View History

'use strict';
angular.module('mystery.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) {
2014-01-16 08:32:11 -08:00
if (q === 'getInfo') {
$scope.info = d.info;
}
2014-01-16 08:32:11 -08:00
if (q === 'getDifficulty') {
$scope.difficulty = d.difficulty;
}
2014-01-16 08:32:11 -08:00
if (q === 'getTxOutSetInfo') {
$scope.txoutsetinfo = d.txoutsetinfo;
}
2014-01-16 08:32:11 -08:00
if (q === 'getBestBlockHash') {
$scope.bestblockhash = d.bestblockhash;
}
if (q === 'getLastBlockHash') {
$scope.lastblockhash = d.lastblockhash;
}
});
};
}]);