fixing formatting

This commit is contained in:
Levi 2017-05-11 00:38:53 -05:00
parent 22798e29bf
commit 1a6e1a44d8
3 changed files with 11 additions and 16 deletions

View file

@ -174,9 +174,6 @@ class OpenNebulaManager:
def get_vm_templates(self):
template_pool = oca.VmTemplatePool(self.oneadmin_client)
template_pool.info()
a = template_pool[0]
import pdb
pdb.set_trace()
return template_pool
def get_vm(self, email, vm_id):
@ -206,9 +203,6 @@ class OpenNebulaManager:
return vm_pool
class HostingManageVMAdmin(admin.ModelAdmin):
client = None
oneadmin_client = None

View file

@ -85,7 +85,7 @@
<div class="col-md-3">
<div class="well text-center">
<i class="fa fa-hdd-o" aria-hidden="true"></i> {% trans "Disk"%} <br/>
<span class="label label-success">{{virtual_machine.disk_size}} GiB</span>
<span class="label label-success">{{virtual_machine.disk_size|floatformat:2}} GiB</span>
</div>
</div>
</div><!--/row-->
@ -150,14 +150,15 @@
<div class="row ">
<div class="col-md-12 inline-headers">
<h3>{% trans "Current status"%}</h3>
<div class="pull-right space-above">
{% if virtual_machine.status == 'pending' %}
<span class="label label-warning"><strong>{{virtual_machine.get_status_display}}</strong></span>
{% elif virtual_machine.status == 'online' %}
<span class="label label-success"><strong>{{virtual_machine.get_status_display}}</strong></span>
{% elif virtual_machine.status == 'canceled'%}
<span class="label label-danger"><strong>{{virtual_machine.get_status_display}}</strong></span>
{% endif %}
{% if virtual_machine.state == 'ACTIVE' %}
<span class="h3 label label-success"><strong> {{virtual_machine.state}}</strong></span>
{% elif virtual_machine.state == 'POWEROFF' %}
<span class="h3 label label-danger"><strong>{{virtual_machine.state}}</strong></span>
{% else %}
<span class="h3 label label-warning"><strong>{{virtual_machine.state}}</strong></span>
{% endif %}
</div>
</div>
</div>

View file

@ -22,8 +22,8 @@
<tbody>
{% for vm in vms_opennebula %}
<tr>
<td scope="row">{{vm.deploy_id}}</td>
<td>{{vm.price}} CHF</td>
<td scope="row">{{vm.name}}</td>
<td>{{vm.price|floatformat:2}} CHF</td>
<td>
{% if vm.state == 'ACTIVE' %}