diff --git a/lib/HistoricSync.js b/lib/HistoricSync.js index 5a2b2859..4f8c8258 100644 --- a/lib/HistoricSync.js +++ b/lib/HistoricSync.js @@ -296,13 +296,13 @@ function spec() { if (!self.step) { - var step = parseInt( (self.blockChainHeight - self.syncedBlocks) / 100); + var step = parseInt( (self.blockChainHeight - self.syncedBlocks) / 1000); if (self.opts.progressStep) { step = self.opts.progressStep; } - if (step < 100) step = 100; + if (step < 10) step = 10; self.step = step; } diff --git a/public/css/common.css b/public/css/common.css index 9cc2c091..7222a96c 100644 --- a/public/css/common.css +++ b/public/css/common.css @@ -368,10 +368,21 @@ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-size: 80%; } -.status .text-danger { +.status .t { color: white; - background: red; display: inline-block; padding:0px 5px; } +.status .text-danger { + background: red; +} + +.status .text-warning { + background: yellow; + color: black; +} + +.status .text-default { +} + diff --git a/public/js/controllers/status.js b/public/js/controllers/status.js index 6009f0d4..56c823a3 100644 --- a/public/js/controllers/status.js +++ b/public/js/controllers/status.js @@ -23,19 +23,6 @@ function($scope, $routeParams, $location, $rootScope, Global, Status, Sync, get_ }; var on_sync_update = function(sync) { - - if (!sync.error) { - if (sync.blocksToSync > sync.syncedBlocks) { - var p = parseInt(100*(sync.syncedBlocks) / sync.blocksToSync); - var delta = sync.blocksToSync - sync.syncedBlocks; - sync.message = 'Sync ' + p + '% ['+delta+' blocks remaining]'; - sync.style = 'warn'; - } else { - sync.message = 'On sync'; - sync.style = 'success'; - } - sync.tooltip = 'Synced blocks: '+sync.syncedBlocks; - } $scope.sync = sync; }; @@ -52,7 +39,6 @@ function($scope, $routeParams, $location, $rootScope, Global, Status, Sync, get_ var socket = get_socket($scope); socket.emit('subscribe', 'sync'); socket.on('status', function(sync) { - console.log('[status.js.55::] sync status update received!'); on_sync_update(sync); }); diff --git a/public/views/header.html b/public/views/header.html index 2ee0e1c2..726b8384 100755 --- a/public/views/header.html +++ b/public/views/header.html @@ -25,10 +25,9 @@
-
ERROR
- - - {{sync.message}} +
ERROR
+
{{sync.status}} {{sync.syncPercentage}}%
+
On sync