- 添加FastAPI应用基础结构,包括主入口、路由和模型定义
- 实现Webhook接收端点(/webhook/{namespace})和健康检查(/health)
- 添加管理后台路由和模板,支持端点、目标、渠道和模板管理
- 包含SQLite数据库模型定义和初始化逻辑
- 添加日志记录和统计服务
- 包含Dockerfile和配置示例文件
- 添加项目文档,包括设计、流程图和验收标准
52 lines
2.8 KiB
HTML
52 lines
2.8 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 %}Webhook管理后台{% endblock %}</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<style>
|
|
body { padding-top: 20px; }
|
|
.nav-scroller { position: relative; z-index: 2; height: 2.75rem; overflow-y: hidden; }
|
|
.nav-scroller .nav { display: flex; flex-wrap: nowrap; padding-bottom: 1rem; margin-top: -1px; overflow-x: auto; text-align: center; white-space: nowrap; -webkit-overflow-scrolling: touch; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<!-- 状态栏 -->
|
|
{% if system_stats %}
|
|
<div class="alert alert-light border d-flex justify-content-between align-items-center py-2 mb-3">
|
|
<div>
|
|
<span class="badge bg-success me-2">运行中</span>
|
|
<span class="text-muted me-3">已运行: {{ system_stats.uptime }}</span>
|
|
<span class="text-muted">今日请求: {{ system_stats.today_count }}</span>
|
|
</div>
|
|
<div>
|
|
<small class="text-muted">最新日志: {{ system_stats.latest_log }}</small>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<header class="d-flex flex-wrap justify-content-center py-3 mb-4 border-bottom">
|
|
<a href="/admin" class="d-flex align-items-center mb-3 mb-md-0 me-md-auto link-body-emphasis text-decoration-none">
|
|
<span class="fs-4">Webhook中继管理</span>
|
|
</a>
|
|
<ul class="nav nav-pills">
|
|
<li class="nav-item"><a href="/admin" class="nav-link {% if active_page == 'dashboard' %}active{% endif %}">仪表盘</a></li>
|
|
<li class="nav-item"><a href="/admin/endpoints" class="nav-link {% if active_page == 'endpoints' %}active{% endif %}">端点管理</a></li>
|
|
<li class="nav-item"><a href="/admin/targets" class="nav-link {% if active_page == 'targets' %}active{% endif %}">目标管理</a></li>
|
|
<li class="nav-item"><a href="/admin/channels" class="nav-link {% if active_page == 'channels' %}active{% endif %}">通知渠道</a></li>
|
|
<li class="nav-item"><a href="/admin/templates" class="nav-link {% if active_page == 'templates' %}active{% endif %}">事件模板</a></li>
|
|
<li class="nav-item"><a href="/admin/logs" class="nav-link {% if active_page == 'logs' %}active{% endif %}">系统日志</a></li>
|
|
</ul>
|
|
</header>
|
|
|
|
<main>
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
{% block scripts %}{% endblock %}
|
|
</body>
|
|
</html>
|