yyqdbngt opened a new pull request, #4081:
URL: https://github.com/apache/rocketmq-dashboard/pull/4081
## Summary
Adds an **Export CSV** button to the K8s certificate page
(`web/src/pages/cluster/certs.tsx`). Clicking it downloads the **currently
filtered** certificate inventory (`filteredCerts`, i.e. the rows matching the
existing search box and type filter) as `rocketmq-k8s-certs-YYYY-MM-DD.csv`.
The exported columns match the page table's actual fields:
`ID, K8s ID, Cluster, Type, Issuer, Not Before, Not After, Days Remaining,
Status`
The export is metadata only — `certPem`/`keyPem` private key material is
deliberately never included (covered by a test that seeds PEM content and
asserts it does not appear in the CSV). The button is disabled when no
certificate matches the current filters.
## Why
Operators need an offline, shareable view of the Kubernetes certificate
inventory (e.g. for expiry reviews or audits). The page already supports
searching and type filtering, so exporting exactly what the filters show lets
users capture a precise subset without exposing private key material.
## Testing
- Local: `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` → 10 passed, including:
- `exports the filtered certificate metadata as CSV`
- `never exports PEM private key material`
- `disables the CSV export button when no certificate matches`
--
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]