Commit 53d054a1 by Bach Dániel

Merge branch 'feature-show-version' into 'master'

Feature show version

Need vmdriver feature-show-version branch.
Fixes #77

See merge request !255
parents 3118c6d8 0a31aaab
......@@ -10,6 +10,14 @@
<dt>{% trans "Enabled" %}:</dt><dd>{{ node.enabled }}</dd>
<dt>{% trans "Host online" %}:</dt><dd> {{ node.online }}</dd>
<dt>{% trans "Priority" %}:</dt><dd>{{ node.priority }}</dd>
<dt>{% trans "Driver Version:" %}</dt>
<dd>
{{ node.driver_version.branch }} at
{{ node.driver_version.commit }} ({{ node.driver_version.commit_text }})
{% if node.driver_version.is_dirty %}
<span class="label label-danger">{% trans "with uncommitted changes!" %}</span>
{% endif %}
</dd>
<dt>{% trans "Host owner" %}:</dt>
<dd>
{% include "dashboard/_display-name.html" with user=node.host.owner show_org=True %}
......
......@@ -290,6 +290,11 @@ class Node(OperatedMixin, TimeStampedModel):
@property
@node_available
def driver_version(self):
return self.info['driver_version']
@property
@node_available
def cpu_usage(self):
return self.monitor_info.get('cpu.percent') / 100
......
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