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)
34 lines
1.3 KiB
HTML
34 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}租户 · frps-manager{% endblock %}
|
|
{% block content %}
|
|
<div class="page-header">
|
|
<h1>租户</h1>
|
|
<a class="btn btn-primary" href="{{ url_for('tenants_new') }}">+ 新建租户</a>
|
|
</div>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr><th>名称</th><th>带宽 in/out</th><th>最大连接</th><th>客户端数</th><th>状态</th><th>操作</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for t in items %}
|
|
<tr>
|
|
<td><strong>{{ t.name }}</strong><br><span class="muted small">{{ t.description or '' }}</span></td>
|
|
<td>{{ t.bandwidth_in_mbps|fmt_mbps }} / {{ t.bandwidth_out_mbps|fmt_mbps }}</td>
|
|
<td>{{ t.max_connections or 'unlimited' }}</td>
|
|
<td>{{ t.clients|length }}</td>
|
|
<td>{% if t.is_active %}<span class="badge badge-ok">启用</span>{% else %}<span class="badge badge-off">禁用</span>{% endif %}</td>
|
|
<td class="actions">
|
|
<a href="{{ url_for('tenants_edit', tid=t.id) }}">编辑</a>
|
|
<form method="post" action="{{ url_for('tenants_delete', tid=t.id) }}" style="display:inline"
|
|
onsubmit="return confirm('确定删除租户 {{ t.name }} 吗?');">
|
|
<button class="link-btn link-danger">删除</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="6" class="muted">暂无租户</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %} |