add dialog to remove active PortForwards from a Pod
Co-authored-by: ludovico russo [email protected]
usecase: Often I'm in the situation where I prefer to remove a port forward directly on the page where it is created instead of going to the portforawards view
@kandros Thank you for this PR! At first glance the code looks good but I am a tad thorn with the behavior ie the original impetus is to create a port-forward and not delete it which will be the optional behavior from this PR if a pf is already present. I understand deleting a pf does require an extra key press but also does give you the ability to delete other pfs in that swoop. Leaving to the good folks here to upvote as I am on the fence on this deal...
@derailed I'm also interested in this feature but I get your point. What do you think to have a different key mapping for deleting port forwards? something like ctrl-shift-P to delete a pf?
@ludusrusso-rc Thank you for your reply! I thought about it a bit and let me float an idea what if we renamed the action `Toggle PortForward' thus if a pf does not exist offer a dialog to create it or if there is a pf offer a dialog to delete it thus no need to nav to the pf view to delete it or intro a new shortcut. What do you guys think?
@derailed I quite like your idea. One thing to consider is if it would be still possible to handle multiple port forwards - and adding additional port forwards to existing ones or deleting only some existing port forwards. Maybe the behavior could be to always delete the existing ones, use them as a base for the new create action and if you close without saving you toggled the port forwards off.
@derailed This PR has been open since 2021 with no community upvotes. Given the limited interest and overlap with existing port-forward workflows, probably best to mark stale.