tju-yxq opened a new pull request, #2581:
URL: https://github.com/apache/rocketmq-dashboard/pull/2581

   ## Summary
   
   - add `GET /api/system-alerts/page` with `level`, `page`, and bounded 
`pageSize`
   - apply level filtering, deterministic `time DESC, id DESC` ordering, and 
pagination in SQL via MyBatis-Plus `Page`
   - reject invalid page/pageSize before repository access
   - return the existing `items / total / page / size` page contract
   - add direct `findAlertById` lookup so acknowledging one alert no longer 
scans every event
   - keep the existing unpaginated endpoint for compatibility
   - add frontend API/service page support and wire Alert Events to 
server-driven pagination, server total, 20/50/100 page sizes, page reset on 
filter change, and stale-response protection
   - keep simultaneous acknowledgements independent
   
   ## Why
   
   The Alert Events page currently loads every event in one request, then 
filters and renders it in memory. Native alert collection can write events 
continuously, so the response and table grow without a bounded page size or 
server total. Acknowledging one event also loads the entire table just to find 
one row. This makes Alert Events consistent with the other bounded Studio 
inventories and reduces both list reads and acknowledge reads.
   
   ## Tests
   
   - focused backend: `AlertServiceTest, SystemAlertControllerTest, 
MybatisPlusAlertRepositoryTest` — 65 tests passed
   - focused frontend: `ops` API/service tests plus `SystemAlertsPage.test.tsx` 
— 3 files / 29 tests passed
   - `npm run lint -- --quiet`: 0 errors (2 pre-existing warnings)
   - `npm run build`: passed
   - `git diff --check`: passed
   
   Production changes: 240 additions / 118 deletions across backend and 
frontend, naturally exceeding 100 production lines without test padding.
   
   Closes #2580
   


-- 
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]

Reply via email to