Skip to content

Commit c5072c5

Browse files
Merge pull request #162 from SDNNetSim/feat/gui
feat(gui): Add web-based GUI for FUSION
2 parents 7c24ba6 + 8912f75 commit c5072c5

106 files changed

Lines changed: 19629 additions & 70 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ data/output
2020
data/plots
2121
data/excel
2222
data/training_data
23+
data/gui_runs/
2324

2425
logs/*
2526

Makefile

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# FUSION Project Makefile
22
# Provides convenient commands for development and validation
33

4-
.PHONY: help install lint test validate clean check-env precommit-install precommit-run
4+
.PHONY: help install lint test validate clean check-env precommit-install precommit-run lint-frontend validate-frontend
55

66
# Default target
77
help:
@@ -16,8 +16,10 @@ help:
1616
@echo " check-env Check if virtual environment is activated"
1717
@echo ""
1818
@echo "Validation (run before submitting PR):"
19-
@echo " validate Run all pre-commit checks on all files"
19+
@echo " validate Run all checks (backend + frontend + tests)"
2020
@echo " lint Run pre-commit checks on all files"
21+
@echo " lint-frontend Run frontend linting (ESLint)"
22+
@echo " validate-frontend Run frontend lint + TypeScript build"
2123
@echo " precommit-run Run pre-commit on staged files only"
2224
@echo " test Run unit tests with pytest"
2325
@echo ""
@@ -86,13 +88,42 @@ precommit-run: check-env
8688
@echo "🔍 Running pre-commit checks on staged files..."
8789
pre-commit run
8890

91+
# Frontend linting
92+
lint-frontend:
93+
@echo "Running frontend ESLint..."
94+
@if [ -d "frontend" ] && [ -f "frontend/package.json" ]; then \
95+
cd frontend && npm run lint; \
96+
else \
97+
echo "Frontend directory not found, skipping..."; \
98+
fi
99+
100+
# Frontend validation (lint + build)
101+
validate-frontend:
102+
@echo "Running frontend validation (lint + TypeScript build)..."
103+
@if [ -d "frontend" ] && [ -f "frontend/package.json" ]; then \
104+
cd frontend && npm run lint && npm run build; \
105+
else \
106+
echo "Frontend directory not found, skipping..."; \
107+
fi
108+
89109
# Full PR validation - run all pre-commit checks on all files
90110
validate: check-env
91-
@echo "🚀 Running complete validation (pre-commit + tests)..."
92-
@echo "Running pre-commit checks on all files..."
111+
@echo "Running complete validation (backend + frontend + tests)..."
112+
@echo ""
113+
@echo "=== Backend: Pre-commit checks ==="
93114
pre-commit run --all-files
94-
@echo "Running unit tests..."
115+
@echo ""
116+
@echo "=== Frontend: Lint + TypeScript build ==="
117+
@if [ -d "frontend" ] && [ -f "frontend/package.json" ]; then \
118+
cd frontend && npm run lint && npm run build; \
119+
else \
120+
echo "Frontend directory not found, skipping..."; \
121+
fi
122+
@echo ""
123+
@echo "=== Running unit tests ==="
95124
python -m pytest
125+
@echo ""
126+
@echo "Validation complete!"
96127

97128
# Lint only - run all pre-commit checks
98129
lint: check-env

docs/_static/images/gui/README.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# GUI Screenshots
2+
3+
This directory contains screenshots for the GUI documentation.
4+
5+
## Required Screenshots
6+
7+
Capture these screenshots from the running GUI at http://127.0.0.1:8765:
8+
9+
| Filename | Page | What to Capture |
10+
|----------|------|-----------------|
11+
| `run-list-page.png` | RunListPage (`/`) | Multiple run cards with varied statuses (pending, running, completed, failed) |
12+
| `new-run-page.png` | NewRunPage (`/runs/new`) | Form with template dropdown expanded |
13+
| `run-detail-logs.png` | RunDetailPage | Logs tab showing log content |
14+
| `run-detail-artifacts.png` | RunDetailPage | Artifacts tab showing file browser |
15+
| `topology-page.png` | TopologyPage (`/topology`) | Network graph with a node selected |
16+
| `config-editor.png` | ConfigEditorPage (`/config`) | Editor showing INI content |
17+
| `codebase-architecture.png` | CodebaseExplorerPage (`/codebase`) | Architecture view with module cards |
18+
| `codebase-code.png` | CodebaseExplorerPage | Code view with file tree and code panel |
19+
| `settings-page.png` | SettingsPage (`/settings`) | Theme selection options |
20+
21+
## Guidelines
22+
23+
- Use a consistent browser window size (1280x800 recommended)
24+
- Capture only the content area, not browser chrome
25+
- Use light theme for consistent documentation appearance
26+
- Ensure no sensitive or personal data is visible
27+
- Save as PNG format
28+
29+
## After Capturing
30+
31+
Once screenshots are added, update the `[Screenshot: ...]` placeholders in
32+
`docs/getting-started/gui/features.rst` with actual image directives:
33+
34+
```rst
35+
.. image:: /_static/images/gui/run-list-page.png
36+
:alt: Run list page showing simulation runs
37+
:width: 100%
38+
```
266 KB
Loading
255 KB
Loading
259 KB
Loading
174 KB
Loading
112 KB
Loading
237 KB
Loading
90.9 KB
Loading

0 commit comments

Comments
 (0)