Merge pull request #362 from matiu/bug/sync-status

Bug/sync status
This commit is contained in:
Matias Alejo Garcia 2014-02-18 11:52:43 -02:00
commit 365bd74c53
2 changed files with 10 additions and 8 deletions

View File

@ -260,9 +260,8 @@ function spec() {
HistoricSync.prototype.prepareFileSync = function(opts, next) {
var self = this;
if (
opts.forceRPC || !config.bitcoind.dataDir ||
self.connectedCountDB > self.blockChainHeight > 0.9) return next();
if ( opts.forceRPC || !config.bitcoind.dataDir ||
self.connectedCountDB > self.blockChainHeight * 0.9) return next();
self.blockExtractor = new BlockExtractor(config.bitcoind.dataDir, config.network);

View File

@ -10,23 +10,26 @@
<div class="col-xs-12 col-md-8">
<h2>Sync Status</h2>
<table class="table" data-ng-controller="StatusController" data-ng-init="getSync()">
<thead>
<span class="text-danger" data-ng-show="sync && sync.error">{{sync.error}}</span>
</thead>
<tbody>
<tr>
<td>Sync Progress</td>
<td>
<div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: {{ sync.syncPercentage}}%">
<span>{{sync.syncPercentage}}% Complete</span>
<span data-ng-show="sync.syncPercentage>0">{{sync.syncPercentage}}% Complete</span>
</div>
</div>
</td>
</tr>
<tr>
<td>Current Sync Status</td>
<td class="text-right">{{sync.status}}</td>
<td class="text-right">
<span data-ng-show="!sync.error">{{sync.status}}</span>
<span class="text-danger" data-ng-show="sync.error">
<span class="glyphicon glyphicon-warning-sign"></span>
{{sync.error}}
</span>
</td>
</tr>
<tr>
<td>Start Date</td>