Feature/automatic pdu link planner (multi-phase, connector-aware balancing) v25.01+#1624
Open
alex001x wants to merge 19 commits intoopendcim:masterfrom
Open
Feature/automatic pdu link planner (multi-phase, connector-aware balancing) v25.01+#1624alex001x wants to merge 19 commits intoopendcim:masterfrom
alex001x wants to merge 19 commits intoopendcim:masterfrom
Conversation
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.
Feature: Automatic PDU Link Planner
This PR introduces a new Automatic PDU Link Planner for OpenDCIM v25.01+.
It automates power connections between devices and PDUs based on connector type, phase, and load balancing.
Key features
Three selectable operation modes:
Mode 1 – Load Balanced: evenly distributes all devices. (for one or more PDU)

Mode 2 – Dual Power Path: splits dual-fed devices between two PDUs.
Mode 3 – Intelligent Power Planner: balances load across C13/C19 connectors and phases (A/B/C).
Technical details :
Added modal and AJAX workflow (ajax_generate_powerplan.php, ajax_apply_powerplan.php).
Full compatibility with schema 25.01 (tables: fac_PowerConnectors, fac_PowerPhases, fac_PowerVoltages).
Handles connector/phase detection and generates alerts if incomplete.
Applies and logs connections into:
fac_PowerConnection
fac_PowerPorts (ConnectorID, PhaseID, VoltageID)
Visual power load summary with color-coded phase bars.
Integrated with i18n (new entries in openDCIM.po).
Requirements :
OpenDCIM v25.01 or later.
At least one cabinet with 2 PDUs to use the Intelligent mode.
Proper ConnectorID and PhaseID configuration in fac_PowerPorts.
Access control :
Read-only users → preview and print only.
Write-access users → can apply and persist changes.
Localization :
All strings wrapped in __() with English/French translations provided.
Example usage :
Open cabnavigator.php?cabinetID=
Click Automatic PDU Link Planner
Choose a mode → Generate Plan
Optionally Apply and Save or Print Power Plan