Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jelle van der Waa
Archweb
Commits
8577d595
Commit
8577d595
authored
Feb 18, 2018
by
Johannes Löthberg
Browse files
mirrors/views/api: Add URL active status
Signed-off-by:
Johannes Löthberg
<
johannes@kyriasis.com
>
parent
f42f357f
Changes
1
Hide whitespace changes
Inline
Side-by-side
mirrors/views/api.py
View file @
8577d595
...
...
@@ -15,7 +15,7 @@ class MirrorStatusJSONEncoder(DjangoJSONEncoder):
'''Base JSONEncoder extended to handle datetime.timedelta and MirrorUrl
serialization. The base class takes care of datetime.datetime types.'''
url_attributes
=
(
'url'
,
'protocol'
,
'last_sync'
,
'completion_pct'
,
'delay'
,
'duration_avg'
,
'duration_stddev'
,
'score'
)
'delay'
,
'duration_avg'
,
'duration_stddev'
,
'score'
,
'active'
)
def
default
(
self
,
obj
):
if
isinstance
(
obj
,
timedelta
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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