Bug: Audit log shakes on refresh
Spring Boot Admin Server information
-
Version: 4.0.1
-
Spring Boot version: 4.0.3
-
Configured Security: None
-
Webflux or Servlet application: WebFlux
Client information
-
Spring Boot versions: 4.0.3
-
Used discovery mechanism: Eureka
-
Webflux or Servlet application: Servlet
Description
Hello. It seems like that the Audit Log view shakes shortly on the right side every time it gets updated. See the gif below:
It's not urgent at all from my point of view, but it would be nice to get it fixed.
Analysis and Fix
The shaking is caused by a layout shift triggered by the loading spinner overlay being inserted/removed from the DOM on every 5-second poll cycle.
Root Cause
In views/instances/auditevents/index.vue, fetchAuditevents() unconditionally sets isLoading = true on every periodic refresh:
async fetchAuditevents() {
this.isLoading = true; // triggers every 5 seconds
...
}
sba-instance-section renders a loading spinner overlay (position: absolute, height: 100vh) when loading is true. This overlay is added to and removed from the DOM every poll cycle. The DOM insertion can cause a brief scrollbar appearance/disappearance, producing the horizontal layout shift (the "shake" on the right side).
Fix
Only show the loading state when there are no events yet (initial load or after a filter change clears the list):
this.isLoading = this.events.length === 0;
Periodic refreshes with existing data no longer toggle the loading state, eliminating the DOM churn that causes the shake.
PR: #5211
Hello @herley-shaori.
I left some comments in the PR ;) @SteKoe please have a look at them as well ;)