improve error messages + fix server error display

This commit is contained in:
Manuel Araoz 2014-02-13 17:00:26 -03:00
parent b8d2a863d9
commit 25b6011b7c
3 changed files with 48 additions and 44 deletions

View File

@ -136,11 +136,16 @@ A REST API is provided at /api. The entry points are:
/api/txs/?address=mmhmMNfBiZZ37g1tgg2t8DDbNoEdqKVxAL
```
### Sync status
### Historic blockchain data sync status
```
/api/sync
```
### Live network p2p data sync status
```
/api/peer
```
## Web Socket API
The web socket API is served using [socket.io](http://socket.io) at:
```

View File

@ -11,12 +11,11 @@ function($scope, $window, Status, getSocket, PeerSync) {
var socket = getSocket($scope);
// Check for the node server connection
socket.on('connect', function() {
$scope.serverOnline = true;
socket.on('disconnect', function() {
$scope.serverOnline = false;
});
socket.on('connect', function() {
$scope.serverOnline = true;
});
// Check for the api connection

View File

@ -3,8 +3,8 @@
<!-- apiOnline disabled || !apiOnline -->
<div class="alert alert-danger" data-ng-show="!serverOnline || !clienteOnline || !apiOnline", data-ng-init="getConnStatus()">
<strong>Error!</strong>
<p data-ng-show="!apiOnline">Can't connect to bitcoind.</p>
<p data-ng-show="!serverOnline">Can't connect to server.</p>
<p data-ng-show="!apiOnline">Can't connect to bitcoind to get live updates from the p2p network.</p>
<p data-ng-show="!serverOnline">Can't connect to insight server. Attempting to reconnect... </p>
<p data-ng-show="!clienteOnline">Can't connect to internet. Please, check your connection.</p>
</div>
</div>