0a18b94d84
- 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
46 lines
1.8 KiB
HTML
46 lines
1.8 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{% if zone %}编辑域名{% else %}创建域名{% endif %} - DNS{% endblock %}
|
|
{% block content %}
|
|
<div class="page-header">
|
|
<h1>{% if zone %}编辑域名{% else %}创建域名{% endif %}</h1>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<form method="POST" class="form">
|
|
<div class="form-group">
|
|
<label>域名 <span class="required">*</span></label>
|
|
<input type="text" name="zone_name" placeholder="example.com" required
|
|
value="{{ zone.name if zone else '' }}">
|
|
<p class="form-hint">不含末尾的点,例如 example.com</p>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>类型</label>
|
|
<select name="zone_type">
|
|
<option value="master" selected>master (主域)</option>
|
|
<option value="slave">slave (从域)</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>主 NS 服务器</label>
|
|
<input type="text" name="ns_server" placeholder="ns1.example.com">
|
|
<p class="form-hint">留空则自动使用 ns1.<域名></p>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>管理员邮箱</label>
|
|
<input type="text" name="admin_email" placeholder="admin@example.com">
|
|
<p class="form-hint">留空则自动使用 admin.<域名>,会自动将 @ 转为 .</p>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">创建域名</button>
|
|
<a href="{{ url_for('zone_list') }}" class="btn btn-secondary">取消</a>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|