diff --git a/tuskar_ui/infrastructure/nodes/tabs.py b/tuskar_ui/infrastructure/nodes/tabs.py index b7aeb264f..c8718d776 100644 --- a/tuskar_ui/infrastructure/nodes/tabs.py +++ b/tuskar_ui/infrastructure/nodes/tabs.py @@ -91,8 +91,16 @@ class RegisteredTab(tabs.TableTab): def get_nodes_table_data(self): redirect = urlresolvers.reverse('horizon:infrastructure:nodes:index') - nodes = api.node.Node.list(self.request, maintenance=False, - _error_redirect=redirect) + + if 'provisioned' in self.request.GET: + associated = True + elif 'free' in self.request.GET: + associated = False + else: + associated = None + + nodes = api.node.Node.list(self.request, associated=associated, + maintenance=False, _error_redirect=redirect) if nodes: all_resources = api.heat.Resource.list_all_resources(self.request) diff --git a/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html b/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html index b62dca048..d41c9ca14 100644 --- a/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html +++ b/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html @@ -26,13 +26,13 @@

{% trans 'Free Nodes' %}

- + {{ nodes_free_count }} {% trans 'Free Nodes' %}
- + {{ nodes_provisioned_count }} {% trans 'Provisioned Nodes' %} @@ -128,7 +128,7 @@