You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move the Import UI to the top of the left panel and add a collapsible Import section with help, bulk-import controls, session tools, and export output.
Add CSS for section layout, collapse behavior, and styling (.section-title-row, .section-actions, .import-section-top, .collapse-btn).
Update app.js to manage importSectionCollapsed state, render/toggle the collapsed view, and persist the setting in saved sessions (loadState/buildStatePayload); ensure loadExample resets the section to expanded.
Update ARCHITECTURE.md to document the top-of-panel Import section, subnet mapping export script, collapse behavior, and add a Phase M: Testing note.
Copy file name to clipboardExpand all lines: ARCHITECTURE.md
+14-3Lines changed: 14 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,8 @@ openwrt-firewall-visualiser/
30
30
├── README.md # Placeholder project documentation
31
31
├── ARCHITECTURE.md # This architecture guide
32
32
├── scripts/
33
-
│ └── openwrt_export_hosts.sh
33
+
│ ├── openwrt_export_hosts.sh
34
+
│ └── openwrt_export_subnet_mappings.sh
34
35
└── public/
35
36
├── index.html # Application markup and external asset references
36
37
└── assets/
@@ -484,7 +485,7 @@ Objective: allow users to populate devices from existing network inventories ins
484
485
485
486
Requirements:
486
487
487
-
- Add a clearly labelled "Import" section with a "Bulk Import Hosts" subsection.
488
+
- Add a clearly labelled, top-of-panel "Import" section with a "Bulk Import Hosts" subsection.
488
489
- Support device inventory exports.
489
490
- Support host lists.
490
491
- Support DHCP exports.
@@ -518,6 +519,7 @@ Supported Linux neighbour table format:
518
519
Implemented details:
519
520
520
521
- Import controls are grouped separately from manual Devices and Subnet Mappings controls.
522
+
- The Import section can be collapsed when the user is done with first-run setup or file imports.
521
523
-`renderImportChecklist()` shows first-time users which setup/import steps are currently populated.
522
524
-`importBulkHosts()` imports the textarea content.
523
525
-`parseBulkHosts()` parses host data line-by-line.
@@ -569,6 +571,7 @@ Implemented details:
569
571
570
572
- The `subnetMappings` textarea stores subnet-to-zone mappings.
571
573
- The Subnet Mappings help box explains when the mappings are used, the manual `CIDR zone` format, and the exact UCI output expected by the UCI import field.
574
+
- The Subnet Mappings help box links to `scripts/openwrt_export_subnet_mappings.sh`, which exports the matching OpenWrt UCI lines from a router.
572
575
-`parseSubnetMappings()` parses CIDR mappings.
573
576
-`inferZoneForIp()` assigns zones during import when a host line has no explicit zone.
574
577
- Unresolved imported hosts are counted in the import result panel.
@@ -652,6 +655,7 @@ Implemented improvements:
652
655
- Export Session uses a distinct positive-action button.
653
656
- Import Session / Devices is a dedicated file-import control.
654
657
- Import status is persisted with saved sessions so the checklist reflects restored state.
658
+
- Import section collapsed/expanded state is persisted with saved sessions.
655
659
656
660
### Phase L: Usability
657
661
@@ -660,12 +664,19 @@ Status: implemented.
660
664
Implementation improvements:
661
665
662
666
- Loading the example now prompts before replacing the current state.
663
-
- Devices, Subnet Mappings, and Import are separate left-panel sections.
667
+
- Import, Devices, and Subnet Mappings are separate left-panel sections.
668
+
- Import is positioned before manual configuration entry so first-time users can start from existing exports.
664
669
- Subnet Mappings has its own help button, with less ambiguous guidance about when subnet mappings are used.
665
670
- Graph Visualiser has an expand/collapse button.
666
671
- Export Graph PNG moved into the Graph Visualiser toolbar.
667
672
- Device Relationship Map shows the first 15 relationships by default and adds a show-all/show-fewer control when needed.
668
673
674
+
## Phase M: Testing
675
+
676
+
Phase M provides unit testing for CI/CD
677
+
678
+
679
+
669
680
## Development Notes
670
681
671
682
The current implementation is intentionally simple:
0 commit comments