1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

huge commit for webfront facelift

This commit is contained in:
RaidMax
2022-04-19 18:43:58 -05:00
parent 7b78e0803a
commit d5b4c60e5a
105 changed files with 2981 additions and 2545 deletions

View File

@ -7,16 +7,30 @@
}
showLoader();
$.get('/Console/ExecuteAsync', { serverId: serverId, command: command })
$.get('/Console/Execute', { serverId: serverId, command: command })
.done(function (response) {
$('#console_command_response pre').html('');
hideLoader();
$('#console_command_response').append(response);
response.map(r => r.response).forEach(item => {
$('#console_command_response').append(`<div>${item}</div>`);
})
$('#console_command_response').append('<hr/>')
$('#console_command_value').val("");
})
.fail(function (jqxhr, textStatus, error) {
.fail(function (response) {
$('#console_command_response pre').html('');
errorLoader();
hideLoader();
$('#console_command_response').text(_localization['WEBFRONT_CONSOLE_ERROR'] + error).addClass('text-danger');
if (response.status < 500) {
response.responseJSON.map(r => r.response).forEach(item => {
$('#console_command_response').append(`<div class="text-danger">${item}</div>`);
})
} else {
$('#console_command_response').append(`<div class="text-danger">Could not execute command...</div>`);
}
});
}
@ -36,4 +50,4 @@ $(document).ready(function () {
executeCommand();
}
});
});
});