From af6a5dc3f8346647033dd946d7593f2c5041ebd4 Mon Sep 17 00:00:00 2001 From: Hassan Hashmi <75794688+hassanhashmey@users.noreply.github.com> Date: Thu, 21 Dec 2023 22:45:10 +0500 Subject: [PATCH] Docker site delete done --- .../websiteFunctions/ListDockersite.html | 73 +++++++++++-------- websiteFunctions/website.py | 19 ++++- 2 files changed, 59 insertions(+), 33 deletions(-) diff --git a/websiteFunctions/templates/websiteFunctions/ListDockersite.html b/websiteFunctions/templates/websiteFunctions/ListDockersite.html index cb56a194f..ee4a2df2c 100644 --- a/websiteFunctions/templates/websiteFunctions/ListDockersite.html +++ b/websiteFunctions/templates/websiteFunctions/ListDockersite.html @@ -15,9 +15,24 @@
{% trans "On this page you can launch, list, modify and delete Dockersite from your server." %}
@@ -105,37 +120,37 @@{% trans "Cannot list websites. Error message:" %} {$ errorMessage $}
diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index 4a6e9cdaf..294566755 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -6846,15 +6846,26 @@ def submitDockerSiteCreation(self, userID=None, data=None): def ListDockerSites(self, request=None, userID=None, data=None, DeleteID=None): currentACL = ACLManager.loadedACL(userID) + fdata={} try: if DeleteID != None: DockerSitesDelete = DockerSites.objects.get(pk=DeleteID) + passdata={} + passdata["domain"] = DockerSitesDelete.admin.domain + passdata["JobID"] = None + da = Docker_Sites(None, passdata) + da.DeleteDockerApp() DockerSitesDelete.delete() - except: - pass - pagination = self.DockersitePagination(currentACL, userID) + fdata['Deleted'] = 1 + except BaseException as msg: + fdata['LPError'] = 1 + fdata['LPMessage'] = str(msg) + + + fdata['pagination'] = self.DockersitePagination(currentACL, userID) + proc = httpProc(request, 'websiteFunctions/ListDockersite.html', - {"pagination": pagination}) + fdata) return proc.render() def fetchDockersite(self, userID=None, data=None):