resources.html 1.7 KB
Newer Older
1 2 3
{% load i18n %}
  {% csrf_token %}

4
  <dl class="dl-horizontal">
5
    <dt>{% trans "Node name" %}:</dt><dd>{{ node.name }}</dd>
6
    <dt>{% trans "CPU cores" %}:</dt><dd>{{ node.info.core_num }}</dd>
7
    <dt>{% trans "RAM size" %}:</dt> <dd>{% widthratio node.info.ram_size 1048576 1 %} MiB</dd>
8
    <dt>{% trans "Architecture" %}:</dt><dd>{{ node.info.architecture }}</dd>
9
    <dt>{% trans "Host IP" %}:</dt><dd>{{ node.host.ipv4 }}</dd>
10 11 12
    <dt>{% trans "Enabled" %}:</dt><dd>{{ node.enabled|yesno }}</dd>
    <dt>{% trans "Host online" %}:</dt><dd> {{ node.online|yesno }}</dd>
    <dt>{% trans "Minion online" %}:</dt><dd> {{ node.minion_online|yesno }}</dd>
13
    <dt>{% trans "Priority" %}:</dt><dd>{{ node.priority }}</dd>
Bach Dániel committed
14 15
    <dt>{% trans "Driver Version:" %}</dt>
    <dd>
16 17 18 19 20 21
      {% if node.driver_version %}
        {{ 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 %}
Bach Dániel committed
22 23
      {% endif %}
    </dd>
24 25 26 27
    <dt>{% trans "Host owner" %}:</dt>
    <dd>
      {% include "dashboard/_display-name.html" with user=node.host.owner show_org=True %}
    </dd>
28
    <dt>{% trans "Vlan" %}:</dt><dd>{{ node.host.vlan }}</dd>
29 30 31
    <dt>{% trans "Host name" %}:</dt>
    <dd>
      {{ node.host.hostname }}
32
      {% if request.user.is_superuser %}
33 34 35 36
      <a href="{{ node.host.get_absolute_url }}" class="btn btn-default btn-xs">
        <i class="fa fa-pencil"></i>
        {% trans "Edit host" %}
      </a>
37
      {% endif  %}
38
    </dd>
39 40
    </dl>

41 42 43 44 45
{% block extra_js %}
  <style>
    label {padding-top: 6px;}
  </style>
{% endblock %}