mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-31 21:06:10 +01: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}
|
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
|
@staticmethod
|
||||||
def unzip_backup_archive(backup_path, zip_name):
|
def unzip_backup_archive(backup_path, zip_name):
|
||||||
zip_path = os.path.join(backup_path, zip_name)
|
zip_path = os.path.join(backup_path, zip_name)
|
||||||
|
@ -188,11 +188,6 @@ class AjaxHandler(BaseHandler):
|
|||||||
)
|
)
|
||||||
return
|
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":
|
elif page == "jar_cache":
|
||||||
if not superuser:
|
if not superuser:
|
||||||
self.redirect("/panel/error?error=Not a super user")
|
self.redirect("/panel/error?error=Not a super user")
|
||||||
|
@ -523,17 +523,6 @@
|
|||||||
closeButton: false
|
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 () {
|
setTimeout(function () {
|
||||||
var x = document.querySelector('.bootbox');
|
var x = document.querySelector('.bootbox');
|
||||||
if (x) {
|
if (x) {
|
||||||
@ -543,13 +532,15 @@
|
|||||||
if (x) {
|
if (x) {
|
||||||
x.remove()
|
x.remove()
|
||||||
}
|
}
|
||||||
document.getElementById('main-tree-input').setAttribute('value', data.path)
|
document.getElementById('main-tree-input').setAttribute('value', path)
|
||||||
getTreeView(data.path);
|
getTreeView(path);
|
||||||
show_file_tree();
|
show_file_tree();
|
||||||
|
|
||||||
}, 5000);
|
}, 5000);
|
||||||
});
|
} else {
|
||||||
|
bootbox.alert("You must input a path before selecting this button");
|
||||||
}
|
}
|
||||||
|
});
|
||||||
if (webSocket) {
|
if (webSocket) {
|
||||||
webSocket.on('backup_status', function (backup) {
|
webSocket.on('backup_status', function (backup) {
|
||||||
if (backup.percent >= 100) {
|
if (backup.percent >= 100) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user