log lol, logo
This commit is contained in:
parent
bad5a5f7f0
commit
99598d9bb3
|
@ -1213,3 +1213,12 @@ img.avatar {
|
|||
border-radius: 25px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
/* log */
|
||||
div.logwrap {
|
||||
height: auto;
|
||||
text-align: left;
|
||||
}
|
||||
div.logwrap > p {
|
||||
line-height: 0;
|
||||
}
|
||||
|
|
|
@ -118,10 +118,10 @@ export default (router, tpl) => {
|
|||
});
|
||||
|
||||
router.get(/^\/admin\/log(\/)?$/, auth, async (req, res) => {
|
||||
exec("journalctl -xu f0ck", (err, stdout) => {
|
||||
exec("journalctl -qeu f0ck --no-pager", (err, stdout) => {
|
||||
res.reply({
|
||||
body: tpl.render("admin/log", {
|
||||
log: stdout.split("\n").slice(-500)
|
||||
log: stdout.split("\n").slice(0, -1)
|
||||
}, req)
|
||||
});
|
||||
});
|
||||
|
|
|
@ -6,18 +6,6 @@
|
|||
<p>{{ line }}</p>
|
||||
@endeach
|
||||
</div>
|
||||
<style>
|
||||
div.logwrap {
|
||||
height: 600px;
|
||||
overflow-y: scroll;
|
||||
text-align: left;
|
||||
direction: rtl;
|
||||
}
|
||||
div.logwrap > p {
|
||||
direction: ltr;
|
||||
line-height: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
(() => {
|
||||
const d = document.querySelector("div.logwrap");
|
||||
|
@ -25,4 +13,4 @@
|
|||
})();
|
||||
</script>
|
||||
@endif
|
||||
@include(main/footer)
|
||||
@include(main/footer)
|
||||
|
|
Loading…
Reference in New Issue
Block a user