From 4e776113756a27864d91225d4f6b1c06f4c1c6e1 Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 5 Jul 2023 20:11:27 -0400 Subject: [PATCH] Remove ajax call for exclusions --- app/classes/shared/helpers.py | 6 ------ app/classes/web/ajax_handler.py | 5 ----- .../templates/panel/server_backup.html | 21 ++++++------------- 3 files changed, 6 insertions(+), 26 deletions(-) diff --git a/app/classes/shared/helpers.py b/app/classes/shared/helpers.py index e150cd0b..d8b26399 100644 --- a/app/classes/shared/helpers.py +++ b/app/classes/shared/helpers.py @@ -1146,12 +1146,6 @@ class Helpers: user_id, "send_temp_path", {"path": temp_dir} ) - def backup_select(self, path, user_id): - if user_id: - self.websocket_helper.broadcast_user( - user_id, "send_temp_path", {"path": path} - ) - @staticmethod def unzip_backup_archive(backup_path, zip_name): zip_path = os.path.join(backup_path, zip_name) diff --git a/app/classes/web/ajax_handler.py b/app/classes/web/ajax_handler.py index f3b22d32..0cbc5e58 100644 --- a/app/classes/web/ajax_handler.py +++ b/app/classes/web/ajax_handler.py @@ -188,11 +188,6 @@ class AjaxHandler(BaseHandler): ) return - elif page == "backup_select": - path = self.get_argument("path", None) - self.helper.backup_select(path, exec_user["user_id"]) - return - elif page == "jar_cache": if not superuser: self.redirect("/panel/error?error=Not a super user") diff --git a/app/frontend/templates/panel/server_backup.html b/app/frontend/templates/panel/server_backup.html index 761226bc..7c470e2a 100644 --- a/app/frontend/templates/panel/server_backup.html +++ b/app/frontend/templates/panel/server_backup.html @@ -523,17 +523,6 @@ closeButton: false }); - $.ajax({ - type: "POST", - headers: { 'X-XSRFToken': token }, - url: '/ajax/backup_select?id=' + server_id + '&path=' + path, - }); - } else { - bootbox.alert("You must input a path before selecting this button"); - } - }); - if (webSocket) { - webSocket.on('send_temp_path', function (data) { setTimeout(function () { var x = document.querySelector('.bootbox'); if (x) { @@ -543,13 +532,15 @@ if (x) { x.remove() } - document.getElementById('main-tree-input').setAttribute('value', data.path) - getTreeView(data.path); + document.getElementById('main-tree-input').setAttribute('value', path) + getTreeView(path); show_file_tree(); }, 5000); - }); - } + } else { + bootbox.alert("You must input a path before selecting this button"); + } + }); if (webSocket) { webSocket.on('backup_status', function (backup) { if (backup.percent >= 100) {