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