Centralize eqLogic remove confirmation and post-delete redirect#3415
Open
Salvialf wants to merge 5 commits into
Open
Centralize eqLogic remove confirmation and post-delete redirect#3415Salvialf wants to merge 5 commits into
Salvialf wants to merge 5 commits into
Conversation
zoic21
approved these changes
Jul 4, 2026
Sekiro-kost
approved these changes
Jul 5, 2026
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.
Problem
Deleting an equipment from
eqLogic.configure.php's configuration dialog left the dialog open afterwards, showing a stale form for an equipment that no longer existed. The underlying list (plugin equipment list, analysis view, or dashboard) never refreshed either, since nothing told those pages the equipment was gone.Meanwhile,
plugin.template.js'sremoveEqLogic()already had the correct behavior (usage check, confirmation, redirect back to the list) but that logic lived only there, duplicated per caller and unavailable to the modal.Fix
jeedom.eqLogic.remove()now handles the usage check, confirmation dialog, and redirect to the current page internally, instead of each caller reimplementing it.plugin.template.js'sremoveEqLogic()now delegates to it, which also fixes a pre-existing bug where it referenced an out-of-scopetextEqtypevariable in its own error path.eqLogic.configure.php's delete button calls the same centralized function, so the dialog correctly closes and the underlying page refreshes on success.Breaking change
jeedom.eqLogic.remove()now shows its own confirmation dialog before deleting. Callers that already confirm before calling it (some plugins do, e.g. jMQTT and coolAutomation) will see a redundant second confirmation until they drop their own.