Merge pull request #191 from colkito/bug/bitcoind-error-message
fixed error message when bitcoind is down
This commit is contained in:
commit
73965f0afb
|
@ -4,6 +4,7 @@ angular.module('insight.connection').controller('ConnectionController',
|
||||||
function($scope, $window, Status, Sync, getSocket) {
|
function($scope, $window, Status, Sync, getSocket) {
|
||||||
|
|
||||||
// Set initial values
|
// Set initial values
|
||||||
|
$scope.apiOnline = true;
|
||||||
$scope.serverOnline = true;
|
$scope.serverOnline = true;
|
||||||
$scope.clienteOnline = true;
|
$scope.clienteOnline = true;
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ function($scope, $window, Status, Sync, getSocket) {
|
||||||
$scope.getConnStatus = function() {
|
$scope.getConnStatus = function() {
|
||||||
Sync.get({},
|
Sync.get({},
|
||||||
function(sync) {
|
function(sync) {
|
||||||
$scope.apiOnline = (sync.status !== 'aborted' && sync.status !== 'error') ? true : false;
|
$scope.apiOnline = (sync.status !== 'aborted' && sync.status !== 'error');
|
||||||
},
|
},
|
||||||
function() {
|
function() {
|
||||||
$scope.apiOnline = false;
|
$scope.apiOnline = false;
|
||||||
|
@ -31,7 +32,7 @@ function($scope, $window, Status, Sync, getSocket) {
|
||||||
|
|
||||||
socket.emit('subscribe', 'sync');
|
socket.emit('subscribe', 'sync');
|
||||||
socket.on('status', function(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
|
// Check for the client conneciton
|
||||||
|
|
Loading…
Reference in New Issue