mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Expose log details for admins
This commit is contained in:
@@ -551,6 +551,22 @@ $(function () {
|
||||
}
|
||||
});
|
||||
|
||||
$("a[data-expandlogs]").click(function (e) {
|
||||
e.preventDefault();
|
||||
var $a = $(this);
|
||||
var id = $(this).attr("data-id");
|
||||
$a.find(".fa").removeClass("fa-eye").addClass("fa-cog fa-spin");
|
||||
$.getJSON('/control/logdetail/?pk=' + id, function (data) {
|
||||
if ($a.parent().tagName === "p") {
|
||||
$("<pre>").html(JSON.stringify(data.data, null, 2)).insertAfter($a.parent());
|
||||
} else {
|
||||
$("<pre>").html(JSON.stringify(data.data, null, 2)).appendTo($a.parent());
|
||||
}
|
||||
$a.remove();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#ajaxerr").on("click", ".ajaxerr-close", ajaxErrDialog.hide);
|
||||
moment.locale($("body").attr("data-datetimelocale"));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user