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

Feature/editable routing tables #103

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

pgallino
Copy link
Collaborator

@pgallino pgallino commented Jan 22, 2025

  • Routing Table Editing:

    • Implemented functionality to allow manual edits on routing table entries.
    • Changes persist across system updates and refreshes.
    • Validation added to ensure correct IP, mask and interface formatting.
  • Persistence Improvements:

    • Routing tables are now stored and retrieved correctly when devices are added or removed.
    • Manually edited entries are preserved if the corresponding connection still exists.
  • Undo/Redo Enhancements:

    • Fixed the RemoveDevice undo operation to restore the routing tables correctly.
    • Fixed the RemoveEdge undo operation to restore the routing tables correctly
    • Improved the logic to prevent loss of manually modified entries during undo/redo actions.

TODO: Evaluate alternative UI approaches for routing table editing to improve user experience.

closes #73

pgallino and others added 9 commits January 20, 2025 20:25
…acking

- Implemented editable fields for routing table entries, allowing users to modify IP, mask, and interface values directly.
- Introduced a 'manuallyEdited' flag in each routing table entry to track manual modifications and prevent them from being overwritten during table regeneration.
- Modified the regenerateRoutingTable function to retain manually edited entries while updating only non-modified ones.

Currently, only changes to the 'interface' column have an effect, while modifications to the IP and mask columns do not affect the logic yet.
- Added a focus check to prevent shortcut execution when the user is typing in input or textarea fields.
…d manual entry issues

- Implemented persistence for routing tables to ensure they are saved and restored correctly.
- Fixed the undo functionality for RemoveDevice to properly restore device connections and routing tables.
- Resolved issues related to manually edited routing table entries:
  - Ensured manually edited entries are retained only if the corresponding connection exists.
  - Fixed overwriting issues caused by index-based management by switching to IP-based matching.
  - Improved consistency when regenerating routing tables after topology changes.

These improvements enhance the stability and accuracy of the routing table management system.
@pgallino pgallino marked this pull request as draft January 23, 2025 16:31
Refactored the logic for preserving manually edited entries in the routing table.
The previous implementation conditionally added entries to the new table if they were still connected.
The updated logic now only updates existing entries and logs a warning if no matching entry is found,
preventing unintended additions and ensuring data consistency.
Implemented logic to store and restore routing tables when a device is removed and then restored.
Now, when a router is deleted, its routing table, along with the routing tables of connected devices,
is saved. During an undo operation, the device and its connections are restored, ensuring that all
routing tables are reinstated correctly.
@pgallino pgallino marked this pull request as ready for review January 24, 2025 13:19
Improved the user interface by implementing a popup modal for cell editing. Now, when a cell is clicked, a modal appears allowing users to edit values with validation and a better user experience. The modal is positioned next to the right sidebar for better accessibility.
@pgallino pgallino closed this Jan 25, 2025
@pgallino pgallino reopened this Jan 25, 2025
@pgallino pgallino marked this pull request as draft January 25, 2025 14:35
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.

Edit routing tables
2 participants