_vm-mass-migrate.html 1.44 KB
Newer Older
1 2 3
{% extends "dashboard/mass-operate.html" %}
{% load i18n %}
{% load sizefieldtags %}
4
{% load crispy_forms_tags %}
5 6 7


{% block formfields %}
8
  <hr />
9
  <ul id="vm-migrate-node-list" class="list-unstyled">
10 11 12 13 14
    <li class="panel panel-default panel-primary mass-migrate-node">
      <div class="panel-body">
        <label for="migrate-to-none">
          <strong>{% trans "Reschedule" %}</strong>
        </label>
15
        <input id="migrate-to-none" type="radio" name="to_node" value="" style="float: right;" checked="checked">
16
        <span class="vm-migrate-node-property">
17
          {% trans "This option will reschedule each virtual machine to the optimal node." %}
18 19 20 21
        </span>
        <div style="clear: both;"></div>
      </div>
    </li>
22
    {% for n in form.fields.to_node.queryset.all %}
23
    <li class="panel panel-default mass-migrate-node">
24
      <div class="panel-body">
25 26 27
        <label for="migrate-to-{{n.pk}}">
          <strong>{{ n }}</strong>
        </label>
28
        <input id="migrate-to-{{n.pk}}" type="radio" name="to_node" value="{{ n.pk }}" style="float: right;"/>
29 30 31
        <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>
32 33
      </div>
    </li>
34 35
    {% endfor %}
  </ul>
36
  {{ form.live_migration|as_crispy_field }}
37 38
  <hr />
{% endblock %}