Aias00 opened a new issue, #4178:
URL: https://github.com/apache/rocketmq-dashboard/issues/4178

   ## Problem
   
   The Cluster and Business Alert pages currently upload an alert-rule transfer 
document and call the import endpoint immediately. Operators cannot review the 
impact before persistence. Invalid rules abort the import without row-level 
diagnostics, while rules whose evaluation semantics already exist fail as 
duplicate conflicts with no option to skip or update the existing rule.
   
   For a control-plane import workflow, file selection should not immediately 
mutate alert configuration.
   
   ## Proposed behavior
   
   Add a two-step import workflow for both Cluster and Business alert rules:
   
   1. Upload and parse a versioned transfer document.
   2. Ask the server for a read-only preview.
   3. Classify every row as `NEW`, `DUPLICATE`, or `INVALID`.
   4. Show row-level validation errors and the matching existing rule for 
duplicates.
   5. Let the operator choose a conflict strategy:
      - `FAIL`: reject the apply operation when any duplicate exists.
      - `SKIP`: create new rules and leave duplicate rules unchanged.
      - `REPLACE`: create new rules and update the existing rule matched by 
semantic identity.
   6. Show create / replace / skip / invalid counts and require explicit 
confirmation before apply.
   7. Return an apply summary and refresh the rule list.
   
   Invalid rows always block apply. The import does not delete rules.
   
   ## Compatibility
   
   Keep the existing `POST /import` transfer endpoint for existing clients. Add 
dedicated preview and apply endpoints for the new workflow.
   
   ## Acceptance criteria
   
   - Preview performs no writes.
   - All rows are validated before any apply mutation.
   - Duplicate matching uses Studio's existing semantic fingerprint/uniqueness 
definition.
   - `FAIL`, `SKIP`, and `REPLACE` have deterministic results.
   - Apply is transactional; a failed create/update does not leave a partial 
import.
   - Cluster and Business domains use the same service logic.
   - The UI ignores stale preview responses and cannot apply a preview after 
the selected file or strategy changes.
   - Chinese and English text, backend/controller/API/component tests, and API 
documentation are included.
   


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