Replaces the two flat "Network Devices" + "View Networks" nav entries with a single "Network" entry opening a tabbed hub: Devices | Networks | VLANs (NetworkHub renders the existing device list, the subnet browse, and the VLAN list; VLANs is now reachable outside Settings). /network -> hub; /networks redirects to the Networks tab; subnet detail stays at /networks/:id. Subnet "Devices on this network" now matches ANY asset whose primary IP falls in the CIDR (PCs, printers, machines, measuring tools - not just network devices), computed on the core Communication + Asset tables; each row links to its typed detail (extension id resolved lazily/guarded per plugin). Fixes the empty list - printers and PCs carry IPs and now appear (e.g. 35 devices on 10.80.92.0/24). Also: subnet-browse search uses the standard form-control styling; dropped the redundant per-tab page header. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
54 lines
1.5 KiB
JavaScript
54 lines
1.5 KiB
JavaScript
/**
|
|
* Network plugin routes
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'network',
|
|
name: 'network',
|
|
component: () => import('../../views/network/NetworkHub.vue'),
|
|
meta: { plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'network/new',
|
|
name: 'network-new',
|
|
component: () => import('../../views/network/NetworkDeviceForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'network/:id',
|
|
name: 'network-detail',
|
|
component: () => import('../../views/network/NetworkDeviceDetail.vue'),
|
|
meta: { plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'network/:id/edit',
|
|
name: 'network-edit',
|
|
component: () => import('../../views/network/NetworkDeviceForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'network' }
|
|
},
|
|
{
|
|
// Legacy path -> the Networks tab of the hub.
|
|
path: 'networks',
|
|
redirect: { path: '/network', query: { tab: 'networks' } }
|
|
},
|
|
{
|
|
path: 'networks/:id',
|
|
name: 'network-subnet-detail',
|
|
component: () => import('../../views/network/SubnetDetail.vue'),
|
|
meta: { plugin: 'network' }
|
|
},
|
|
// Network-specific settings
|
|
{
|
|
path: 'settings/vlans',
|
|
name: 'vlans',
|
|
component: () => import('../../views/settings/VLANsList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'settings/subnets',
|
|
name: 'subnets',
|
|
component: () => import('../../views/settings/SubnetsList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'network' }
|
|
}
|
|
]
|