Dashboard corrections
This commit is contained in:
@@ -1034,6 +1034,8 @@ def _get_low_supplies_data():
|
||||
'vendor': vendor_name,
|
||||
'model': model_number,
|
||||
'location': location_name,
|
||||
'mapx': asset.mapx,
|
||||
'mapy': asset.mapy,
|
||||
'supplies': annotated
|
||||
})
|
||||
|
||||
@@ -1464,6 +1466,11 @@ def dashboard_supplies():
|
||||
'printerid': printer['printerid'],
|
||||
'printername': printer['printername'] or printer['assetnumber'],
|
||||
'location': printer['location'] or 'No location set',
|
||||
# Coordinates for the hover preview. Either may be None - a
|
||||
# printer never placed on the floor plan still belongs on the
|
||||
# card, it just has nothing to preview.
|
||||
'mapx': printer.get('mapx'),
|
||||
'mapy': printer.get('mapy'),
|
||||
'iscritical': any(s['status'] == 'critical' for s in depleted),
|
||||
'supplies': [{
|
||||
'text': '{} {}%'.format(_shortsupplyname(supply.get('name')),
|
||||
|
||||
Reference in New Issue
Block a user