feat: Add a new monitoring dashboard for S2A account pool management with configurable settings and status display.

This commit is contained in:
2026-01-30 12:14:33 +08:00
parent b9c5b42f4e
commit 5987a425ec
2 changed files with 71 additions and 23 deletions

View File

@@ -6,6 +6,7 @@ import (
"strconv"
"codex-pool/internal/database"
"codex-pool/internal/logger"
)
// MonitorSettings 监控设置
@@ -87,6 +88,11 @@ func HandleSaveMonitorSettings(w http.ResponseWriter, r *http.Request) {
database.Instance.SetConfig("monitor_polling_enabled", strconv.FormatBool(settings.PollingEnabled))
database.Instance.SetConfig("monitor_polling_interval", strconv.Itoa(settings.PollingInterval))
// 输出日志
logger.Info("监控设置已保存: target="+strconv.Itoa(settings.Target)+
", polling="+strconv.FormatBool(settings.PollingEnabled)+
", interval="+strconv.Itoa(settings.PollingInterval)+"s", "", "monitor")
Success(w, map[string]interface{}{
"message": "设置已保存",
"settings": settings,