added flavor id in instance detail page
in instance table, we can filter out the instances by using the flavor id. but there is no way to get the flavor id in horizon for non admin users. so adding the flavor id in instance detail and popover flavor detail table. Change-Id: I4995d9181a47bb7e15ce8b2c7b4252e389d91c71 Closes-Bug: #1415825
This commit is contained in:
parent
8ddb3f6d41
commit
fb3709dc40
|
@ -814,7 +814,8 @@ def get_size(instance):
|
|||
"id": instance.id,
|
||||
"size_disk": size_disk,
|
||||
"size_ram": size_ram,
|
||||
"vcpus": instance.full_flavor.vcpus
|
||||
"vcpus": instance.full_flavor.vcpus,
|
||||
"flavor_id": instance.full_flavor.id
|
||||
}
|
||||
return template.loader.render_to_string(template_name, context)
|
||||
return _("Not available")
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
<dt>{% trans "Flavor" %}</dt>
|
||||
{% if instance.full_flavor %}
|
||||
<dd>{{ instance.full_flavor.name }}</dd>
|
||||
<dt>{% trans "Flavor ID" %}</dt>
|
||||
<dd>{{ instance.full_flavor.id }}</dd>
|
||||
<dt>{% trans "RAM" %}</dt>
|
||||
<dd>{{ instance.full_flavor.ram|mb_float_format }}</dd>
|
||||
<dt>{% trans "VCPUs" %}</dt>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% load i18n %}
|
||||
<a href="#" id="flavor_details_{{ id }}" class="link-popover" rel="popover" tabindex="0" data-trigger="focus" data-content="
|
||||
<table class='table table-bordered'>
|
||||
<tr><th>{% trans 'ID' %}</th><td>{{ flavor_id }}</td></tr>
|
||||
<tr><th>{% trans 'VCPUs' %}</th><td>{{ vcpus }}</td></tr>
|
||||
<tr><th>{% trans 'RAM' %}</th><td>{{ size_ram }}</td></tr>
|
||||
<tr><th>{% trans 'Size' %}</th><td>{{ size_disk }}</td></tr>
|
||||
|
|
Loading…
Reference in New Issue