修复数据统计错误的问题
This commit is contained in:
@@ -2070,6 +2070,18 @@
|
||||
const savedTheme = localStorage.getItem('theme');
|
||||
const themeToApply = savedTheme || settings.default_theme || 'dark';
|
||||
applyTheme(themeToApply);
|
||||
|
||||
// Apply settings to UI (logo, name, etc.)
|
||||
applySiteSettings(window.SITE_SETTINGS);
|
||||
|
||||
// Refresh overview and historical charts to reflect new source selections
|
||||
fetchNetworkHistory(true);
|
||||
// We can't force the WS broadcast easily from client,
|
||||
// but we can fetch the overview via REST API once to update UI
|
||||
fetch('/api/metrics/overview?force=true')
|
||||
.then(res => res.json())
|
||||
.then(data => updateDashboard(data))
|
||||
.catch(() => {});
|
||||
} else {
|
||||
const err = await response.json();
|
||||
showSiteMessage(`保存失败: ${err.error || '未知错误'}`, 'error');
|
||||
|
||||
Reference in New Issue
Block a user