mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-15 14:16:08 -06:00
some improvement on the live monitoring stuff
This commit is contained in:
parent
4d66560eeb
commit
1f0b68567c
4 changed files with 11 additions and 3 deletions
|
|
@ -675,6 +675,7 @@ class AsyncRunningBackup(RunningBackup):
|
|||
This resource is part of the :mod:`burpui.api.async` module.
|
||||
"""
|
||||
|
||||
@api.cache.cached(timeout=60, key_prefix=cache_key)
|
||||
@ns.marshal_with(
|
||||
RunningBackup.running_fields,
|
||||
code=200,
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ class RunningBackup(Resource):
|
|||
'running': fields.Boolean(required=True, description='Is there a backup running right now'),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=60, key_prefix=cache_key)
|
||||
@ns.marshal_with(running_fields, code=200, description='Success')
|
||||
def get(self, server=None):
|
||||
"""Tells if a backup is running right now
|
||||
|
|
|
|||
|
|
@ -229,12 +229,18 @@ class Burp(BUIbackend):
|
|||
"""See :func:`burpui.misc.backend.interface.BUIbackend.is_one_backup_running`"""
|
||||
r = []
|
||||
if agent:
|
||||
r = self.servers[agent].is_one_backup_running(agent)
|
||||
try:
|
||||
r = self.servers[agent].is_one_backup_running(agent)
|
||||
except BUIserverException:
|
||||
pass
|
||||
self.running[agent] = r
|
||||
else:
|
||||
r = {}
|
||||
for name, serv in iteritems(self.servers):
|
||||
r[name] = serv.is_one_backup_running()
|
||||
try:
|
||||
r[name] = serv.is_one_backup_running()
|
||||
except BUIserverException:
|
||||
r[name] = []
|
||||
|
||||
self.running = r
|
||||
self.refresh = time.time()
|
||||
|
|
|
|||
|
|
@ -454,6 +454,6 @@ $(function() {
|
|||
{% if not login -%}
|
||||
var refresh_running = setInterval(function () {
|
||||
_check_running();
|
||||
}, {{ config.REFRESH * 1000 }});
|
||||
}, {{ config.LIVEREFRESH * 1000 }});
|
||||
{% endif -%}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue