21e3d61871
New /scan page lists all active devices on the subnet (ARP scan): - 静态绑定: matches a host declaration - 动态分配: matches a dhcpd.leases entry - 未知 / 外部: nothing matches (manually configured or from other DHCP server) Click '转为静态绑定' to convert a discovered device to a static host binding. Also includes: - arp-scan wrapper in dhcp_ops.py (get_local_network, arp_scan, classify_devices) - /scan route with optional auto-refresh every 30s - README updated with arp-scan install step + new feature bullet
52 lines
2.2 KiB
HTML
52 lines
2.2 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>{% block title %}DHCP 管理{% endblock %}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
</head>
|
|
<body>
|
|
{% if current_user %}
|
|
<header class="topbar">
|
|
<div class="topbar-inner">
|
|
<a class="brand" href="{{ url_for('dashboard') }}">📡 DHCP 管理</a>
|
|
<nav class="nav">
|
|
<a href="{{ url_for('dashboard') }}" class="{% if request.endpoint=='dashboard' %}active{% endif %}">总览</a>
|
|
<a href="{{ url_for('subnet_list') }}" class="{% if request.endpoint in ['subnet_list','subnet_new','subnet_edit'] %}active{% endif %}">子网</a>
|
|
<a href="{{ url_for('host_list') }}" class="{% if request.endpoint in ['host_list','host_new','host_edit'] %}active{% endif %}">静态绑定</a>
|
|
<a href="{{ url_for('lease_list') }}" class="{% if request.endpoint=='lease_list' %}active{% endif %}">租约</a>
|
|
<a href="{{ url_for('scan') }}" class="{% if request.endpoint=='scan' %}active{% endif %}">扫描</a>
|
|
<a href="{{ url_for('config_view') }}" class="{% if request.endpoint=='config_view' %}active{% endif %}">服务配置</a>
|
|
{% if is_admin %}
|
|
<a href="{{ url_for('log_list') }}" class="{% if request.endpoint=='log_list' %}active{% endif %}">日志</a>
|
|
{% endif %}
|
|
</nav>
|
|
<div class="userbox">
|
|
<span class="username">{{ current_user.username }}{% if is_admin %} <span class="badge">管理员</span>{% endif %}</span>
|
|
<a href="{{ url_for('profile') }}" class="link-muted">改密</a>
|
|
<a href="{{ url_for('logout') }}" class="link-muted">登出</a>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
{% endif %}
|
|
|
|
<main class="container">
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
<div class="flashes">
|
|
{% for cat, msg in messages %}
|
|
<div class="flash flash-{{ cat }}">{{ msg }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
|
|
<footer class="footer">
|
|
<span>DHCP Web Manager · /etc/dhcp/dhcpd.conf</span>
|
|
</footer>
|
|
</body>
|
|
</html> |