Render abbreviated time in map update results

This commit is contained in:
Sajith Sasidharan 2020-05-06 13:11:53 -04:00
parent 0c6889274d
commit 008812d6c8

View File

@ -944,7 +944,7 @@ class MapupdateStatusElement(Element):
if server:
return tag("Got privkey from: [%s]" % server.get_name())
else:
return tag("")
return tag
# Helper to query update status timings.
#
@ -954,8 +954,8 @@ class MapupdateStatusElement(Element):
def _get_update_status_timing(self, name, tag):
res = self._update_status.timings.get(name)
if not res:
return tag("")
return tag(str(res))
return tag("0")
return tag(abbreviate_time(res))
@renderer
def time_total(self, req, tag):