_vm-migrate.html 903 Bytes
Newer Older
1 2 3
{% load i18n %}
{% load sizefieldtags %}

4
<form method="POST" action="{% url "dashboard.views.vm-migrate" pk=vm.pk %}">
5 6
  {% csrf_token %}
  <ul id="vm-migrate-node-list">
7 8 9 10 11 12 13 14 15 16 17 18
    {% for n in nodes %}
      <li class="panel panel-default"><div class="panel-body">
        <label for="migrate-to-{{n.pk}}">
          <strong>{{ n }}</strong>
        </label>
        <input id="migrate-to-{{n.pk}}" type="radio" name="node" value="{{ n.pk }}" style="float: right;" />
        <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 %}
19 20 21
  </ul>
  <button type="submit" class="btn btn-primary btn-sm"><i class="icon-truck"></i> Migrate</button>
</form>