Rebuilds the classic printer-installer feature: pick printers on the shopfloor map, download a .bat that installs them. Backend (asset_routes.py): GET /api/printers/install-batch?printerids=1,2,3 returns a .bat attachment. Groups printers the way the classic installprinter.asp did - HP/Xerox via the universal PrinterInstaller.exe /PRINTER="a,b,c", printers with a .exe installpath via that installer /SILENT, and anything else (no installpath, or a .zip) listed for manual install instead of being run blindly. Download URLs derive from the site_base_url setting + the IIS-served /installers folder (no hardcoded host). Reuses the existing install-list query shape. Frontend: PrinterInstallerMap.vue - full-screen Leaflet shopfloor map (reuses mapConfig), a marker per network printer at its mapx/mapy, click to toggle-select, sidebar with the selection + an Install button that downloads the batch. Toplevel route /printer-installer, printersApi.installList(), and an Installer Map button on the printers list. Tests: install-batch grouping (universal/specific/manual) + requires-ids.
88 lines
2.4 KiB
JavaScript
88 lines
2.4 KiB
JavaScript
/**
|
|
* Printers plugin routes
|
|
*/
|
|
export default [
|
|
{
|
|
path: 'reports/toner',
|
|
name: 'toner-report',
|
|
component: () => import('./views/TonerReport.vue'),
|
|
meta: { plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'settings/printertypes',
|
|
name: 'printer-types',
|
|
component: () => import('./views/PrinterTypesList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'settings/zabbix',
|
|
name: 'zabbix-settings',
|
|
component: () => import('./views/ZabbixSettings.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'settings/printer-alerts',
|
|
name: 'printer-alerts',
|
|
component: () => import('./views/PrinterAlertsSettings.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'printers',
|
|
name: 'printers',
|
|
component: () => import('./views/PrintersList.vue'),
|
|
meta: { plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'printers/new',
|
|
name: 'printer-new',
|
|
component: () => import('./views/PrinterForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'printers/:id',
|
|
name: 'printer-detail',
|
|
component: () => import('./views/PrinterDetail.vue'),
|
|
meta: { plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'printers/:id/edit',
|
|
name: 'printer-edit',
|
|
component: () => import('./views/PrinterForm.vue'),
|
|
meta: { requiresAuth: true, plugin: 'printers' }
|
|
},
|
|
// printer-specific settings
|
|
{
|
|
path: 'settings/modelsupplies',
|
|
name: 'model-supplies',
|
|
component: () => import('./views/ModelSuppliesList.vue'),
|
|
meta: { requiresAuth: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: 'settings/printerdrivers',
|
|
name: 'printer-drivers',
|
|
component: () => import('./views/PrinterDriversList.vue'),
|
|
meta: { requiresAuth: true, requiresAdmin: true, plugin: 'printers' }
|
|
}
|
|
]
|
|
|
|
export const toplevel = [
|
|
{
|
|
path: '/printer-installer',
|
|
name: 'printer-installer-map',
|
|
component: () => import('./views/PrinterInstallerMap.vue'),
|
|
meta: { requiresAuth: true, plugin: 'printers' }
|
|
},
|
|
{
|
|
path: '/print/printer-qr',
|
|
name: 'print-printer-qr-batch',
|
|
component: () => import('./views/PrinterQRBatch.vue'),
|
|
meta: { plugin: 'printers' }
|
|
},
|
|
{
|
|
path: '/print/printer-qr/:id',
|
|
name: 'print-printer-qr-single',
|
|
component: () => import('./views/PrinterQRSingle.vue'),
|
|
meta: { plugin: 'printers' }
|
|
}
|
|
]
|