Feature request: Network graph #442
Reference in New Issue
Block a user
Delete Branch "feature/add-network-graph"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Overview
This PR introduces a complete Network Graph visualization system to Termix, allowing users to interactively visualize, manage, and organize their SSH hosts and connections in an intuitive graph interface powered by Cytoscape.js. The feature is integrated into the Dashboard and can be toggled between the traditional "Recent Activity" view. It includes full persistence, export/import capabilities, and advanced node management with grouping support.
Added
Network Graph Visualization Component (
src/ui/desktop/dashboard/network-graph/NetworkGraphView.tsx)Backend Network Topology API (
src/backend/database/routes/network-topology.ts)Database Schema (
src/backend/database/db/schema.ts)networkTopologytable with userId foreign key referenceFrontend API Functions (
src/ui/main-axios.ts)getNetworkTopology()- Fetches saved topology via GETsaveNetworkTopology(topology)- Saves topology via POST with data cleaninggetSSHHosts()now returnsSSHHostWithStatus)Node Management Features
Graph Controls
Data Management
Host Detail Viewer
Group/Folder Management (Advanced)
Dashboard Integration
Tab System Support
Standalone Apps
HostManagerApp.tsx- Fullscreen host managerNetworkGraphApp.tsx- Fullscreen network graph view?view=network-graph)Dependencies Added
cytoscape@^3.33.1- Graph visualization libraryreact-cytoscapejs@^2.0.0- React wrapper for Cytoscape@types/cytoscape@^3.21.9- TypeScript type definitionsUpdated
Dashboard Component (
src/ui/desktop/apps/dashboard/Dashboard.tsx)showNetworkGraphstate to toggle between viewsMain App (
src/main.tsx)?view=host-managerand?view=network-graphDesktopApp (
src/ui/desktop/DesktopApp.tsx)showNetworkGraphconditional renderingTab System (
src/ui/desktop/navigation/tabs/Tab.tsx)Tab Dropdown (
src/ui/desktop/navigation/tabs/TabDropdown.tsx)Top Navbar (
src/ui/desktop/navigation/TopNavbar.tsx)Nginx Configuration (both
docker/nginx.confanddocker/nginx-https.conf)/network-topologyproxy route to backend serverBackend Database (
src/backend/database/database.ts)/network-topologyroute handlerBackend Database Initialization (
src/backend/database/db/index.ts)network_topologytableAPI Types (
src/ui/main-axios.ts)SSHHostWithStatusinterface combining SSHHost with status fieldNetworkTopologyDatainterface for topology structureREADME (
README.md)package.json & package-lock.json
Screenshots / Demos
Network Graph View Features:
Interactive Nodes: Host boxes displaying name, IP, and tags
Control Toolbar:
Graph Display:
Dashboard Integration:
Checklist
Testing Notes
I like the idea, but the implementation requires significant improvement, primarily in the UI. It's obvious that the PR was AI-generated (or at least heavily involved), which I'm not against, but the code needs significant cleanup. These are the most obvious issues:
Overall, I suggest you use it yourself before submitting the updates.
This is a great idea, and the AI implementation is quite well-developed. However, you'll need to adhere to our consistent design style and coding standards. If you wish to contribute, especially regarding feature requests like this one, I recommend reaching out to Discord and our development team for discussion. This will help ensure consistency in our work.
Any update on the fixes @SteveJos?
Hey @LukeGus and @ZacharyZcR! Thank you for the feedback! I will try to improve the points you mentioned, however time is a scarce commodity...
I will try to fix the PR in the next days!
Sounds good. v1.10.0 is releasing within a couple days. If your able to fix it in time, it may be merged. Otherwise it will have to wait for a v1.10.x patch version.
@LukeGus I just now pushed the latest commit with the following changes:
Please feel free to test the changes!
Thanks. I'll check it out and merge it for 1.10.1 in the next week or two.
Can you reopen this PR under the
dev-1.10.1branch? I deleted the old one and forgot that it would close the PR.Pull request closed