- FastAPI REST API with JWT auth - aiogram 3 Telegram bot with admin middleware - APScheduler daily tasks (expiry, reminders, revoke, sync) - SQLAlchemy 2 async ORM with Alembic migrations - Jinja2 admin panel (Dashboard, Users, Payments, Servers, Tariffs) - VPN provider abstraction with MockProvider - Stats service with revenue/subscription analytics - Docker Compose (PostgreSQL + Redis + app) - Healthcheck endpoint
41 lines
1.2 KiB
HTML
41 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Tariffs — VPN Control Panel{% endblock %}
|
|
{% block content %}
|
|
<h2>Tariffs</h2>
|
|
<div class="count">{{ tariffs|length }} total</div>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Name</th>
|
|
<th>Duration</th>
|
|
<th>Price</th>
|
|
<th>Max Devices</th>
|
|
<th>Traffic</th>
|
|
<th>Status</th>
|
|
<th>Created</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for t in tariffs %}
|
|
<tr>
|
|
<td>{{ t.id }}</td>
|
|
<td>{{ t.name }}</td>
|
|
<td>{{ t.duration_days }} days</td>
|
|
<td>{{ "%.2f"|format(t.price) }} {{ t.currency }}</td>
|
|
<td>{{ t.max_devices }}</td>
|
|
<td>{% if t.traffic_gb %}{{ t.traffic_gb }} GB{% else %}Unlimited{% endif %}</td>
|
|
<td>
|
|
{% if t.is_active %}
|
|
<span class="badge badge-green">Active</span>
|
|
{% else %}
|
|
<span class="badge badge-red">Inactive</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ t.created_at.strftime("%Y-%m-%d") }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|