horizon/openstack_dashboard/dashboards/project/instances/templates/instances/_instance_flavor.html
manchandavishal 25816bd824 Fix tooltips and popovers for flavor details on the instance list.
Due to some changes in bootstrap, the popup table for
flavor details content is empty, on the instance list pages.
This patch adds 'sanitize:false' which fix the issue.
For more info. please refer[1].

[1] https://github.com/twbs/bootstrap/issues/28290

Closes-Bug: #1886025

Change-Id: I60788061d17a5529440ec1e3d6d5c11f5259d2e8
2020-07-07 09:19:17 +00:00

19 lines
889 B
HTML

{% 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>
</table>
" data-original-title="{% blocktrans %}<span class='word-wrap'>Flavor Details: {{ name }}</span>">{{ name }}{% endblocktrans %}</a>
<script type="text/javascript" charset="utf-8">
$(function () {
var $flavor = $("#flavor_details_{{ id }}");
// NOTE(tsufiev): check this in case this template is used in network topology -> delete instance
if ( $flavor.popover ) {
$flavor.popover({html:true, sanitize: false, trigger: "hover"});
}
});
</script>