feat: add Monitor page for S2A dashboard statistics, pool management, and health checks.

This commit is contained in:
2026-02-01 07:55:10 +08:00
parent 995af8e19a
commit 6254e3781b

View File

@@ -258,6 +258,15 @@ export default function Monitor() {
// 从后端加载监控设置
const loadMonitorSettings = async () => {
try {
// 加载全局代理配置(始终执行)
const configRes = await fetch('/api/config')
if (configRes.ok) {
const configJson = await configRes.json()
if (configJson.code === 0 && configJson.data) {
setGlobalProxy(configJson.data.default_proxy || '')
}
}
// 加载监控设置
const res = await fetch('/api/monitor/settings')
if (res.ok) {
@@ -288,15 +297,6 @@ export default function Monitor() {
return { target, autoAdd: autoAddVal, minInterval: minIntervalVal, checkInterval: checkIntervalVal, pollingEnabled: pollingEnabledVal, pollingInterval: interval, replenishUseProxy: replenishUseProxyVal, browserType: browserTypeVal }
}
}
// 加载全局代理配置
const configRes = await fetch('/api/config')
if (configRes.ok) {
const configJson = await configRes.json()
if (configJson.code === 0 && configJson.data) {
setGlobalProxy(configJson.data.default_proxy || '')
}
}
} catch (e) {
console.error('加载监控设置失败:', e)
}