yyqdbngt opened a new pull request, #4097:
URL: https://github.com/apache/rocketmq-dashboard/pull/4097
## Summary
Show the last successful certificate-list load time ("最近更新 HH:mm:ss", i18n
key `common.lastUpdated`) in the K8s certificates page toolbar. A successful
`listK8sCerts` response (initial load or the new manual refresh button) stamps
`Date.now()`; failed loads keep the previous successful value. The indicator is
hidden until the first successful load. A "刷新" (Refresh) button was added next
to it because the page previously had no way to reload the list.
## Why
The certificate list only loads once on mount, and the page had no refresh
control, so operators could not tell how stale the records were. This adds a
refresh affordance plus a freshness indicator, following the same pattern as
the clients/proxy pages.
## Testing
- Local type-check: `cd web && ./node_modules/.bin/tsc -b tsconfig.app.json`
→ exit 0.
- Server Node 20: `./node_modules/.bin/vitest run
src/pages/cluster/__tests__/K8sCertsPage.test.tsx` → all tests green.
- New tests (no existing test covered freshness):
- shows the last successful cert load time;
- updates the load time after a successful manual refresh;
- keeps the previous load time when a refresh fails.
--
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]