diff --git a/apix-admin/src/main/resources/META-INF/resources/admin.js b/apix-admin/src/main/resources/META-INF/resources/admin.js
index 3ba56ec..4f98f0c 100644
--- a/apix-admin/src/main/resources/META-INF/resources/admin.js
+++ b/apix-admin/src/main/resources/META-INF/resources/admin.js
@@ -150,6 +150,8 @@
var accDelta = 0; // accumulated since last chart flush
var lastActivity = Date.now(); // time of last non-zero delta
var currentInterval = FAST_INTERVAL;
+ var lastFlushTime = Date.now();
+ var lastWindowRpm = 0; // rate from previous flush window
var ML = 36, MB = 18;
var W = el.parentElement.clientWidth || 900;
@@ -207,7 +209,11 @@
// Chart bucket: flush accumulated delta every 5 s regardless of poll rate
// Cap at rateLimit so the area never visually exceeds 100% (live label shows true value)
setInterval(function () {
- var rpm = Math.min(Math.round(accDelta * (60000 / CHART_TICK)), rateLimit);
+ var now = Date.now();
+ var elapsed = now - lastFlushTime;
+ var rpm = Math.min(Math.round(accDelta * (60000 / (elapsed || CHART_TICK))), rateLimit);
+ lastWindowRpm = rpm;
+ lastFlushTime = now;
buf.push(rpm); buf.shift();
path.attr('d', areaFn(buf));
accDelta = 0;
@@ -223,8 +229,12 @@
var delta = Math.max(0, total - lastTotal);
accDelta += delta;
if (delta > 0) lastActivity = Date.now();
- var rpm = elapsed > 0 ? Math.round(delta * (60000 / elapsed)) : 0;
- updateLabel(rpm);
+ // Use accumulated rate over current window — smooth, not instantaneous per-poll delta
+ var windowMs = Date.now() - lastFlushTime;
+ var liveRpm = windowMs > 200
+ ? Math.round(accDelta * (60000 / windowMs))
+ : lastWindowRpm; // too early in window — carry previous
+ updateLabel(liveRpm);
}
lastTotal = total;
currentInterval = (Date.now() - lastActivity > IDLE_AFTER_MS) ? IDLE_INTERVAL : FAST_INTERVAL;
diff --git a/apix-admin/src/main/resources/templates/DashboardResource/global.html b/apix-admin/src/main/resources/templates/DashboardResource/global.html
index 85e9c7c..a475bfe 100644
--- a/apix-admin/src/main/resources/templates/DashboardResource/global.html
+++ b/apix-admin/src/main/resources/templates/DashboardResource/global.html
@@ -106,6 +106,6 @@ nav {
-
+