Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transit panel: add a button to delete all unused nodes #811

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

tahini
Copy link
Collaborator

@tahini tahini commented Dec 15, 2023

fixes #808

  • Add a socket route to delete unused routes, either all or with node ids
  • Add a button on the transit node panel to delete all unused nodes, with a confirmation dialog
  • Update the current deletion on selection code to use the same function as the delete all nodes.

An additional value of `'all'` for the `ids` parameter allows to delete
all unused nodes from the database, ie nodes without a path associated
with it.
This route takes either `undefined`, `null` or an array of node ids to delete.
If `undefined` or `null`, it deletes all unused nodes.
fixes chairemobilite#808

Add a `transitNodesUtils` file with a function to delete unused nodes,
either an array of node ids or all nodes and reload the collection.

Add a button in the `TransitNodePanel` to delete all unused nodes, with
a confirmation modal before doing so.

Also change the current delete on selection to use the node util's
function and delete all selected nodes at once.
@tahini tahini requested a review from kaligrafy December 15, 2023 22:34
@tahini tahini merged commit 549caf6 into chairemobilite:main Dec 18, 2023
4 checks passed
@tahini tahini deleted the fix808 branch December 18, 2023 13:14
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.

nodes: add a button to remove all unused nodes
2 participants