Skip to content

Centralize eqLogic remove confirmation and post-delete redirect#3415

Open
Salvialf wants to merge 5 commits into
developfrom
fix/centralize-eqlogic-remove
Open

Centralize eqLogic remove confirmation and post-delete redirect#3415
Salvialf wants to merge 5 commits into
developfrom
fix/centralize-eqlogic-remove

Conversation

@Salvialf

@Salvialf Salvialf commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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's removeEqLogic() 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's removeEqLogic() now delegates to it, which also fixes a pre-existing bug where it referenced an out-of-scope textEqtype variable 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.

@Salvialf Salvialf added the changelog-breaking Use to generate release notes / changelog. To be apply on PR label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-breaking Use to generate release notes / changelog. To be apply on PR Need tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants