Commit 70a29dd3 authored by Stavros Sachtouris's avatar Stavros Sachtouris Committed by Giorgos Korfiatis
Browse files

Show objects remaining to sync in CLI status

parent 3de72df1
......@@ -213,7 +213,11 @@ class AgkyraCLI(cmd.Cmd):
def _status_string(status=None):
"""Get the status string (Syncing, Paused, Not running)"""
if status:
return 'Paused' if status['paused'] else 'Syncing'
remain = status.get('unsynced', 0) - status.get('synced', 0)
if status['paused']:
return ('Pausing, %s remain' % remain) if remain else 'Paused'
else:
return 'Syncing%s' % (', %s remain' % remain) if remain else ''
return 'Not running'
def do_status(self, line):
......
......@@ -247,11 +247,11 @@ window.setInterval(function() {
var remaining = status.unsynced - status.synced;
if (status.paused){
if (remaining)
new_progress = 'Pausing, ' + remaining + ' remaining';
new_progress = 'Pausing, ' + remaining + ' remain';
else new_progress = 'Paused';
} else {
if (remaining)
new_progress = 'Syncing, ' + remaining + ' remaining';
new_progress = 'Syncing, ' + remaining + ' remain';
else new_progress = 'Running, all synced';
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment