Merge pull request #191 from colkito/bug/bitcoind-error-message

fixed error message when bitcoind is down
This commit is contained in:
Gustavo Maximiliano Cortez 2014-02-06 16:52:20 -02:00
commit 73965f0afb
1 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ angular.module('insight.connection').controller('ConnectionController',
function($scope, $window, Status, Sync, getSocket) {
// Set initial values
$scope.apiOnline = true;
$scope.serverOnline = true;
$scope.clienteOnline = true;
@ -22,7 +23,7 @@ function($scope, $window, Status, Sync, getSocket) {
$scope.getConnStatus = function() {
Sync.get({},
function(sync) {
$scope.apiOnline = (sync.status !== 'aborted' && sync.status !== 'error') ? true : false;
$scope.apiOnline = (sync.status !== 'aborted' && sync.status !== 'error');
},
function() {
$scope.apiOnline = false;
@ -31,7 +32,7 @@ function($scope, $window, Status, Sync, getSocket) {
socket.emit('subscribe', 'sync');
socket.on('status', function(sync) {
$scope.apiOnline = (sync.status !== 'aborted' && sync.status !== 'error') ? true : false;
$scope.apiOnline = (sync.status !== 'aborted' && sync.status !== 'error');
});
// Check for the client conneciton