Fix Terminate Instance on network topology page
It failed because not all the info expected by the
`project.instances.IndexView` was provided by network topology view
while rendering part of Instances table in an iframe.
Change-Id: If36f877517d454430320b90362fd0d5207dbf9df
Closes-Bug: #1398468
(cherry picked from commit a1416b6d1d
)
This commit is contained in:
parent
947bc63977
commit
8b80fe7766
|
@ -7,7 +7,11 @@
|
||||||
</table>
|
</table>
|
||||||
" data-original-title="{% trans "Flavor Details" %}: {{ name }}">{{ name }}</a>
|
" data-original-title="{% trans "Flavor Details" %}: {{ name }}">{{ name }}</a>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
$(function ()
|
$(function () {
|
||||||
{ $("#flavor_details_{{ id }}").popover({html:true});
|
var $flavor = $("#flavor_details_{{ id }}");
|
||||||
|
// NOTE(tsufiev): check this in case this template is used in network topology -> terminate instance
|
||||||
|
if ( $flavor.popover ) {
|
||||||
|
$flavor.popover({html:true});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -121,12 +121,13 @@ class IndexView(tables.DataTableView):
|
||||||
return instances
|
return instances
|
||||||
|
|
||||||
def get_filters(self, filters):
|
def get_filters(self, filters):
|
||||||
filter_field = self.table.get_filter_field()
|
|
||||||
filter_action = self.table._meta._filter_action
|
filter_action = self.table._meta._filter_action
|
||||||
if filter_action.is_api_filter(filter_field):
|
if filter_action:
|
||||||
filter_string = self.table.get_filter_string()
|
filter_field = self.table.get_filter_field()
|
||||||
if filter_field and filter_string:
|
if filter_action.is_api_filter(filter_field):
|
||||||
filters[filter_field] = filter_string
|
filter_string = self.table.get_filter_string()
|
||||||
|
if filter_field and filter_string:
|
||||||
|
filters[filter_field] = filter_string
|
||||||
return filters
|
return filters
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue