Add print badges, pagination, route splitting, JWT auth fixes, and list page alignment
- Fix equipment badge barcode not rendering (loading race condition) - Fix printer QR code not rendering on initial load (same race condition) - Add model image to equipment badge via imageurl from Model table - Fix white-on-white machine number text on badge, tighten barcode spacing - Add PaginationBar component used across all list pages - Split monolithic router into per-plugin route modules - Fix 25 GET API endpoints returning 401 (jwt_required -> optional=True) - Align list page columns across Equipment, PCs, and Network pages - Add print views: EquipmentBadge, PrinterQRSingle, PrinterQRBatch, USBLabelBatch - Add PC Relationships report, migration docs, and CLAUDE.md project guide - Various plugin model, API, and frontend refinements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -621,8 +621,8 @@ def dashboard_summary():
|
||||
|
||||
return success_response({
|
||||
'total': total,
|
||||
'by_type': [{'type': t, 'count': c} for t, c in by_type],
|
||||
'by_os': [{'os': o, 'count': c} for o, c in by_os],
|
||||
'bytype': [{'type': t, 'count': c} for t, c in by_type],
|
||||
'byos': [{'os': o, 'count': c} for o, c in by_os],
|
||||
'shopfloor': shopfloor_count,
|
||||
'non_shopfloor': total - shopfloor_count
|
||||
'nonshopfloor': total - shopfloor_count
|
||||
})
|
||||
|
||||
@@ -117,9 +117,9 @@ class Computer(BaseModel):
|
||||
|
||||
# Add related object names
|
||||
if self.computertype:
|
||||
result['computertype_name'] = self.computertype.computertype
|
||||
result['computertypename'] = self.computertype.computertype
|
||||
if self.operatingsystem:
|
||||
result['os_name'] = self.operatingsystem.osname
|
||||
result['osname'] = self.operatingsystem.osname
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ class ComputersPlugin(BasePlugin):
|
||||
if not existing:
|
||||
at = AssetType(
|
||||
assettype='computer',
|
||||
plugin_name='computers',
|
||||
table_name='computers',
|
||||
pluginname='computers',
|
||||
tablename='computers',
|
||||
description='PCs, servers, and workstations',
|
||||
icon='desktop'
|
||||
)
|
||||
@@ -201,9 +201,9 @@ class ComputersPlugin(BasePlugin):
|
||||
"""Return navigation menu items."""
|
||||
return [
|
||||
{
|
||||
'name': 'Computers',
|
||||
'name': 'PCs',
|
||||
'icon': 'desktop',
|
||||
'route': '/computers',
|
||||
'route': '/pcs',
|
||||
'position': 15,
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user