Files
inventory/templates/logs.html

44 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>系统日志</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
<header class="hero slim">
<div>
<h1>系统日志</h1>
<p>查看最近运行日志,优先关注 ERROR、WARNING 与 AI 接口失败记录</p>
</div>
<div class="hero-actions">
<a class="btn btn-light" href="{{ url_for('types_page') }}">返回仓库概览</a>
<a class="btn btn-light" href="{{ url_for('ai_settings_page') }}">AI参数</a>
{% include '_account_menu.html' %}
</div>
</header>
<main class="container">
<section class="panel">
<div class="group-title-row">
<div>
<h2>日志文件</h2>
<p class="hint">路径:{{ log_path }}</p>
</div>
<div class="actions">
<a class="btn btn-light" href="{{ url_for('system_logs_page', lines=100) }}">最近100行</a>
<a class="btn btn-light" href="{{ url_for('system_logs_page', lines=200) }}">最近200行</a>
<a class="btn btn-light" href="{{ url_for('system_logs_page', lines=500) }}">最近500行</a>
</div>
</div>
{% if log_lines %}
<pre class="ai-panel-content log-viewer">{{ log_lines | join('\n') }}</pre>
{% else %}
<p class="hint">当前还没有日志记录。首次出现错误后会自动写入。</p>
{% endif %}
</section>
</main>
</body>
</html>