core.js still routed plugin-owned pages directly. Extracted all 11 into the owning plugin's route file + moved their views into plugins/<name>/frontend/: - computers: reports/pc-relationships, settings/pctypemapping - printers: reports/toner, settings/printertypes, settings/zabbix (toner/supply monitoring) - machines: settings/machinetypes - network: settings/networktypes - warranty: settings/dellwarranty - slides: settings/slides (its route file gains a default export; it was toplevel-only) - employees: NEW plugin frontend (employees/:sso + settings/employeedirectory) - employees had no route file before; its pages lived only in core.js. core.js now holds only core routes; all 14 bundled plugins are self-contained under plugins/<name>/frontend/. Verified live: the extracted Machine Types settings page renders in the settings rail from the machines plugin frontend. Build + 58 vitest + naming green.
60 lines
1.6 KiB
JavaScript
60 lines
1.6 KiB
JavaScript
/**
|
|
* Network plugin routes
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'settings/networktypes',
|
|
name: 'network-types',
|
|
component: () => import('./views/NetworkTypesList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'network',
|
|
name: 'network',
|
|
component: () => import('./views/NetworkHub.vue'),
|
|
meta: { plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'network/new',
|
|
name: 'network-new',
|
|
component: () => import('./views/NetworkDeviceForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'network/:id',
|
|
name: 'network-detail',
|
|
component: () => import('./views/NetworkDeviceDetail.vue'),
|
|
meta: { plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'network/:id/edit',
|
|
name: 'network-edit',
|
|
component: () => import('./views/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/SubnetDetail.vue'),
|
|
meta: { plugin: 'network' }
|
|
},
|
|
// Network-specific settings
|
|
{
|
|
path: 'settings/vlans',
|
|
name: 'vlans',
|
|
component: () => import('./views/VLANsList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'network' }
|
|
},
|
|
{
|
|
path: 'settings/subnets',
|
|
name: 'subnets',
|
|
component: () => import('./views/SubnetsList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'network' }
|
|
}
|
|
]
|