Commit 4cde034a by Őry Máté

dashboard: make _vm-migrate template fancier

parent 9db57446
{% load i18n %}
{% load sizefieldtags %}
<form method="POST" action="{% url "dashboard.views.vm-migrate" pk=vm %}">
<form method="POST" action="{% url "dashboard.views.vm-migrate" %}">
{% csrf_token %}
<ul id="vm-migrate-node-list">
{% for n in nodes %}
<li class="panel panel-default"><div class="panel-body">
<label for="migrate-to-{{}}">
<strong>{{ n }}</strong>
<input type="radio" name="node" value="{{ }}" style="float: right;"/>
<input id="migrate-to-{{}}" type="radio" name="node" value="{{ }}" 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>
{% endfor %}
{% endwith %}
<button type="submit" class="btn btn-primary btn-sm"><i class="icon-truck"></i> Migrate</button>
......@@ -1731,7 +1731,7 @@ class VmMigrateView(SuperuserRequiredMixin, TemplateView):
'template': 'dashboard/_vm-migrate.html',
'box_title': _('Migrate %(name)s' % {'name':}),
'ajax_title': True,
'vm': kwargs['pk'],
'vm': vm,
'nodes': [n for n in Node.objects.filter(enabled=True)
if n.state == "ONLINE"]
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