diff --git a/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html b/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html index db9819c3d..a6142606e 100644 --- a/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html +++ b/tuskar_ui/infrastructure/nodes/templates/nodes/_overview.html @@ -75,7 +75,7 @@

{% trans 'Provisioning Status' %}

-
+
{% widthratio deployed_nodes|length total_nodes|length 100 %}% {% trans 'Deployed' %}
{% widthratio free_nodes|length total_nodes|length 100 %}% {% trans 'Free' %} @@ -84,7 +84,7 @@

{% trans 'Power Status' %}

-
+
{% widthratio total_nodes_up|length total_nodes|length 100 %}% {% trans 'Running' %}
{% widthratio total_nodes_down|length total_nodes|length 100 %}% {% trans 'Stopped' %} diff --git a/tuskar_ui/infrastructure/overcloud/tabs.py b/tuskar_ui/infrastructure/overcloud/tabs.py index 7a74679f7..207cb2245 100644 --- a/tuskar_ui/infrastructure/overcloud/tabs.py +++ b/tuskar_ui/infrastructure/overcloud/tabs.py @@ -59,7 +59,7 @@ def _get_role_data(overcloud, role): class OverviewTab(tabs.Tab): name = _("Overview") slug = "overview" - template_name = ("infrastructure/overcloud/_detail_overview.html") + template_name = "infrastructure/overcloud/_detail_overview.html" preload = False def get_context_data(self, request, **kwargs): @@ -79,31 +79,12 @@ class OverviewTab(tabs.Tab): except IndexError: last_event = None - # TODO(akrivoka): Simplified version for now, only send controller - # and compute node counts to template, as pie chart cannot handle - # more anyway. Fix this when pie chart supports more than 2 values. - - # TODO(akrivoka): Commenting out this part for now. We need better - # pie chart support in Horizon before this can be done. - # Relevant blueprint: - # https://blueprints.launchpad.net/horizon/+spec/piechart-enhancement - - #controller_count = compute_count = 0 - #for rd in role_data: - # if rd['name'] == 'Controller': - # controller_count = rd.get('running_node_count', 0) - # elif rd['name'] == 'Compute': - # compute_count = rd.get('running_node_count', 0) - return { 'overcloud': overcloud, 'roles': role_data, 'progress': progress, 'dashboard_url': overcloud.dashboard_url, 'last_event': last_event, - #'controller_count': controller_count, - #'compute_count': compute_count, - #'total_count': controller_count + compute_count, } diff --git a/tuskar_ui/infrastructure/overcloud/templates/overcloud/_detail_overview.html b/tuskar_ui/infrastructure/overcloud/templates/overcloud/_detail_overview.html index e2284ac23..76a375d78 100644 --- a/tuskar_ui/infrastructure/overcloud/templates/overcloud/_detail_overview.html +++ b/tuskar_ui/infrastructure/overcloud/templates/overcloud/_detail_overview.html @@ -99,14 +99,7 @@

{% trans "Deployment Role Distribution" %}

-

{% trans "Statistics currently not available." %}

- {% comment %} -
-
- {% widthratio controller_count total_count 100 %}% {% trans 'Controller' %}
- {% widthratio compute_count total_count 100 %}% {% trans 'Compute' %} -
- {% endcomment %} +
diff --git a/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js b/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js index f640ec1bb..0af46a947 100644 --- a/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js +++ b/tuskar_ui/infrastructure/static/infrastructure/js/angular/horizon.number_picker.js @@ -1,4 +1,4 @@ -angular.module('horizonApp').directive('hrNumberPicker', function() { +angular.module('hz').directive('hrNumberPicker', function() { return { restrict: 'A', replace: true,