Handle rule filter serialization#469
Open
BastianLedererIcinga wants to merge 21 commits into
Open
Conversation
e3da66a to
b8a38fc
Compare
d5fe2f5 to
3bf7acb
Compare
nilmerg
reviewed
May 12, 2026
Introduce a new version of the `SourceHook` interface for v 1.0
`RuleFilterSuggestions` use the relevant functions of the `V2\SourceHook` to provide suggestions when editing event-rule filters
nilmerg
requested changes
May 13, 2026
Member
nilmerg
left a comment
There was a problem hiding this comment.
Didn't look at the controller or suggestions yet.
3a0fa1e to
015bfb8
Compare
Expect SourceHooks to use their type as a prefix in their name and identify them based on this
015bfb8 to
d8a98b8
Compare
nilmerg
requested changes
May 19, 2026
Use the parsed request body to pick either column or value suggestions
nilmerg
reviewed
May 19, 2026
nilmerg
requested changes
May 19, 2026
nilmerg
reviewed
May 19, 2026
nilmerg
requested changes
May 20, 2026
Member
nilmerg
left a comment
There was a problem hiding this comment.
please add a unit test for the source hook locator and the rule serializer.
| $this->redirectNow(Links::eventRule($ruleId)->setParam('_filterOnly')); | ||
| }); | ||
|
|
||
| $editor->getParser()->on(QueryString::ON_CONDITION, $hook->enrichCondition(...)); |
Member
There was a problem hiding this comment.
this may also throw, please guard it as well
nilmerg
reviewed
May 20, 2026
| } else { | ||
| $column = $requestData['column'] ?? null; | ||
| if ($column === null || $column === SearchEditor::FAKE_COLUMN) { | ||
| $provider = new EmptyIterator(); |
Member
There was a problem hiding this comment.
Once Icinga/ipl-web#381 is a thing, this should be handled like https://github.com/Icinga/ipl-web/blob/fde750c3a30a47370003a03687bf719edaaf8a22/src/Control/SearchBar/Suggestions.php#L348.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolve #466
Introduce
RuleSerializerto create Json from a configured filter.Introduce
Icinga\Module\Notifications\Hook\V2which no longer requiresserializeRuleFilter()andgetRuleFilterTargets()as they are now obsolete.Adjust
EventRuleControllerto skip target selection use the newRuleSerializer.require Icinga/ipl-web#380