71214524f4
- Multi-tenant client/proxy management with Flask+SQLite - Frps server control (start/restart/token rotation) - Generate frpc.ini with shared server token + admin API - Dashboard API integration (live client/proxy status) - RBAC: admin/tenant_admin/user roles - Audit logging for all operations - Systemd service files included - Requires legacy INI format (frp 0.70 TOML auth broken)
24 lines
1.3 KiB
HTML
24 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{ '编辑' if item else '新建' }}租户 · frps-manager{% endblock %}
|
|
{% block content %}
|
|
<h1>{{ '编辑租户' if item else '新建租户' }}</h1>
|
|
<form method="post" class="form-card">
|
|
{% if item %}
|
|
<label>名称 <input value="{{ item.name }}" disabled></label>
|
|
{% else %}
|
|
<label>名称 <input name="name" required pattern="[a-zA-Z0-9_-]+" title="字母数字下划线短横线"></label>
|
|
{% endif %}
|
|
<label>描述 <input name="description" value="{{ item.description or '' }}"></label>
|
|
<label>入站带宽 (Mbps, 0=不限) <input name="bandwidth_in_mbps" type="number" min="0" value="{{ item.bandwidth_in_mbps if item else 0 }}"></label>
|
|
<label>出站带宽 (Mbps, 0=不限) <input name="bandwidth_out_mbps" type="number" min="0" value="{{ item.bandwidth_out_mbps if item else 0 }}"></label>
|
|
<label>最大并发连接 (0=不限) <input name="max_connections" type="number" min="0" value="{{ item.max_connections if item else 0 }}"></label>
|
|
<label class="checkbox">
|
|
<input type="checkbox" name="is_active" {% if item is none or item.is_active %}checked{% endif %}>
|
|
启用
|
|
</label>
|
|
<div class="form-actions">
|
|
<button class="btn btn-primary" type="submit">保存</button>
|
|
<a class="btn" href="{{ url_for('tenants_list') }}">取消</a>
|
|
</div>
|
|
</form>
|
|
{% endblock %} |