wait to rerun instance page after action

Add a sleep to avoid too fast reload after an instance action so UI doesn't get the previous state
This commit is contained in:
Jordan Blasenhauer 2024-03-23 12:04:17 +01:00
parent b22394ce67
commit c96a5a5c9e

View file

@ -827,6 +827,8 @@ def instances():
kwargs={"operation": request.form["operation"]},
).start()
sleep(0.2)
return redirect(
url_for(
"loading",
@ -1584,7 +1586,6 @@ def custom_plugin(plugin: str):
# Get prerender from action.py
pre_render = run_action(plugin, "pre_render")
return render_template(
Environment(loader=FileSystemLoader(join(sep, "usr", "share", "bunkerweb", "ui", "templates") + "/")).from_string(page.decode("utf-8")),
username=current_user.get_id(),