Commit 734415ce by Guba Sándor Committed by Őry Máté

vm: fixed node status names to be capital

parent ad66da57
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
<div class="row"> <div class="row">
<div class="col-md-4" id="node-info-pane"> <div class="col-md-4" id="node-info-pane">
<div id="node-info-data" class="big"> <div id="node-info-data" class="big">
<span id="node-details-state" class="label {% if node.state == 'Online' %}label-success <span id="node-details-state" class="label {% if node.state == 'ONLINE' %}label-success
{% elif node.state == 'Missing' %}label-danger {% elif node.state == 'MISSING' %}label-danger
{% elif node.state == 'Disabled' %}label-warning {% elif node.state == 'DISABLED' %}label-warning
{% elif node.state == 'Offline' %}label-warning {% elif node.state == 'OFFLINE' %}label-warning
{% endif %}">{{ node.state }}</span> {% endif %}">{{ node.state }}</span>
<div class="btn-group"> <div class="btn-group">
{% with node as record %} {% with node as record %}
......
...@@ -76,13 +76,13 @@ class Node(TimeStampedModel): ...@@ -76,13 +76,13 @@ class Node(TimeStampedModel):
""" """
if self.enabled and self.online: if self.enabled and self.online:
return 'Online' return 'ONLINE'
elif self.enabled and not self.online: elif self.enabled and not self.online:
return 'Missing' return 'MISSING'
elif not self.enabled and self.online: elif not self.enabled and self.online:
return 'Disabled' return 'DISABLED'
else: else:
return 'Offline' return 'OFFLINE'
def disable(self, user=None): def disable(self, user=None):
''' Disable the node.''' ''' Disable the node.'''
......
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