Dashboard cards: rebuild deployable dists
This commit is contained in:
@@ -196,14 +196,30 @@ class MachinesPlugin(BasePlugin):
|
||||
return [machinescli]
|
||||
|
||||
def get_dashboard_widgets(self) -> List[Dict]:
|
||||
"""Return dashboard widget definitions."""
|
||||
"""Dashboard card: machines not in service.
|
||||
|
||||
A machine sitting in Repair or marked Lost is a thing someone is
|
||||
supposed to be chasing, and nothing surfaces it today - it is visible
|
||||
only to whoever thinks to filter the machines list by status.
|
||||
|
||||
Replaces a declaration naming a component nobody wrote.
|
||||
"""
|
||||
return [
|
||||
{
|
||||
'name': 'Machine Status',
|
||||
'component': 'MachineStatusWidget',
|
||||
'endpoint': '/api/machines/dashboard/summary',
|
||||
'size': 'medium',
|
||||
'position': 5,
|
||||
'id': 'machines-outofservice',
|
||||
'title': 'Machines out of service',
|
||||
'endpoint': '/api/machines/dashboard/outofservice',
|
||||
'render': 'exceptions',
|
||||
'severity': 'warning',
|
||||
'permission': 'machines.view',
|
||||
'empty': 'hide',
|
||||
'position': 45,
|
||||
'map': {
|
||||
'title': 'assetnumber',
|
||||
'detail': 'status',
|
||||
'meta': [{'key': 'name'}],
|
||||
'link': '/machines/{assetid}',
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user