1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 23:25:24 +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; background-color: #FFF;
} }
#max-width-page {
max-width: 768px;
}
.side-nav { .side-nav {
background-color: #FFF; background-color: #FFF;
font-size: 1.2em; font-size: 1.2em;

View file

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

View file

@ -205,6 +205,7 @@ class wvmInstance(wvmConnect):
try: try:
vol = self.get_volume_by_path(src_fl) vol = self.get_volume_by_path(src_fl)
volume = vol.name() volume = vol.name()
disk_size = vol.info()[1]
stg = vol.storagePoolLookupByVolume() stg = vol.storagePoolLookupByVolume()
storage = stg.name() storage = stg.name()
except libvirtError: except libvirtError:
@ -213,7 +214,7 @@ class wvmInstance(wvmConnect):
pass pass
finally: finally:
result.append( 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 result
return util.get_xml_path(self._XMLDesc(0), func=disks) return util.get_xml_path(self._XMLDesc(0), func=disks)