yyqdbngt opened a new pull request, #4089:
URL: https://github.com/apache/rocketmq-dashboard/pull/4089
# feat(audit): show the last successful load time
## Summary
The audit log page (审计日志) now records `Date.now()` whenever the record list
fetch succeeds and shows a "最近更新 HH:mm:ss" ("Last Updated") timestamp in the
page header, next to the title/subtitle. The text uses the new
`common.lastUpdated`
i18n key (zh: 最近更新, en: Last Updated).
Failed record loads do not update the timestamp, so the last successful load
time
is preserved on the screen while the user retries or adjusts filters.
## Why
Audit lists are queried per filter combination and can be refreshed
implicitly by
filter changes; operators currently have no way to tell how old the rows on
screen
are. A lightweight freshness marker in the header answers that without extra
network calls.
## Testing
- `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json` → exit 0.
- `./node_modules/.bin/vitest run src/pages/ops/__tests__/AuditPage.test.tsx`
→ 10/10 passed (added: "shows the time of the last successful record load
in the
header" and "keeps the previous successful load time when a reload fails";
time
controlled with `vi.setSystemTime`, restored with `vi.useRealTimers()`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]