From 04d3568d1a29aab605ee6be6523655371a481de6 Mon Sep 17 00:00:00 2001 From: catborise Date: Tue, 4 Dec 2018 16:05:24 +0300 Subject: [PATCH] add instance count to host collapse --- instances/templates/allinstances_index_grouped.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/instances/templates/allinstances_index_grouped.html b/instances/templates/allinstances_index_grouped.html index fb98408..0035e43 100644 --- a/instances/templates/allinstances_index_grouped.html +++ b/instances/templates/allinstances_index_grouped.html @@ -17,7 +17,10 @@ - {{ host.1 }} + + {{ host.1 }} + + {% ifequal host.2 1 %}{% trans "Active" %}{% endifequal %} @@ -129,13 +132,14 @@ function hide_all_host_instances() { all_host_rows = rows.filter('[host]'); all_host_rows.toggle(); $('span[id^=collapse_host_instances_]').toggleClass("glyphicon-chevron-down").toggleClass("glyphicon-chevron-up"); + $('span[id^=inst_count_badge_]').toggleClass("hidden"); } function hide_host_instances(host) { var rows = $('table tr'); - host_rows = rows.filter("[host='"+host+"']"); host_rows.toggle(); $("span[id='collapse_host_instances_"+host+"']").toggleClass("glyphicon-chevron-down").toggleClass("glyphicon-chevron-up"); + $("span[id='inst_count_badge_"+host+"']").toggleClass("hidden"); } {% endblock %}