From a52f7ce648125f0c16c3e711339d634d8a29bf4f Mon Sep 17 00:00:00 2001 From: lois <lois@procolix.eu> Date: Wed, 19 Mar 2025 15:34:18 +0100 Subject: [PATCH] dissable deploy while deploying --- panel/src/panel/templates/configuration_form.html | 1 + panel/src/panel/views.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/panel/src/panel/templates/configuration_form.html b/panel/src/panel/templates/configuration_form.html index d47c07a5..e7752990 100644 --- a/panel/src/panel/templates/configuration_form.html +++ b/panel/src/panel/templates/configuration_form.html @@ -9,6 +9,7 @@ hx-trigger="click" hx-indicator="#spinner-container" hx-vals='{"deploy": ""}' + hx-disabled-elt="this" hx-swap="none" > Deploy diff --git a/panel/src/panel/views.py b/panel/src/panel/views.py index a8f37898..76117a4c 100644 --- a/panel/src/panel/views.py +++ b/panel/src/panel/views.py @@ -131,9 +131,9 @@ class ConfigurationForm(LoginRequiredMixin, FormView): "apply", "test", ] - print('start deployment') - sleep(10) - print('done with deployment') - #subprocess.run(cmd, cwd=os.getenv("REPO_DIR") or f"{os.getcwd()}/..", env=env) + # print('start deployment') + # sleep(10) + # print('done with deployment') + subprocess.run(cmd, cwd=os.getenv("REPO_DIR") or f"{os.getcwd()}/..", env=env) return super().form_valid(form)