summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-27 14:01:32 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-02-27 14:01:32 +0000
commit54a6e687d3ad9e49edaa4e64035d6b094ede3d9e (patch)
treeb265bd3e444c0c00ef696bdbf84ff7031ff065a4
parent8ee8c6edb26a250a71f904e6766d953c9b1011f4 (diff)
downloadlorry-controller-liw/no-reload.tar.gz
Disable status page from automatically reloadingliw/no-reload
-rw-r--r--lorrycontroller/htmlstatus.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/lorrycontroller/htmlstatus.py b/lorrycontroller/htmlstatus.py
index ccaf56c..d7a5402 100644
--- a/lorrycontroller/htmlstatus.py
+++ b/lorrycontroller/htmlstatus.py
@@ -79,13 +79,8 @@ class HTMLStatusManager(object):
title = self.tag("title", content="Lorry Controller")
css = self.tag("link", href="trove.css", rel="stylesheet",
type="text/css")
- script = self.tag("script", type="text/JavaScript", content='''
-<!--
-function reloadAfter(timeout) {
- setTimeout("location.reload(true);", timeout);
-}
-// -->
-''') + self.tag("script", type="text/javascript", src="/table.js", content="")
+ script = self.tag(
+ "script", type="text/javascript", src="/table.js", content="")
return self.tag("head", content=title+css+script)
def gen_body(self):
@@ -110,14 +105,9 @@ function reloadAfter(timeout) {
footer = self.gen_footer()
# magic args
- kwargs = {
- "onload": "JavaScript:reloadAfter(5000);",
- }
- if self.state >= (len(state_names)-1):
- kwargs["onload"] = "JavaScript:reloadAfter(10000);"
return self.tag("body", content=self.tag(
"div", content=(header+steps+content+footer),
- Class="lorrycontroller"), **kwargs)
+ Class="lorrycontroller"))
def gen_content(self):
if self.failing is not None: