Add FPS sparkline charts, configurable poll interval, and uptime interpolation

Replace text FPS labels with Chart.js sparklines on running targets,
use emoji icons for metrics, add in-place DOM updates to preserve
chart animations, and add a 1-10s poll interval slider that controls
all dashboard timers. Uptime now ticks every second via client-side
interpolation regardless of poll interval.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 03:04:17 +03:00
parent ef925ad0a9
commit 45634836b6
8 changed files with 290 additions and 19 deletions

View File

@@ -4,9 +4,9 @@
import { API_BASE, getHeaders } from '../core/api.js';
import { t } from '../core/i18n.js';
import { dashboardPollInterval } from '../core/state.js';
const MAX_SAMPLES = 60;
const POLL_INTERVAL_MS = 2000;
const STORAGE_KEY = 'perf_history';
let _pollTimer = null;
@@ -168,7 +168,7 @@ async function _fetchPerformance() {
export function startPerfPolling() {
if (_pollTimer) return;
_fetchPerformance();
_pollTimer = setInterval(_fetchPerformance, POLL_INTERVAL_MS);
_pollTimer = setInterval(_fetchPerformance, dashboardPollInterval);
}
export function stopPerfPolling() {