mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Remove ajax call for exclusions
This commit is contained in:
parent
1b9e284f52
commit
4e77611375
@ -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)
|
||||
|
@ -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")
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user