Commit 7f20e972 by Oláh István Gergely

dashboard: add get_status_icon to nodes, change node status icons

parent 40ae32c2
......@@ -317,6 +317,14 @@ class Node(OperatedMixin, TimeStampedModel):
cls.objects.filter(enabled=enabled).select_related('host')
if i.online == online])
def get_status_icon(self):
return {
'OFFLINE': 'icon-minus-sign',
'DISABLED': 'icon-moon',
'MISSING': 'icon-warning-sign',
'ONLINE': 'icon-play-sign'}.get(self.get_state(),
'icon-question-sign')
@permalink
def get_absolute_url(self):
return ('dashboard.views.node-detail', None, {'pk': self.id})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment