_vm-migrate.html 1.38 KB
Newer Older
1
{% extends "dashboard/operate.html" %}
2 3 4
{% load i18n %}
{% load sizefieldtags %}

5 6 7 8 9 10 11 12 13 14 15 16
{% block question %}
<p>
{% blocktrans with obj=object op=op.name %}
Choose a compute node to migrate {{obj}} to.
{% endblocktrans %}
</p>
<p class="text-info">{{op.name}}: {{op.description}}</p>
{% endblock %}

{% block formfields %}
  <ul id="vm-migrate-node-list" class="list-unstyled">
  {% with current=object.node.pk selected=object.select_node.pk %}
17 18 19 20
    {% for n in nodes %}
      <li class="panel panel-default"><div class="panel-body">
        <label for="migrate-to-{{n.pk}}">
          <strong>{{ n }}</strong>
21
          {% if current == n.pk %}<div class="label label-info">{% trans "current" %}</div>{% endif %}
22
          {% if selected == n.pk %}<div class="label label-success">{% trans "recommended" %}</div>{% endif %}
23
        </label>
24
        <input id="migrate-to-{{n.pk}}" type="radio" name="node" value="{{ n.pk }}" style="float: right;"
25 26
        {% if current == n.pk %}disabled="disabled"{% endif %}
        {% if selected == n.pk %}checked="checked"{% endif %} />
27 28 29 30 31 32
        <span class="vm-migrate-node-property">{% trans "CPU load" %}: {{ n.cpu_usage }}</span>
        <span class="vm-migrate-node-property">{% trans "RAM usage" %}: {{ n.byte_ram_usage|filesize }}/{{ n.ram_size|filesize }}</span>
        <div style="clear: both;"></div>
      </div></li>
    {% endfor %}
  {% endwith %}
33
  </ul>
34
{% endblock %}