update
This commit is contained in:
1 parent
3c83bd6602
commit
574fc326cd
29 files changed
+1826
-1635
No files matched your search
@@ -0,0 +1,53 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>日志查询</title>
|
||||
<!-- 引入 Layui 的 CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui-src/dist/css/layui.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 20px;
|
||||
}
|
||||
h1 {
|
||||
color: #333;
|
||||
}
|
||||
#markdown-content {
|
||||
white-space: pre-wrap; /* Preserve whitespace and wrap lines */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-container">
|
||||
<h1 class="layui-title">程序运行日志</h1>
|
||||
<pre>{{ log_content }}</pre>
|
||||
<div id="markdown-content" class="layui-card-body"></div>
|
||||
</div>
|
||||
|
||||
<!-- 引入 Layui 的 JS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/layui-src/dist/layui.js"></script>
|
||||
<!-- <script>
|
||||
layui.use(['layer'], function(){
|
||||
var layer = layui.layer;
|
||||
|
||||
fetch('/get-log')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.content) {
|
||||
const htmlContent = marked.parse(data.content);
|
||||
document.getElementById('markdown-content').innerHTML = htmlContent;
|
||||
} else {
|
||||
document.getElementById('markdown-content').innerHTML = '<p>Error loading markdown.</p>';
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching the markdown:', error);
|
||||
document.getElementById('markdown-content').innerHTML = '<p>Failed to load markdown.</p>';
|
||||
layer.msg('Failed to load markdown.', {icon: 5});
|
||||
});
|
||||
});
|
||||
</script> -->
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user