Cleaned up eibi/repeaterbook status display.
This commit is contained in:
parent
e1bd2cd7c4
commit
7e427a6a80
|
|
@ -32,8 +32,10 @@ class ServiceController(AuthorizationMixin, WebpageController):
|
||||||
<th>Frequency</th>
|
<th>Frequency</th>
|
||||||
</tr>
|
</tr>
|
||||||
{services}
|
{services}
|
||||||
|
<tr>
|
||||||
|
<td colspan=3>{status}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{status}
|
|
||||||
""".format(
|
""".format(
|
||||||
services="".join(ServiceController.renderService(c) for c in Services.listAll()),
|
services="".join(ServiceController.renderService(c) for c in Services.listAll()),
|
||||||
status=ServiceController.renderStatus()
|
status=ServiceController.renderStatus()
|
||||||
|
|
@ -45,16 +47,16 @@ class ServiceController(AuthorizationMixin, WebpageController):
|
||||||
ts = Repeaters.lastDownloaded()
|
ts = Repeaters.lastDownloaded()
|
||||||
if ts > 0:
|
if ts > 0:
|
||||||
ts = datetime.fromtimestamp(ts).strftime("%H:%M:%S, %m/%d/%Y")
|
ts = datetime.fromtimestamp(ts).strftime("%H:%M:%S, %m/%d/%Y")
|
||||||
result += "<div style='color:#00FF00;width:100%;text-align:center;'>Repeaters database downloaded at {0}.</div>\n".format(ts)
|
result += "<div style='color:#00FF00;text-align:center;'>Repeaters database downloaded at {0}.</div>\n".format(ts)
|
||||||
else:
|
else:
|
||||||
result += "<div style='color:#FF0000;width:100%;text-align:center;'>Repeaters database not downloaded.</div>\n"
|
result += "<div style='color:#FF0000;text-align:center;'>Repeaters database not downloaded.</div>\n"
|
||||||
ts = EIBI.lastDownloaded()
|
ts = EIBI.lastDownloaded()
|
||||||
if ts > 0:
|
if ts > 0:
|
||||||
ts = datetime.fromtimestamp(ts).strftime("%H:%M:%S, %m/%d/%Y")
|
ts = datetime.fromtimestamp(ts).strftime("%H:%M:%S, %m/%d/%Y")
|
||||||
result += "<div style='color:#00FF00;width:100%;text-align:center;'>Shortwave schedule downloaded at {0}.</div>\n".format(ts)
|
result += "<div style='color:#00FF00;text-align:center;'>Shortwave schedule downloaded at {0}.</div>\n".format(ts)
|
||||||
else:
|
else:
|
||||||
result += "<div style='color:#FF0000;width:100%;text-align:center;'>Shortwave schedule not downloaded.</div>\n"
|
result += "<div style='color:#FF0000;text-align:center;'>Shortwave schedule not downloaded.</div>\n"
|
||||||
return "<p style='width:100%;'>\n" + result + "</p>\n"
|
return result
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def renderService(c):
|
def renderService(c):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue