ADR-013 Phase 3: generic asset-panels renderer (Path A)
This commit is contained in:
@@ -83,7 +83,33 @@ class WarrantyPlugin(BasePlugin):
|
||||
'title': 'Warranty',
|
||||
'assettypes': ['*'],
|
||||
'endpoint': '/api/warranty/asset/{assetid}',
|
||||
'render': 'table',
|
||||
'render': 'list',
|
||||
# Field map: the generic renderer builds each list item from the
|
||||
# warranty payload without any warranty-specific frontend code.
|
||||
'map': {
|
||||
'title': 'vendor',
|
||||
'badge': {
|
||||
'label': 'status',
|
||||
'color': 'statuscolor',
|
||||
'labelmap': {
|
||||
'active': 'Active',
|
||||
'expiring': 'Expiring Soon',
|
||||
'expired': 'Expired',
|
||||
'unknown': 'Unknown',
|
||||
},
|
||||
},
|
||||
'meta': [
|
||||
{'key': 'servicelevel'},
|
||||
{'key': 'enddate', 'label': 'Ends', 'format': 'date'},
|
||||
{'key': 'servicetag', 'label': 'Tag', 'mono': True},
|
||||
],
|
||||
},
|
||||
'empty': 'No warranty on record.',
|
||||
'manage': {
|
||||
'to': '/warranties?addfor={assetid}',
|
||||
'label': 'Add / manage',
|
||||
'emptylabel': 'Add one',
|
||||
},
|
||||
'position': 30,
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user