Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
201d31d25e | ||
|
|
40213494df |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,7 +21,7 @@ ALERT_CONFIG_FILE = 'alert_config.json'
|
||||
# 应用配置
|
||||
APP_NAME = "项目服务管理面板"
|
||||
APP_VERSION = "v3.4.1"
|
||||
APP_PORT = 16023
|
||||
APP_PORT = 16022
|
||||
|
||||
# 监控配置
|
||||
DEFAULT_THRESHOLDS = {
|
||||
|
||||
@@ -446229,7 +446229,3 @@
|
||||
127.0.0.1 - - [25/Jun/2026 12:10:58] "GET /api/alerts HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [25/Jun/2026 12:10:58] "GET /api/system/stats HTTP/1.1" 200 -
|
||||
127.0.0.1 - - [25/Jun/2026 12:11:07] "GET /api/projects HTTP/1.1" 200 -
|
||||
[2026-06-25 12:19:01] 项目服务管理面板 v3.4.1 初始化完成
|
||||
[2026-06-25 12:19:01] 启动 项目服务管理面板,端口: 16023
|
||||
[2026-06-25 12:29:07] 项目服务管理面板 v3.4.1 初始化完成
|
||||
[2026-06-25 12:29:07] 启动 项目服务管理面板,端口: 16023
|
||||
+418
-24
@@ -3,42 +3,416 @@
|
||||
"name": "hz1-PowerEdge-R730xd",
|
||||
"description": "黄庄1号服务器 - PowerEdge R730xd",
|
||||
"python_path": "/home/hz1/miniconda3/envs/openclaw/bin/python3.12",
|
||||
"updated": "2026-06-01"
|
||||
"updated": "2026-08-24"
|
||||
},
|
||||
"projects": [
|
||||
{
|
||||
"id": "param-hub-python",
|
||||
"name": "参数中心",
|
||||
"ports": [
|
||||
16041
|
||||
],
|
||||
"directory": "param-hub-python",
|
||||
"start_cmd": "mkdir -p logs && nohup python3 app.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'param-hub-python.*app.py' || true",
|
||||
"health_url": "http://localhost:16041/",
|
||||
"admin_url": "http://localhost:16041/admin",
|
||||
"description": "参数配置管理平台,多业务线参数统一管理",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/param-hub-python.git",
|
||||
"version": "v2.1.1",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "param-auto-manager",
|
||||
"name": "参数自动化管理",
|
||||
"ports": [
|
||||
16043
|
||||
],
|
||||
"directory": "param-auto-manager",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16043/",
|
||||
"admin_url": "",
|
||||
"description": "参数数据自动化管理系统,自动同步/校验/告警",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/param-auto-manager.git",
|
||||
"version": "v2.1.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "llama-cmd-gen",
|
||||
"name": "Llama命令生成器",
|
||||
"ports": [
|
||||
16052
|
||||
],
|
||||
"directory": "llama-cmd-gen",
|
||||
"start_cmd": "mkdir -p logs && nohup /home/hz1/miniconda3/envs/openclaw/bin/python3 app.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'llama-cmd-gen.*app.py' || true",
|
||||
"health_url": "http://localhost:16052/",
|
||||
"admin_url": "http://localhost:16052/admin",
|
||||
"description": "Llama 模型推理命令生成器,GPU/量化/参数智能匹配",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/llama-cmd-gen.git",
|
||||
"version": "v2.0.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "webtest-agent",
|
||||
"name": "网页测试智能体",
|
||||
"ports": [
|
||||
16061
|
||||
],
|
||||
"directory": "webtest-agent",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16061/",
|
||||
"admin_url": "",
|
||||
"description": "AI 网页测试智能体,LLM 驱动浏览器自动化测试(agent-browser)",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/webtest-agent.git",
|
||||
"version": "v1.1.1",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "project-panel",
|
||||
"name": "项目服务管理面板",
|
||||
"ports": [
|
||||
16022
|
||||
],
|
||||
"directory": "project-panel",
|
||||
"start_cmd": "mkdir -p logs && nohup /home/hz1/miniconda3/envs/openclaw/bin/python3 app.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'project-panel.*app.py' || true",
|
||||
"health_url": "http://localhost:16022/",
|
||||
"admin_url": "http://localhost:16022",
|
||||
"description": "统一管理所有 Web 服务项目,支持 Docker 监控、系统资源监控、Cron 管理",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/project-panel.git",
|
||||
"version": "v3.4.1",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "project-panel-dev",
|
||||
"name": "项目面板(开发版)",
|
||||
"ports": [
|
||||
16023
|
||||
],
|
||||
"directory": "project-panel-dev",
|
||||
"start_cmd": "mkdir -p logs && nohup /home/hz1/miniconda3/envs/openclaw/bin/python3 app.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'project-panel-dev.*app.py' || true",
|
||||
"health_url": "http://localhost:16023/",
|
||||
"admin_url": "http://localhost:16023",
|
||||
"description": "项目服务管理面板开发版(新功能预览)",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/project-panel-dev.git",
|
||||
"version": "v3.7.5",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "universal-crawler",
|
||||
"name": "通用爬虫系统",
|
||||
"ports": [
|
||||
16062
|
||||
],
|
||||
"directory": "universal-crawler",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16062/",
|
||||
"admin_url": "http://localhost:16062/admin",
|
||||
"description": "批量/定时/自动网页爬取,反爬处理 + 邮件通知",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/universal-crawler.git",
|
||||
"version": "v1.4.3",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "ai-worker-platform",
|
||||
"name": "AI Worker 平台",
|
||||
"ports": [
|
||||
16071
|
||||
],
|
||||
"directory": "ai-worker-platform",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16071/",
|
||||
"admin_url": "http://localhost:16071/admin",
|
||||
"description": "AI Worker 项目管理:任务看板/DAG编排/多Agent协作/评估/企业版",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/ai-worker-platform.git",
|
||||
"version": "v3.4.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "companion-assistant",
|
||||
"name": "随身助手",
|
||||
"ports": [
|
||||
16080
|
||||
],
|
||||
"directory": "companion-assistant",
|
||||
"start_cmd": "cd backend && ./start.sh",
|
||||
"stop_cmd": "cd backend && ./start.sh stop",
|
||||
"health_url": "http://localhost:16080/",
|
||||
"admin_url": "http://localhost:16080/#/admin",
|
||||
"description": "AI 随身助手:流式对话/智能体/多类型项目/语音/附件",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/companion-assistant.git",
|
||||
"version": "v0.2.1",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "nba-fan-hub",
|
||||
"name": "NBA球迷大全",
|
||||
"ports": [
|
||||
16090
|
||||
],
|
||||
"directory": "nba-fan-hub",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16090/",
|
||||
"admin_url": "http://localhost:16090/admin",
|
||||
"description": "NBA 数据问答 + 球队/球员/比赛/新闻/人物/排名六大浏览页",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/nba-fan-hub.git",
|
||||
"version": "v1.2.13",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "data-chart-tool",
|
||||
"name": "数据可视化图表生成器",
|
||||
"ports": [
|
||||
16016
|
||||
],
|
||||
"directory": "data-chart-tool",
|
||||
"start_cmd": "bash keepalive.sh",
|
||||
"stop_cmd": "pkill -f 'data-chart-tool.*server.js' || true",
|
||||
"health_url": "http://localhost:16016/",
|
||||
"admin_url": "",
|
||||
"description": "柱状/折线/混合/饼图/雷达图/双Y轴/表格/多图合并,服务端出图",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/data-chart-tool.git",
|
||||
"version": "v1.20.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "stock-advisor",
|
||||
"name": "智能荐股系统",
|
||||
"ports": [
|
||||
16095
|
||||
],
|
||||
"directory": "stock-advisor",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16095/",
|
||||
"admin_url": "http://localhost:16095/admin",
|
||||
"description": "六因子评分 + AI 深度研报 + RAG 资讯 + 量化策略回测 + 舆情监控",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/stock-advisor.git",
|
||||
"version": "v1.8.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "news-tracker",
|
||||
"name": "新闻智能跟踪",
|
||||
"ports": [
|
||||
16100
|
||||
],
|
||||
"directory": "news-tracker",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16100/",
|
||||
"admin_url": "",
|
||||
"description": "自动采集→打分→DeepSeek 深析→重要资讯实时/每日汇总邮件",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/news-tracker.git",
|
||||
"version": "v1.0.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "pdf-to-markdown",
|
||||
"name": "PDF→Markdown 转换",
|
||||
"ports": [
|
||||
16082
|
||||
],
|
||||
"directory": "pdf-to-markdown",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16082/",
|
||||
"admin_url": "",
|
||||
"description": "PDF 转 Markdown:文本页/影印页/混合页自适应 + 图片裁剪 + 表格转录",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/pdf-to-markdown.git",
|
||||
"version": "v1.0.2",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "llm-speed-tester",
|
||||
"name": "LLM 速度测试台",
|
||||
"ports": [
|
||||
16097
|
||||
],
|
||||
"directory": "llm-speed-tester",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16097/",
|
||||
"admin_url": "",
|
||||
"description": "多提供商 LLM 速度基准:TTFT/预填充/解码 tok/s + Excel/JSON 导出",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/llm-speed-tester.git",
|
||||
"version": "v2.1.1",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "tech-blog",
|
||||
"name": "技术博客系统",
|
||||
"ports": [
|
||||
16012
|
||||
],
|
||||
"directory": "tech-blog",
|
||||
"start_cmd": "mkdir -p logs && nohup python3 run.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'tech-blog.*run.py' || true",
|
||||
"health_url": "http://localhost:16012/",
|
||||
"admin_url": "http://localhost:16012/admin",
|
||||
"description": "Flask 技术文章展示 + 后台管理(文章/分类/标签/仪表盘)",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/tech-blog.git",
|
||||
"version": "v1.1.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "worldcup-predictor",
|
||||
"name": "世界杯预测系统",
|
||||
"ports": [
|
||||
16015
|
||||
],
|
||||
"directory": "worldcup-predictor",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "pkill -f 'worldcup-predictor.*app.py' || true",
|
||||
"health_url": "http://localhost:16015/",
|
||||
"admin_url": "http://localhost:16015/admin",
|
||||
"description": "世界杯比赛多算法预测对比 + 管理后台",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/worldcup-predictor.git",
|
||||
"version": "v1.0.5",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "remote-host-agent",
|
||||
"name": "远程主机代理",
|
||||
"ports": [
|
||||
16018
|
||||
],
|
||||
"directory": "remote-host-agent",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16018/api/health",
|
||||
"admin_url": "",
|
||||
"description": "机器B(无固定IP)监控/控制:HTTP上报 + 命令长轮询",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/remote-host-agent.git",
|
||||
"version": "v1.0.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "llm-forum",
|
||||
"name": "LLM 论坛",
|
||||
"ports": [
|
||||
16037
|
||||
],
|
||||
"directory": "llm-forum",
|
||||
"start_cmd": "mkdir -p logs && nohup node server.js > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'llm-forum.*server.js' || true",
|
||||
"health_url": "http://localhost:16037/",
|
||||
"admin_url": "http://localhost:16037/admin",
|
||||
"description": "大模型交流论坛:主题/回复/Markdown/分类/管理后台",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/llm-forum.git",
|
||||
"version": "v1.0.2",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "music-platform",
|
||||
"name": "音乐展示平台",
|
||||
"ports": [
|
||||
16031
|
||||
],
|
||||
"directory": "music-platform",
|
||||
"start_cmd": "mkdir -p logs && nohup node server.js > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'music-platform.*server.js' || true",
|
||||
"health_url": "http://localhost:16031/",
|
||||
"admin_url": "http://localhost:16031/admin",
|
||||
"description": "音乐平台:播放/歌词同步/搜索/歌手专辑歌单 + 后台管理",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/music-platform.git",
|
||||
"version": "v1.0.1",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "video-platform",
|
||||
"name": "短视频展示平台",
|
||||
"ports": [
|
||||
16035
|
||||
],
|
||||
"directory": "video-platform",
|
||||
"start_cmd": "./start.sh",
|
||||
"stop_cmd": "./start.sh stop",
|
||||
"health_url": "http://localhost:16035/",
|
||||
"admin_url": "http://localhost:16035/admin",
|
||||
"description": "短视频平台:弹幕(WS实时)/点赞/分类 + 后台管理",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/video-platform.git",
|
||||
"version": "v1.0.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "web-capture-api",
|
||||
"name": "网页截图API",
|
||||
"ports": [
|
||||
16025
|
||||
],
|
||||
"directory": "web-capture-api",
|
||||
"start_cmd": "mkdir -p logs && nohup /home/hz1/miniconda3/envs/openclaw/bin/python3 app.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'web-capture-api.*app.py' || true",
|
||||
"health_url": "http://localhost:16025/",
|
||||
"admin_url": "",
|
||||
"description": "网页截图/HTML 提取 REST API + Web 界面",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/web-capture-api.git",
|
||||
"version": "v1.4.2",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "agent-sessions-viewer",
|
||||
"name": "会话历史查看器",
|
||||
"ports": [
|
||||
16039
|
||||
],
|
||||
"directory": "agent-sessions-viewer",
|
||||
"start_cmd": "mkdir -p logs && nohup node server.js > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'agent-sessions-viewer.*server.js' || true",
|
||||
"health_url": "http://localhost:16039/",
|
||||
"admin_url": "http://localhost:16039/admin",
|
||||
"description": "OpenClaw 智能体历史会话/消息查看器",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/agent-sessions-viewer.git",
|
||||
"version": "v1.1.0",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
},
|
||||
{
|
||||
"id": "pdf-translate-web",
|
||||
"name": "PDF翻译助手",
|
||||
"type": "web",
|
||||
"ports": [
|
||||
16021
|
||||
],
|
||||
"directory": "pdf-translate-web",
|
||||
"start_cmd": "mkdir -p logs && nohup /home/hz1/miniconda3/envs/openclaw/bin/python3.12 app.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f 'python.*pdf-translate-web.*app.py' || true",
|
||||
"stop_cmd": "pkill -f 'pdf-translate-web.*app.py' || true",
|
||||
"health_url": "http://localhost:16021/",
|
||||
"description": "英文PDF翻译中文网站,支持用户系统、会员体系",
|
||||
"admin_url": "http://localhost:16021/admin",
|
||||
"git_repo": "http://121.40.164.32:12007/coder/pdf-translate-web",
|
||||
"version": "v2.0.0",
|
||||
"log_file": ""
|
||||
},
|
||||
{
|
||||
"id": "project-panel",
|
||||
"name": "项目服务管理面板",
|
||||
"type": "web",
|
||||
"ports": [
|
||||
16022
|
||||
],
|
||||
"directory": "project-panel",
|
||||
"start_cmd": "mkdir -p logs && nohup /home/hz1/miniconda3/envs/openclaw/bin/python3.12 app.py > logs/app.log 2>&1 & disown",
|
||||
"stop_cmd": "pkill -f python.*project-panel.*app.py || true",
|
||||
"health_url": "http://localhost:16022/",
|
||||
"description": "统一管理所有 Web 服务项目,支持 Docker 监控、系统资源监控、Cron 管理",
|
||||
"admin_url": "http://localhost:16022",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/project-panel",
|
||||
"version": "v3.0.0",
|
||||
"log_file": "logs/app.log"
|
||||
"description": "英文PDF翻译中文网站,支持用户系统、会员体系",
|
||||
"git_repo": "http://121.40.164.32:12007/hz4th_coder/pdf-translate-web.git",
|
||||
"version": "v2.10.1",
|
||||
"log_file": "logs/app.log",
|
||||
"type": "web"
|
||||
}
|
||||
],
|
||||
"external_services": [
|
||||
@@ -51,6 +425,26 @@
|
||||
],
|
||||
"health_url": "http://localhost:16001/health",
|
||||
"description": "高性能搜索引擎,只读监控"
|
||||
},
|
||||
{
|
||||
"id": "chroma",
|
||||
"name": "Chroma 向量库",
|
||||
"type": "external",
|
||||
"ports": [
|
||||
16010
|
||||
],
|
||||
"health_url": "http://localhost:16010/",
|
||||
"description": "向量数据库(RAG 项目共用)"
|
||||
},
|
||||
{
|
||||
"id": "embedding",
|
||||
"name": "Embedding 服务",
|
||||
"type": "external",
|
||||
"ports": [
|
||||
16011
|
||||
],
|
||||
"health_url": "http://localhost:16011/",
|
||||
"description": "bge-large-zh-v1.5 向量化 + rerank 精排"
|
||||
}
|
||||
]
|
||||
}
|
||||
+2583
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
+83
File diff suppressed because one or more lines are too long
+2
-122
@@ -5,8 +5,8 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>项目服务管理面板 v3.3.1</title>
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📊</text></svg>">
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
|
||||
<script src="/static/vendor/tailwindcss.js"></script>
|
||||
<link href="/static/vendor/remixicon/remixicon.css" rel="stylesheet">
|
||||
<style>
|
||||
body { background: #0f172a; }
|
||||
.card { background: #1e293b; border: 1px solid #334155; }
|
||||
@@ -177,7 +177,6 @@
|
||||
<button onclick="filterType('cli')" class="filter-bar-btn" data-type="cli"><i class="ri-terminal-box-line"></i> CLI工具</button>
|
||||
<button onclick="filterType('extension')" class="filter-bar-btn" data-type="extension"><i class="ri-chrome-line"></i> 插件</button>
|
||||
<button onclick="showAddServiceModal()" class="filter-bar-btn add-btn"><i class="ri-add-circle-line"></i> 新增服务</button>
|
||||
<button onclick="showAddWebModal()" class="filter-bar-btn add-btn"><i class="ri-server-line"></i> 新增Web服务</button>
|
||||
</div>
|
||||
|
||||
<!-- 项目列表 -->
|
||||
@@ -751,63 +750,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 新增Web服务模态框 -->
|
||||
<div id="addWebModal" class="modal-overlay hidden">
|
||||
<div class="card rounded-xl modal-content p-6">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h3 class="font-bold text-lg">新增Web服务</h3>
|
||||
<button onclick="closeAddWebModal()" class="text-gray-400 hover:text-white"><i class="ri-close-line text-xl"></i></button>
|
||||
</div>
|
||||
|
||||
<form id="addWebForm" onsubmit="saveWebProject(event)">
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">服务ID *</label>
|
||||
<input type="text" id="webProjectId" required class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="唯一标识,如:my-service">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">服务名称 *</label>
|
||||
<input type="text" id="webProjectName" required class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="显示名称">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">端口 *</label>
|
||||
<input type="text" id="webProjectPorts" required class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="多个端口用逗号分隔,如:8080,8081">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">项目目录</label>
|
||||
<input type="text" id="webProjectDir" class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="相对于works目录,如:tech-blog">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">启动命令</label>
|
||||
<input type="text" id="webProjectStartCmd" class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="如:python3 app.py">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">停止命令</label>
|
||||
<input type="text" id="webProjectStopCmd" class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="可选">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">后台URL</label>
|
||||
<input type="text" id="webProjectAdminUrl" class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="如:http://localhost:8080/admin">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="block text-gray-400 text-sm mb-1">描述</label>
|
||||
<input type="text" id="webProjectDesc" class="w-full bg-gray-700 text-gray-200 px-3 py-2 rounded-lg" placeholder="简要描述">
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end gap-2">
|
||||
<button type="button" onclick="closeAddWebModal()" class="btn bg-gray-600 hover:bg-gray-700 px-4 py-2 rounded-lg">取消</button>
|
||||
<button type="submit" class="btn bg-green-600 hover:bg-green-700 px-4 py-2 rounded-lg">添加</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 邮件通知规则模态框 -->
|
||||
<div id="emailRuleModal" class="modal-overlay hidden">
|
||||
<div class="card rounded-xl modal-content p-6">
|
||||
@@ -1874,68 +1816,6 @@
|
||||
localStorage.setItem('customServices', JSON.stringify(services));
|
||||
}
|
||||
|
||||
// ==================== 新增Web服务管理 ====================
|
||||
|
||||
function showAddWebModal() {
|
||||
document.getElementById('addWebForm').reset();
|
||||
document.getElementById('addWebModal').classList.remove('hidden');
|
||||
}
|
||||
|
||||
function closeAddWebModal() {
|
||||
document.getElementById('addWebModal').classList.add('hidden');
|
||||
}
|
||||
|
||||
function saveWebProject(event) {
|
||||
event.preventDefault();
|
||||
|
||||
const id = document.getElementById('webProjectId').value.trim();
|
||||
const name = document.getElementById('webProjectName').value.trim();
|
||||
const portsStr = document.getElementById('webProjectPorts').value.trim();
|
||||
const directory = document.getElementById('webProjectDir').value.trim();
|
||||
const startCmd = document.getElementById('webProjectStartCmd').value.trim();
|
||||
const stopCmd = document.getElementById('webProjectStopCmd').value.trim();
|
||||
const adminUrl = document.getElementById('webProjectAdminUrl').value.trim();
|
||||
const description = document.getElementById('webProjectDesc').value.trim();
|
||||
|
||||
// 解析端口
|
||||
const ports = portsStr.split(',').map(p => parseInt(p.trim())).filter(p => !isNaN(p));
|
||||
if (ports.length === 0) {
|
||||
alert('请输入有效的端口号');
|
||||
return;
|
||||
}
|
||||
|
||||
const data = {
|
||||
id: id,
|
||||
name: name,
|
||||
type: 'web',
|
||||
ports: ports,
|
||||
directory: directory,
|
||||
start_cmd: startCmd || 'python3 app.py',
|
||||
stop_cmd: stopCmd,
|
||||
admin_url: adminUrl,
|
||||
description: description
|
||||
};
|
||||
|
||||
fetch('/api/projects/add', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(data)
|
||||
})
|
||||
.then(res => res.json())
|
||||
.then(result => {
|
||||
if (result.error) {
|
||||
alert('错误: ' + result.error);
|
||||
return;
|
||||
}
|
||||
closeAddWebModal();
|
||||
loadProjects();
|
||||
alert('Web服务添加成功!');
|
||||
})
|
||||
.catch(err => {
|
||||
alert('添加失败: ' + err.message);
|
||||
});
|
||||
}
|
||||
|
||||
// ==================== 邮件通知规则管理 ====================
|
||||
|
||||
function getEmailRules() {
|
||||
|
||||
Reference in New Issue
Block a user