-
Notifications
You must be signed in to change notification settings - Fork 0
Source bound event rules #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces source-bound event rules, allowing event rules to be associated with specific sources. This means that each event rule can now filter events from a particular source (e.g., Icinga 2, Kubernetes), making the notification system more flexible and organized. The change addresses issue #354.
Key changes include:
- Adding a
source_idforeign key to theruletable - Introducing a
SourceHookinterface for extensible source integrations - Refactoring the source configuration form to use hook-based integrations
- Updating the event rule forms to include source selection
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| public/css/mixins.less | Adds styling to remove text decoration from button links |
| public/css/form.less | Adds styling for form descriptions and button-links in form controls |
| public/css/detail/event-rule-detail.less | Updates filter control styling and button wrappers |
| library/Notifications/Model/Source.php | Adds icon caching and hook-based icon retrieval |
| library/Notifications/Model/Rule.php | Adds source_id column and relation to Source model |
| library/Notifications/Hook/V1/SourceHook.php | Defines new interface for source integrations |
| library/Notifications/Common/Links.php | Adds helper method for source addition link |
| doc/03-Configuration.md | Updates documentation for source configuration |
| doc/01-About.md | Updates documentation to clarify source integrations |
| application/forms/SourceForm.php | Refactors form to use hook-based source integrations |
| application/forms/EventRuleForm.php | Adds source selection to event rule form |
| application/forms/EventRuleConfigForm.php | Updates to handle source_id in rule configuration |
| application/forms/DeleteSourceForm.php | New form for source deletion with cascade handling |
| application/controllers/SourcesController.php | Updates to handle hook-based source addition |
| application/controllers/SourceController.php | Separates delete action into dedicated controller action |
| application/controllers/EventRulesController.php | Adds source validation before rule creation |
| application/controllers/EventRuleController.php | Integrates hook-based filter editor for rules |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
d16dbce to
13d379d
Compare
13d379d to
a38bf4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sources are such an integral part, that their deletion should not be possible with a single click. Now even more so, as this results in all event rules being dropped as well. refs #249
37fe6b5 to
79e9271
Compare
|
Merging even though Icinga/icinga-notifications#324 isn't |



resolves #354