mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-21 11:25:14 +00:00
#514: add meta-refresh=60 tag to t=status page for incomplete operations
This commit is contained in:
parent
2ee6356c89
commit
0129e9931f
@ -211,7 +211,7 @@ GET /operations/$HANDLE?t=status&output=JSON
|
||||
* how much of the operation is complete, and how much is left, if possible
|
||||
|
||||
The HTML form will include a meta-refresh tag, which will cause a regular
|
||||
web browser to reload the status page about 30 seconds later. This tag will
|
||||
web browser to reload the status page about 60 seconds later. This tag will
|
||||
be removed once the operation has completed.
|
||||
|
||||
POST /operations/$HANDLE?t=cancel
|
||||
@ -820,8 +820,8 @@ POST $URL?t=start-deep-check (must add &ophandle=XYZ)
|
||||
/operations page should be used to find out when the operation is done.
|
||||
|
||||
The HTML /operations/$HANDLE?t=status page for incomplete operations will
|
||||
contain a meta-refresh tag, set to 30 seconds, so that a browser which uses
|
||||
deep-check will automatically poll until the operation has completed. (TODO)
|
||||
contain a meta-refresh tag, set to 60 seconds, so that a browser which uses
|
||||
deep-check will automatically poll until the operation has completed.
|
||||
|
||||
The JSON page (/options/$HANDLE?t=status&output=JSON) will contain a
|
||||
machine-readable JSON dictionary with the following keys:
|
||||
|
@ -5,6 +5,7 @@
|
||||
rel="stylesheet" type="text/css"/> -->
|
||||
<link href="/webform_css" rel="stylesheet" type="text/css"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta n:render="refresh" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
rel="stylesheet" type="text/css"/> -->
|
||||
<link href="/webform_css" rel="stylesheet" type="text/css"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta n:render="refresh" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
rel="stylesheet" type="text/css"/> -->
|
||||
<link href="/tahoe_css" rel="stylesheet" type="text/css"/>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta n:render="refresh" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
@ -106,6 +106,16 @@ class OphandleTable(rend.Page, service.Service):
|
||||
self.handles.pop(ophandle, None)
|
||||
|
||||
class ReloadMixin:
|
||||
REFRESH_TIME = 1*MINUTE
|
||||
|
||||
def render_refresh(self, ctx, data):
|
||||
if self.monitor.is_finished():
|
||||
return ""
|
||||
# dreid suggests ctx.tag(**dict([("http-equiv", "refresh")]))
|
||||
# but I can't tell if he's joking or not
|
||||
ctx.tag.attributes["http-equiv"] = "refresh"
|
||||
ctx.tag.attributes["content"] = str(self.REFRESH_TIME)
|
||||
return ctx.tag
|
||||
|
||||
def render_reload(self, ctx, data):
|
||||
if self.monitor.is_finished():
|
||||
|
Loading…
x
Reference in New Issue
Block a user