Dashboard corrections
This commit is contained in:
@@ -439,7 +439,11 @@ def dashboard_expiring():
|
||||
machine = _related_machine(asset)
|
||||
rows.append({
|
||||
'assetid': asset.assetid,
|
||||
'hostname': _hostname(asset) or asset.assetnumber or asset.name,
|
||||
# Hostname, else the asset number - never asset.name. The name
|
||||
# of a covered PC's ASSET is often the machine's descriptive name
|
||||
# ("Haas VF-2"), so falling back to it put a machine name in a
|
||||
# column that is supposed to identify the PC.
|
||||
'hostname': _hostname(asset) or asset.assetnumber or str(asset.assetid),
|
||||
'machinenumber': machine['machinenumber'] if machine else None,
|
||||
'state': 'expired' if remaining < 0 else 'expiring',
|
||||
'daysleft': remaining,
|
||||
|
||||
@@ -139,7 +139,10 @@ class WarrantyPlugin(BasePlugin):
|
||||
# date: expired or expiring is the whole decision when
|
||||
# scanning a board, and the exact day belongs on the report
|
||||
# you order from.
|
||||
'meta': [{'key': 'machinenumber', 'label': 'machine'}],
|
||||
# Bare number, no label. The row is hostname, machine,
|
||||
# state - three short facts, and "machine 3015" spends a
|
||||
# word saying what the position already says.
|
||||
'meta': [{'key': 'machinenumber'}],
|
||||
'link': '/assets/{assetid}',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user