Fix audit log raw

This commit is contained in:
amcmanu3 2024-04-20 16:54:33 -04:00
parent 3fac1a39a8
commit 2134c4226d
2 changed files with 7 additions and 1 deletions

View File

@ -156,6 +156,8 @@ class HelpersManagement:
)
def add_to_audit_log_raw(self, user_name, user_id, server_id, log_msg, source_ip):
if isinstance(server_id, Servers) and server_id is not None:
server_id = server_id.server_id
auth_logger.info(
str(log_msg),
extra={

View File

@ -111,7 +111,11 @@
$.each(data, function (index, value) {
let row = $('<tr>');
row.append(`<td>${value.time}</td>`);
row.append(`<td><a href="/panel/edit_user?id=${value.user_id}">${value.user_name}</a></td>`);
if (value.user_name != "system" && value.user_id != "-1") {
row.append(`<td><a href="/panel/edit_user?id=${value.user_id}">${value.user_name}</a></td>`);
} else {
row.append(`<td>${value.user_name}</td>`);
}
row.append(`<td>${value.log_msg}</td>`);
row.append(`<td>${value.server_id}</td>`);
row.append(`<td>${value.source_ip}</td>`);