Skip to content

[IM/BF] Improvements/bugfixes to patch panel port editing/workflow - #1147

Open
listerr wants to merge 9 commits into
inex:mainfrom
listerr:ppp-cease
Open

listerr wants to merge 9 commits into
inex:mainfrom
listerr:ppp-cease

Conversation

@listerr

@listerr listerr commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This PR makes a number of improvements to Patch Panel Ports editing and workflow and removes some other annoyances.

Port cease / prewired lifecycle

When a port is set to ceased (Using "Set ceased" from either the panel list view or patch panel port view page), new options are presented on the modal:

  • Unpatch port - Select whether the patch panel port should be unpatched from the current switch port. Unless ticked, the current switch port will be retained when the patch panel port is reset.
  • Set to Prewired - If the port is not being unpatched, this option sets it back to Prewired after the cease update.
  • Keep as duplex pair - If the port currently has a duplex pair, do not split the port to simplex when resetting to Available.
image

This eliminates several manual admin steps required:

  • Set port to ceased
  • Find port on panel list again, edit, set back to duplex.
  • Go to port history, find the original switch/port. Copy paste.
  • Edit port. Enter the original switch and port.
  • Set port to Prewired if we are not removing the patching.

The process is much easier:

  • Avoids wasted site visits where we have lost track of the fact a port is prewired / we can't be certain of the patching status, because the port was set to Available but was not set back to prewired / original switch port detail deleted.
  • Almost all of our ports are duplex. No longer need to remember to set them back to duplex again after cease/move/unset prewired etc.
  • In most cases we don't remove the patching when ceasing a port, it can be used again and set as prewired.

Port moves

  • Fix bug where moving duplex port did not work. (Form didn't submit.)
  • Previously, target ports had to be first split, then moved, then duplex setting again to the old port.
  • Now, duplex is retained when moving duplex ports. Duplex ports can be moved in a single step.

Other changes

  • Duplex ports are no longer split by "Unset Prewired"
  • Change wording of button on Split modal from "Delete" to "Split"
  • Updated wording in places.
  • Reverse order of port history tabs, so most recent is first (next to Current) as this is usually the one you need to look at. (Reduce mouse movement past 5 years history to get to the most recent at the very right.)

In addition to the above, I have:

  • ensured unit tests all run without error
  • ran psalm and corrected any static analysis issues
  • ensured all relevant template output is escaped to avoid XSS attached with <?= $t->ee( $data ) ?> or equivalent
  • ensured appropriate checks against user privilege / resources accessed
  • API calls (particular for add/edit/delete/toggle) are not implemented with GET and use CSRF tokens to avoid CSRF attacks

@afk11

afk11 commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Pushed commit styling the new checkbox options on ceased, and and existing PI status / colo ref on connected.

@afk11

afk11 commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

@listerr: just checking on the Port Moves thing - on main I know there was an issue moving a duplex port, onto a different duplex port, just checking if that's the case you fixed or if there's something I missed! Thanks

@afk11 afk11 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code reviewed and tested manually, all good

@afk11

afk11 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

@listerr: just checking on the Port Moves thing - was that when you moved one duplex port over another duplex pair? or a different case I maybe didn't cover? thanks

@listerr

listerr commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@listerr: just checking on the Port Moves thing - was that when you moved one duplex port over another duplex pair? or a different case I maybe didn't cover? thanks

I think the expected behaviour is to be able to move an existing duplex port to a new unoccupied pair, but when you hit "Save Changes" - nothing happened if the port was duplex. It had to be first split out to simplex ports, then moved, then set back to duplex. I've just checked and it also works moving from Duplex -> Simplex if you select the first port in a simplex pair.

image

One other tweak you might like to add is to pre-populate, or at least put the current patch panel at the top of the "New Patch Panel" dropdown. Many patch panels have similar identifiers, and it's easy to accidentally move a port to a different panel. (As evidenced by the fact I've just accidentally moved a port from panel 104J.R59.B12.U41F to 104J.R59.B12.U42F .. oops!)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants