mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Remove antequeted code after moving from db
This commit is contained in:
parent
efd3bef029
commit
dfa2f5fb1e
@ -473,9 +473,3 @@ class HelpersManagement:
|
||||
f"Not removing {dir_to_del} from excluded directories - "
|
||||
f"not in the excluded directory list for server ID {server_id}"
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def clear_unexecuted_commands():
|
||||
Commands.update({Commands.executed: True}).where(
|
||||
Commands.executed == False # pylint: disable=singleton-comparison
|
||||
).execute()
|
||||
|
@ -965,10 +965,6 @@ class Controller:
|
||||
# remove the server from the DB
|
||||
self.servers.remove_server(server_id)
|
||||
|
||||
@staticmethod
|
||||
def clear_unexecuted_commands():
|
||||
HelpersManagement.clear_unexecuted_commands()
|
||||
|
||||
@staticmethod
|
||||
def clear_support_status():
|
||||
HelperUsers.clear_support_status()
|
||||
|
@ -348,11 +348,6 @@ class AjaxHandler(BaseHandler):
|
||||
|
||||
server.backup_server()
|
||||
|
||||
elif page == "clear_comms":
|
||||
if exec_user["superuser"]:
|
||||
self.controller.clear_unexecuted_commands()
|
||||
return
|
||||
|
||||
elif page == "select_photo":
|
||||
if exec_user["superuser"]:
|
||||
photo = self.get_argument("photo", None)
|
||||
|
@ -221,11 +221,6 @@
|
||||
<h4 class="card-title"><i class="fas fa-user-tag"></i> {{ translate('panelConfig', 'adminControls',
|
||||
data['lang']) }}</h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<button type="button" class="btn btn-outline-danger clear-comm">{{ translate('panelConfig',
|
||||
'clearComms', data['lang']) }}</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -367,17 +362,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('.clear-comm').click(function () {
|
||||
var token = getCookie("_xsrf")
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
headers: { 'X-XSRFToken': token },
|
||||
url: '/ajax/clear_comm',
|
||||
success: function (data) {
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
$('.delete-photo').click(function () {
|
||||
var token = getCookie("_xsrf")
|
||||
let photo = $('#photo').find(":selected").val();
|
||||
|
Loading…
Reference in New Issue
Block a user