refactor: deduplicate selected-item bulk action dispatch#279
Open
somethingwithproof wants to merge 1 commit intoCacti:developfrom
Open
refactor: deduplicate selected-item bulk action dispatch#279somethingwithproof wants to merge 1 commit intoCacti:developfrom
somethingwithproof wants to merge 1 commit intoCacti:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the Syslog plugin’s rule pages (alerts/reports/removal) to remove duplicated “selected items” bulk-action dispatch logic by introducing a shared helper in functions.php, while keeping per-page action maps local to preserve behavior.
Changes:
- Add
syslog_apply_selected_items_action()helper to centralize selected-item action dispatch and export session storage. - Update
form_actions()handlers in alerts/reports/removal pages to use the shared helper. - Add a small regression test to assert the helper exists and is referenced by all three pages; update changelog for issue #276.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
functions.php |
Introduces shared selected-item bulk-action dispatch helper (including export session handling). |
syslog_alerts.php |
Refactors bulk action dispatch in form_actions() to call the shared helper. |
syslog_reports.php |
Refactors bulk action dispatch in form_actions() to call the shared helper. |
syslog_removal.php |
Refactors bulk action dispatch in form_actions() to call the shared helper. |
tests/regression/issue276_bulk_action_dispatch_helper_test.php |
Adds regression coverage to detect removal/non-usage of the shared helper (string-based). |
CHANGELOG.md |
Adds issue #276 entry under develop. |
2278517 to
791fce6
Compare
somethingwithproof
added a commit
to somethingwithproof/plugin_syslog
that referenced
this pull request
Mar 10, 2026
Refs Cacti#279 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
791fce6 to
d4f5d0c
Compare
somethingwithproof
added a commit
to somethingwithproof/plugin_syslog
that referenced
this pull request
Mar 15, 2026
Refs Cacti#279 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
d4f5d0c to
1a76e1d
Compare
TheWitness
approved these changes
Mar 16, 2026
Refs Cacti#279 Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
1a76e1d to
72d8389
Compare
TheWitness
approved these changes
Mar 17, 2026
Member
|
So, let's do the following in this pull @somethingwithproof:
|
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.
Summary
Fixes #276
Validation