feat: Add a new monitoring dashboard for S2A account pool management with configurable settings and status display.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user