1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

Day is over

This commit is contained in:
Retspen 2015-03-13 17:30:09 +02:00
parent ee1983b656
commit b98084b7ee
3 changed files with 24 additions and 22 deletions

View file

@ -10,6 +10,10 @@ body {
background-color: #FFF;
}
#max-width-page {
max-width: 768px;
}
.side-nav {
background-color: #FFF;
font-size: 1.2em;

View file

@ -12,31 +12,28 @@
{% include 'errors_block.html' %}
<div class="row">
<div class="row" id="max-width-page">
<div class="col-lg-12">
Status:
{% ifequal status 5 %}
<span class="text-danger">{% trans "Off" %}</span>
{% endifequal %}
{% ifequal status 1 %}
<span class="text-success">{% trans "Active" %}</span>
{% endifequal %}
{% ifequal status 3 %}
<span class="text-warning">{% trans "Suspend" %}</span>
{% endifequal %}
{% ifequal status 5 %}
<span class="text-danger">{% trans "Off" %}</span>
{% endifequal %}
{% ifequal status 1 %}
<span class="text-success">{% trans "Active" %}</span>
{% endifequal %}
{% ifequal status 3 %}
<span class="text-warning">{% trans "Suspend" %}</span>
{% endifequal %}
Vcpu: {% if cur_vcpu %}{{ cur_vcpu }}{% else %}{{ vcpu }}{% endif %}
Ram: {{ cur_memory }}{% trans "MB" %}
{% ifnotequal description 'None' %}
{{ description }}
{% endifnotequal %}
{% if cur_vcpu %}{{ cur_vcpu }}{% else %}{{ vcpu }}{% endif %} {% trans "Vcpu" %}
{{ cur_memory }}{% trans "MB" %} {% trans "Ram" %}
{% for disk in disks %}
{{ disk.size|filesizeformat }} {% trans "Disk" %}
{% endfor %}
{{ description }}
<hr>
</div>
</div>
<hr>
<div class="row">
<div class="col-lg-12">
<div role="tabpanel">
<!-- Nav tabs -->
<ul class="nav nav-pills" role="tablist">

View file

@ -205,6 +205,7 @@ class wvmInstance(wvmConnect):
try:
vol = self.get_volume_by_path(src_fl)
volume = vol.name()
disk_size = vol.info()[1]
stg = vol.storagePoolLookupByVolume()
storage = stg.name()
except libvirtError:
@ -213,7 +214,7 @@ class wvmInstance(wvmConnect):
pass
finally:
result.append(
{'dev': dev, 'image': volume, 'storage': storage, 'path': src_fl, 'format': disk_format})
{'dev': dev, 'image': volume, 'storage': storage, 'path': src_fl, 'format': disk_format, 'size': disk_size})
return result
return util.get_xml_path(self._XMLDesc(0), func=disks)