Files
dns-serrvice/templates/logs.html
T
AI Agent 0a18b94d84 feat: BIND DNS Web Manager - Web interface for managing BIND9 DNS server
- Flask + SQLite web app with user authentication
- Zone management: create/delete zones, edit raw zone files
- Record management: add/delete A/AAAA/CNAME/MX/TXT/NS/PTR/SRV/CAA records
- Service control: start/stop/restart/reload BIND via systemctl/rndc
- Configuration editor: edit named.conf.options/local with syntax validation
- DNS query testing: online dig tool
- Audit log: all operations logged with user/timestamp
- BIND9 backend, listening on port 53
2026-07-09 17:24:44 +08:00

49 lines
1.7 KiB
HTML

{% extends "base.html" %}
{% block title %}操作日志 - DNS{% endblock %}
{% block content %}
<div class="page-header">
<h1>操作日志</h1>
</div>
<div class="card">
<div class="card-body">
{% if logs %}
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>时间</th>
<th>用户</th>
<th>操作</th>
<th>详情</th>
</tr>
</thead>
<tbody>
{% for log in logs %}
<tr>
<td class="text-muted">{{ log.id }}</td>
<td class="text-mono text-sm">{{ log.timestamp.strftime('%Y-%m-%d %H:%M:%S') }}</td>
<td>{{ log.user }}</td>
<td>{{ log.action }}</td>
<td class="text-mono text-sm">{{ log.detail }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="pagination">
{% if pagination.has_prev %}
<a href="{{ url_for('logs', page=pagination.prev_num) }}" class="btn-sm btn-secondary">← 上一页</a>
{% endif %}
<span class="page-info">第 {{ pagination.page }} / {{ pagination.pages }} 页 (共 {{ pagination.total }} 条)</span>
{% if pagination.has_next %}
<a href="{{ url_for('logs', page=pagination.next_num) }}" class="btn-sm btn-secondary">下一页 →</a>
{% endif %}
</div>
{% else %}
<div class="empty-state"><p>暂无操作记录</p></div>
{% endif %}
</div>
</div>
{% endblock %}