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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user