forked from Fediversity/Fediversity
fix htmx deploy post acctualy activate deploy routine
This commit is contained in:
parent
e07576b65e
commit
71abfb141c
2 changed files with 7 additions and 2 deletions
panel/src/panel
|
@ -7,7 +7,9 @@
|
|||
<button id="deploy-button" class="button"
|
||||
hx-post="{% url 'configuration_form' %}"
|
||||
hx-trigger="click"
|
||||
hx-indicator="#spinner-container">
|
||||
hx-indicator="#spinner-container"
|
||||
hx-vals='{"deploy": ""}'
|
||||
hx-swap="none">
|
||||
Deploy
|
||||
<span class="htmx-indicator loader"></span>
|
||||
</button>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
from enum import Enum
|
||||
import json
|
||||
import subprocess
|
||||
import threading
|
||||
import os
|
||||
|
||||
from django.urls import reverse_lazy
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
|
@ -8,6 +10,7 @@ from django.contrib.auth.models import User
|
|||
from django.views.generic import TemplateView, DetailView
|
||||
from django.views.generic.edit import FormView
|
||||
|
||||
|
||||
from time import sleep
|
||||
|
||||
from panel import models
|
||||
|
@ -79,7 +82,7 @@ class ConfigurationForm(LoginRequiredMixin, FormView):
|
|||
"test",
|
||||
]
|
||||
print('start deployment')
|
||||
sleep(5)
|
||||
sleep(20)
|
||||
print('done with deployment')
|
||||
#subprocess.run(cmd, cwd=os.getenv("REPO_DIR") or f"{os.getcwd()}/..", env=env)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue