Files
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
2.0 KiB
HTML

{% extends "base.html" %}
{% block title %}域名管理 - DNS{% endblock %}
{% block content %}
<div class="page-header">
<h1>域名管理</h1>
<a href="{{ url_for('zone_create') }}" class="btn btn-primary">+ 添加域名</a>
</div>
<div class="card">
<div class="card-body">
{% if zones %}
<table class="table">
<thead>
<tr>
<th>域名</th>
<th>类型</th>
<th>Zone 文件</th>
<th>记录数</th>
<th>操作</th>
</tr>
</thead>
<tbody>
{% for z in zones %}
<tr>
<td><a href="{{ url_for('zone_detail', zone_name=z.name) }}"><strong>{{ z.name }}</strong></a></td>
<td><span class="badge badge-{{ z.type }}">{{ z.type }}</span></td>
<td class="text-mono text-sm">{{ z.filename }}</td>
<td>{{ z.record_count }}</td>
<td>
<a href="{{ url_for('zone_detail', zone_name=z.name) }}" class="btn-sm btn-primary">管理记录</a>
<a href="{{ url_for('zone_raw', zone_name=z.name) }}" class="btn-sm btn-info">原始文件</a>
<form method="POST" action="{{ url_for('zone_delete', zone_name=z.name) }}" style="display:inline" onsubmit="return confirm('确定删除域名 {{ z.name }} 及所有记录?')">
<button type="submit" class="btn-sm btn-danger">删除</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="empty-state">
<p>还没有任何域名</p>
<a href="{{ url_for('zone_create') }}" class="btn btn-primary">+ 创建第一个域名</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}