Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
agkyra
Commits
70a29dd3
Commit
70a29dd3
authored
Jun 10, 2015
by
Stavros Sachtouris
Committed by
Giorgos Korfiatis
Oct 19, 2015
Browse files
Show objects remaining to sync in CLI status
parent
3de72df1
Changes
2
Hide whitespace changes
Inline
Side-by-side
agkyra/cli.py
View file @
70a29dd3
...
...
@@ -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
):
...
...
agkyra/nwgui/menu.html
View file @
70a29dd3
...
...
@@ -247,11 +247,11 @@ window.setInterval(function() {
var
remaining
=
status
.
unsynced
-
status
.
synced
;
if
(
status
.
paused
){
if
(
remaining
)
new_progress
=
'
Pausing,
'
+
remaining
+
'
remain
ing
'
;
new_progress
=
'
Pausing,
'
+
remaining
+
'
remain
'
;
else
new_progress
=
'
Paused
'
;
}
else
{
if
(
remaining
)
new_progress
=
'
Syncing,
'
+
remaining
+
'
remain
ing
'
;
new_progress
=
'
Syncing,
'
+
remaining
+
'
remain
'
;
else
new_progress
=
'
Running, all synced
'
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment