Feature request: Network graph #442
Open
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.


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