Skip to content

Conversation

@nilmerg
Copy link
Member

@nilmerg nilmerg commented Oct 23, 2025

resolves #354

@nilmerg nilmerg self-assigned this Oct 23, 2025
@cla-bot cla-bot bot added the cla/signed CLA is signed by all contributors of a PR label Oct 23, 2025
Copy link

Copilot AI left a 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_id foreign key to the rule table
  • Introducing a SourceHook interface 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.

@nilmerg nilmerg force-pushed the feature/source-bound-event-rules-354 branch 2 times, most recently from d16dbce to 13d379d Compare October 24, 2025 09:30
@nilmerg nilmerg force-pushed the feature/source-bound-event-rules-354 branch from 13d379d to a38bf4e Compare October 24, 2025 11:32
Copy link
Contributor

@sukhwinder33445 sukhwinder33445 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some minor ui issues In smaller browser window with two col layout:
Screenshot 2025-10-24 at 16 28 09

The model/form does not apply any padding:
Screenshot 2025-10-24 at 16 28 37

I think we should use the filter icon instead of the cog, it makes the purpose clearer.
Screenshot 2025-10-24 at 16 29 51

nilmerg added a commit to Icinga/icingadb-web that referenced this pull request Oct 28, 2025
@nilmerg nilmerg force-pushed the feature/source-bound-event-rules-354 branch from 37fe6b5 to 79e9271 Compare October 29, 2025 09:37
@nilmerg
Copy link
Member Author

nilmerg commented Oct 29, 2025

Merging even though Icinga/icinga-notifications#324 isn't

@nilmerg nilmerg merged commit 626d0c6 into main Oct 29, 2025
10 checks passed
@nilmerg nilmerg deleted the feature/source-bound-event-rules-354 branch October 29, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source bound event rules

3 participants