tju-yxq opened a new issue, #2589:
URL: https://github.com/apache/rocketmq-dashboard/issues/2589

   ## Problem
   
   The Alert Rules page currently fetches every rule in one request:
   
   ```java
   public List<AlertRuleVO> listRules() {
       return alertRepository.findAllRules();
   }
   ```
   
   The page then renders the full list with `pagination={false}` and has no 
name search or enabled-state filter. Two mutation paths also read the complete 
inventory:
   
   - `toggleRule` scans every rule to locate one ID;
   - `bulkToggleRules` scans every rule to resolve a small ID list.
   
   This means a page that displays 20 rules still materializes and transfers 
the full rule inventory, and each toggle performs an O(total rules) repository 
read.
   
   ## Expected behavior
   
   - Add a backward-compatible `GET /api/alert-rules/page` endpoint.
   - Support name search, enabled filter, bounded page, and page size.
   - Apply filtering and stable ordering (`name ASC, id ASC`) in SQL.
   - Return the existing `items / total / page / size` contract.
   - Reject invalid page/pageSize before repository access.
   - Switch the Alert Rules page to server-driven pagination and filters.
   - Use a direct ID lookup for toggling one rule.
   - Resolve bulk-toggle IDs with an ID-bounded query.
   - Keep the unpaginated endpoint for export and existing callers.
   
   ## Verification scope
   
   Tests should cover repository SQL filters/ordering/pagination, service 
normalization and validation, HTTP parameter passing, and page 
filtering/pagination behavior.


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