Add ability to delete whole paths when deleting a device #1234
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.
This is a suggestion which would add the possibility to select which related connections past the selected device you would like to remove at the same time as deleting that selected device.
In other words, if you need to remove all the connections between two devices you can do it in this screen instead of having to go to each device it interacts with.
The new popup would replace the confirmation to delete the device.
This version makes rear connections not removable but this can be changed.
Types of behaviours it can have:
Checked
Unchecked
Force Check
Force Unchecked
Look at the code in the GetPotentialPathToDelete function in devices.php for more info.
For example, I want to delete Switch 1 which has this one connection in port 2.
When I click Delete this would pop up.
The first connection is interacting with the device I'm trying to delete so it would have to be deleted. (Force Checked)
The two links with the (Rear) tag are back links between patch panels which are to be kept (Force Unchecked) but that is configurable as mentioned above.
The two unchecked are front connections between two patch panels which in this case, are automatically being checked to be remove (Checked) but can be unchecked if wanted(Also configurable).
If I were to click "Delete device and selected paths"
the device would be deleted and only the rear connections between the patch panels would be kept.
It also makes a excel sheet containing the paths you deleted so you don't forget which paths you removed if you are to be removing the physical paths later.
If you have any questions feel free to ask me!