diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-04-14 12:50:03 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-04-14 12:50:03 +0000 |
commit | 0006a339b7627ce53edf6cf0d6614f4e8cc60000 (patch) | |
tree | de792d5852233431ac1770664c6aaba32b600135 | |
parent | 37bca2b85c588fe7c89160492d5d8c1db5cebe3b (diff) | |
parent | 66ff1a5f783293298843b2ab0cfee002df504000 (diff) | |
download | tuskar-ui-0006a339b7627ce53edf6cf0d6614f4e8cc60000.tar.gz |
Merge "Only show charts for provisioned nodes"
-rw-r--r-- | tuskar_ui/infrastructure/flavors/tests.py | 4 | ||||
-rw-r--r-- | tuskar_ui/infrastructure/flavors/views.py | 3 | ||||
-rw-r--r-- | tuskar_ui/infrastructure/templates/infrastructure/nodes/_overview.html | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/tuskar_ui/infrastructure/flavors/tests.py b/tuskar_ui/infrastructure/flavors/tests.py index 4b7d5d12..470cb4f9 100644 --- a/tuskar_ui/infrastructure/flavors/tests.py +++ b/tuskar_ui/infrastructure/flavors/tests.py @@ -195,7 +195,7 @@ class FlavorsTest(test.BaseAdminViewTests): self.assertEqual(get_mock.call_count, 1) self.assertEqual(plan_mock.call_count, 2) self.assertEqual(roles_mock.call_count, 1) - self.assertEqual(role_flavor_mock.call_count, 4) + self.assertEqual(role_flavor_mock.call_count, 8) self.assertTemplateUsed(res, 'infrastructure/flavors/details.html') def test_details(self): @@ -224,7 +224,7 @@ class FlavorsTest(test.BaseAdminViewTests): self.assertEqual(flavor_mock.call_count, 1) self.assertEqual(plan_mock.call_count, 2) self.assertEqual(roles_mock.call_count, 1) - self.assertEqual(role_flavor_mock.call_count, 4) + self.assertEqual(role_flavor_mock.call_count, 8) self.assertEqual(stack_mock.call_count, 1) self.assertEqual(count_mock.call_count, 4) self.assertTemplateUsed(res, 'infrastructure/flavors/details.html') diff --git a/tuskar_ui/infrastructure/flavors/views.py b/tuskar_ui/infrastructure/flavors/views.py index b66d4aca..09c36ac7 100644 --- a/tuskar_ui/infrastructure/flavors/views.py +++ b/tuskar_ui/infrastructure/flavors/views.py @@ -99,4 +99,5 @@ class DetailView(horizon.tables.DataTableView): plan = api.tuskar.Plan.get_the_plan(self.request) return [role for role in api.tuskar.Role.list(self.request) - if role.flavor(plan).id == flavor_id] + if role.flavor(plan) + and role.flavor(plan).id == flavor_id] diff --git a/tuskar_ui/infrastructure/templates/infrastructure/nodes/_overview.html b/tuskar_ui/infrastructure/templates/infrastructure/nodes/_overview.html index 377980e2..373084af 100644 --- a/tuskar_ui/infrastructure/templates/infrastructure/nodes/_overview.html +++ b/tuskar_ui/infrastructure/templates/infrastructure/nodes/_overview.html @@ -88,11 +88,15 @@ </div> </div> <div> + {% if nodes_provisioned_count or nodes_provisioning_count %} {% url 'horizon:infrastructure:nodes:nodes_performance' as node_perf_url %} {% include "infrastructure/_performance_chart_box.html" with meter_conf=meter_conf node_perf_url=node_perf_url col_size=2 %} + {% endif %} </div> </div> +{% if nodes_provisioned_count or nodes_provisioning_count %} {% include "infrastructure/_top_5_box.html" %} +{% endif %} {% if nodes_on_discovery_count or nodes_discovered_count or nodes_discovery_failed_count %} <h3>{% trans "Nodes Discovery" %}</h3> <hr> |