diff --git a/burpui/api/async.py b/burpui/api/async.py
index 4c00648c..64d1d7dd 100644
--- a/burpui/api/async.py
+++ b/burpui/api/async.py
@@ -22,6 +22,7 @@ from ..sessions import session_manager
from ..ext.async import celery
from ..ext.cache import cache
from ..config import config
+from ..decorators import browser_cache
from six import iteritems
from zlib import adler32
@@ -754,6 +755,7 @@ class AsyncHistory(History):
"""
@cache.cached(timeout=1800, key_prefix=cache_key)
+ @browser_cache(1800)
@ns.marshal_with(
History.history_fields,
code=200,
@@ -845,6 +847,7 @@ class AsyncClientsReport(ClientsReport):
"""
@api.cache.cached(timeout=1800, key_prefix=cache_key)
+ @browser_cache(1800)
@ns.marshal_with(
ClientsReport.report_fields,
code=200,
diff --git a/burpui/api/misc.py b/burpui/api/misc.py
index 273fdc4e..9282e8ec 100644
--- a/burpui/api/misc.py
+++ b/burpui/api/misc.py
@@ -11,6 +11,7 @@ from . import api, cache_key
from ..server import BUIServer # noqa
from .custom import fields, Resource
from ..exceptions import BUIserverException
+from ..decorators import browser_cache
from ..ext.cache import cache
from six import iteritems
@@ -325,6 +326,7 @@ class About(Resource):
})
@cache.cached(timeout=3600, key_prefix=cache_key)
+ @browser_cache(3600)
@ns.marshal_with(about_fields, code=200, description='Success')
@ns.expect(parser)
def get(self, server=None):
@@ -430,6 +432,7 @@ class History(Resource):
})
@cache.cached(timeout=1800, key_prefix=cache_key)
+ @browser_cache(1800)
@ns.marshal_list_with(history_fields, code=200, description='Success')
@ns.expect(parser)
@ns.doc(
diff --git a/burpui/misc/backend/burp1.py b/burpui/misc/backend/burp1.py
index b0590cc9..1d482893 100644
--- a/burpui/misc/backend/burp1.py
+++ b/burpui/misc/backend/burp1.py
@@ -721,7 +721,7 @@ class Burp(BUIbackend):
if 'bytes' not in res:
res['bytes'] = 0
- if viewkeys(res) & {'start', 'estimated_bytes', 'bytes_in'}:
+ if set(['start', 'estimated_bytes', 'bytes_in']) <= set(viewkeys(res)):
try:
diff = time.time() - int(res['start'])
byteswant = int(res['estimated_bytes'])
diff --git a/burpui/misc/backend/burp2.py b/burpui/misc/backend/burp2.py
index 5e36dcbb..7629172e 100644
--- a/burpui/misc/backend/burp2.py
+++ b/burpui/misc/backend/burp2.py
@@ -640,8 +640,9 @@ class Burp(Burp1):
return ret
backup = None
+ phases = ['working', 'finishing']
for back in client['backups']:
- if 'flags' in back and 'working' in back['flags']:
+ if 'flags' in back and any([x in back['flags'] for x in phases]):
backup = back
break
# check we found a working backup
@@ -681,9 +682,14 @@ class Burp(Burp1):
else:
ret[name] = counter['count']
+ for phase in phases:
+ if phase in backup['flags']:
+ ret['phase'] = phase
+ break
+
if 'bytes' not in ret:
ret['bytes'] = 0
- if viewkeys(ret) & {'time_start', 'estimated_bytes', 'bytes'}:
+ if set(['time_start', 'estimated_bytes', 'bytes']) <= set(viewkeys(ret)):
try:
diff = time.time() - int(ret['time_start'])
byteswant = int(ret['estimated_bytes'])
diff --git a/burpui/templates/calendar.html b/burpui/templates/calendar.html
index 14793cea..1b14f91d 100644
--- a/burpui/templates/calendar.html
+++ b/burpui/templates/calendar.html
@@ -14,8 +14,6 @@