Commit d56aeab7 by Guba Sándor

node: fixed states to begin with capital

parent 8f58c693
...@@ -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-status-label" class="label {% if node.state == 'online' %}label-success <span id="node-status-label" 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 %}
......
...@@ -74,13 +74,12 @@ class Node(TimeStampedModel): ...@@ -74,13 +74,12 @@ 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' return 'Offline'
def disable(self, user=None): def disable(self, user=None):
......
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