From 18003305451f8005fd94308c5f7b6a5457e0e273 Mon Sep 17 00:00:00 2001 From: Jason Staack Date: Mon, 16 Mar 2026 18:27:38 -0500 Subject: [PATCH] feat: expand config editor menu tree and add WiFi wave2 template Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/routers/tenants.py | 23 +++- .../src/components/config-editor/MenuTree.tsx | 120 +++++++++++++++++- 2 files changed, 135 insertions(+), 8 deletions(-) diff --git a/backend/app/routers/tenants.py b/backend/app/routers/tenants.py index b038710..0685068 100644 --- a/backend/app/routers/tenants.py +++ b/backend/app/routers/tenants.py @@ -419,8 +419,8 @@ add chain=forward action=drop""", ], }, { - "name": "Wireless AP Config", - "description": "Configure wireless access point with WPA2 security", + "name": "Wireless AP Config (legacy)", + "description": "Configure wireless AP with WPA2 — RouterOS 6 or 7 with legacy wireless package", "content": """/interface wireless security-profiles add name=portal-wpa2 mode=dynamic-keys authentication-types=wpa2-psk wpa2-pre-shared-key={{ password }} /interface wireless set wlan1 mode=ap-bridge ssid={{ ssid }} security-profile=portal-wpa2 frequency={{ frequency }} channel-width={{ channel_width }} disabled=no""", "variables": [ @@ -450,6 +450,25 @@ add chain=forward action=drop""", }, ], }, + { + "name": "WiFi AP Config (wave2)", + "description": "Configure WiFi AP with WPA2 — RouterOS 7 with wifi-qcom-ac or wifi-qcom package", + "content": """/interface wifi set wifi1 configuration.ssid={{ ssid }} security.passphrase={{ password }} disabled=no""", + "variables": [ + { + "name": "ssid", + "type": "string", + "default": "MikroTik-AP", + "description": "Wireless network name", + }, + { + "name": "password", + "type": "string", + "default": "", + "description": "WPA2/WPA3 passphrase (min 8 characters)", + }, + ], + }, { "name": "Initial Device Setup", "description": "Set device identity, NTP, DNS, and disable unused services", diff --git a/frontend/src/components/config-editor/MenuTree.tsx b/frontend/src/components/config-editor/MenuTree.tsx index 10dcde7..b1b21b5 100644 --- a/frontend/src/components/config-editor/MenuTree.tsx +++ b/frontend/src/components/config-editor/MenuTree.tsx @@ -19,11 +19,44 @@ const MENU_TREE: TreeNode[] = [ label: 'interface', path: '/interface', children: [ - { label: 'bridge', path: '/interface/bridge' }, + { + label: 'bridge', + path: '/interface/bridge', + children: [ + { label: 'bridge', path: '/interface/bridge' }, + { label: 'port', path: '/interface/bridge/port' }, + { label: 'vlan', path: '/interface/bridge/vlan' }, + { label: 'host', path: '/interface/bridge/host' }, + ], + }, { label: 'ethernet', path: '/interface/ethernet' }, { label: 'vlan', path: '/interface/vlan' }, { label: 'wireless', path: '/interface/wireless' }, + { + label: 'wifi', + path: '/interface/wifi', + children: [ + { label: 'wifi', path: '/interface/wifi' }, + { label: 'configuration', path: '/interface/wifi/configuration' }, + { label: 'security', path: '/interface/wifi/security' }, + { label: 'datapath', path: '/interface/wifi/datapath' }, + { label: 'provisioning', path: '/interface/wifi/provisioning' }, + { label: 'capsman', path: '/interface/wifi/capsman' }, + { label: 'cap', path: '/interface/wifi/cap' }, + { label: 'access-list', path: '/interface/wifi/access-list' }, + { label: 'registration-table', path: '/interface/wifi/registration-table' }, + ], + }, { label: 'bonding', path: '/interface/bonding' }, + { label: 'wireguard', path: '/interface/wireguard' }, + { label: 'gre', path: '/interface/gre' }, + { label: 'eoip', path: '/interface/eoip' }, + { label: 'ipip', path: '/interface/ipip' }, + { label: 'pppoe-client', path: '/interface/pppoe-client' }, + { label: 'pppoe-server', path: '/interface/pppoe-server/server' }, + { label: 'l2tp-server', path: '/interface/l2tp-server/server' }, + { label: 'sstp-server', path: '/interface/sstp-server/server' }, + { label: 'ovpn-server', path: '/interface/ovpn-server/server' }, { label: 'list', path: '/interface/list' }, ], }, @@ -35,7 +68,15 @@ const MENU_TREE: TreeNode[] = [ { label: 'route', path: '/ip/route' }, { label: 'dns', path: '/ip/dns' }, { label: 'dhcp-client', path: '/ip/dhcp-client' }, - { label: 'dhcp-server', path: '/ip/dhcp-server' }, + { + label: 'dhcp-server', + path: '/ip/dhcp-server', + children: [ + { label: 'dhcp-server', path: '/ip/dhcp-server' }, + { label: 'network', path: '/ip/dhcp-server/network' }, + { label: 'lease', path: '/ip/dhcp-server/lease' }, + ], + }, { label: 'firewall', path: '/ip/firewall', @@ -48,9 +89,67 @@ const MENU_TREE: TreeNode[] = [ { label: 'connection', path: '/ip/firewall/connection' }, ], }, + { + label: 'ipsec', + path: '/ip/ipsec', + children: [ + { label: 'peer', path: '/ip/ipsec/peer' }, + { label: 'identity', path: '/ip/ipsec/identity' }, + { label: 'policy', path: '/ip/ipsec/policy' }, + { label: 'proposal', path: '/ip/ipsec/proposal' }, + { label: 'profile', path: '/ip/ipsec/profile' }, + { label: 'active-peers', path: '/ip/ipsec/active-peers' }, + { label: 'installed-sa', path: '/ip/ipsec/installed-sa' }, + ], + }, { label: 'pool', path: '/ip/pool' }, { label: 'service', path: '/ip/service' }, { label: 'neighbor', path: '/ip/neighbor' }, + { label: 'arp', path: '/ip/arp' }, + ], + }, + { + label: 'ipv6', + path: '/ipv6', + children: [ + { label: 'address', path: '/ipv6/address' }, + { label: 'route', path: '/ipv6/route' }, + { + label: 'firewall', + path: '/ipv6/firewall', + children: [ + { label: 'filter', path: '/ipv6/firewall/filter' }, + { label: 'mangle', path: '/ipv6/firewall/mangle' }, + { label: 'raw', path: '/ipv6/firewall/raw' }, + { label: 'address-list', path: '/ipv6/firewall/address-list' }, + ], + }, + { label: 'nd', path: '/ipv6/nd' }, + { label: 'pool', path: '/ipv6/pool' }, + { label: 'dhcp-client', path: '/ipv6/dhcp-client' }, + ], + }, + { + label: 'caps-man', + path: '/caps-man', + children: [ + { label: 'interface', path: '/caps-man/interface' }, + { label: 'configuration', path: '/caps-man/configuration' }, + { label: 'provisioning', path: '/caps-man/provisioning' }, + { label: 'datapath', path: '/caps-man/datapath' }, + { label: 'security', path: '/caps-man/security' }, + { label: 'channel', path: '/caps-man/channel' }, + { label: 'access-list', path: '/caps-man/access-list' }, + { label: 'registration-table', path: '/caps-man/registration-table' }, + ], + }, + { + label: 'ppp', + path: '/ppp', + children: [ + { label: 'profile', path: '/ppp/profile' }, + { label: 'secret', path: '/ppp/secret' }, + { label: 'active', path: '/ppp/active' }, ], }, { @@ -59,9 +158,18 @@ const MENU_TREE: TreeNode[] = [ children: [ { label: 'identity', path: '/system/identity' }, { label: 'clock', path: '/system/clock' }, - { label: 'ntp', path: '/system/ntp' }, + { + label: 'ntp', + path: '/system/ntp', + children: [ + { label: 'client', path: '/system/ntp/client' }, + { label: 'server', path: '/system/ntp/server' }, + ], + }, { label: 'resource', path: '/system/resource' }, { label: 'routerboard', path: '/system/routerboard' }, + { label: 'health', path: '/system/health' }, + { label: 'note', path: '/system/note' }, { label: 'scheduler', path: '/system/scheduler' }, { label: 'script', path: '/system/script' }, { label: 'logging', path: '/system/logging' }, @@ -109,17 +217,17 @@ const MENU_TREE: TreeNode[] = [ path: '/tool', children: [ { label: 'bandwidth-server', path: '/tool/bandwidth-server' }, - { label: 'email', path: '/tool/email' }, - { label: 'fetch', path: '/tool/fetch' }, + { label: 'e-mail', path: '/tool/e-mail' }, { label: 'graphing', path: '/tool/graphing' }, { label: 'netwatch', path: '/tool/netwatch' }, - { label: 'ping', path: '/tool/ping' }, { label: 'sniffer', path: '/tool/sniffer' }, + { label: 'romon', path: '/tool/romon' }, ], }, { label: 'user', path: '/user' }, { label: 'snmp', path: '/snmp' }, { label: 'certificate', path: '/certificate' }, + { label: 'container', path: '/container' }, ] interface MenuTreeProps {