dengliming opened a new pull request, #4405:
URL: https://github.com/apache/hertzbeat/pull/4405

   ## What's changed?
   
   Creating a realtime metric alert in visual mode with Linux / CPU selected 
and no threshold conditions can submit an expression containing only the 
application and metric filters. The save handler only registers the 
query-builder control when the cascade has three values, but the selector now 
has two levels, so its invalid state never blocks submission.
   
   Validate the query-builder control directly when saving visual realtime 
metric or log rules, and mark it dirty and touched to display validation 
errors. Require a non-empty generated threshold expression so empty nested 
groups do not count as conditions. Availability rules, expression mode, and 
periodic alerts keep their existing validation paths without retaining an 
unrelated ruleset control in the form.
   
   ### Validation
   
   - 21 component tests passed, including create/update rejection of empty 
rules and nested groups, valid nested and existence conditions, mode switching, 
and other form validators.
   - ESLint, Prettier, and `git diff --check` passed for the changed files.
   - Browser verification using the original frontend with a local mock API: 
empty rules and empty nested groups display a required-field error without 
sending a save request; adding `usage > 90` allows the visual rule to be 
submitted. No real backend persistence or alert delivery was exercised.
   
   ## Checklist
   
   - [x] I have read the repository [Contributing 
Guide](https://github.com/apache/hertzbeat/blob/master/CONTRIBUTING.md).
   - [x] I have written the necessary comments.
   - [x] I have added the necessary unit tests and all selected cases have 
passed.
   
   ## Add or update API
   
   Not applicable; no API changes.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to