diff --git a/puppetboard/templates/_macros.html b/puppetboard/templates/_macros.html index 508f984..1d03aa3 100644 --- a/puppetboard/templates/_macros.html +++ b/puppetboard/templates/_macros.html @@ -46,8 +46,32 @@ var data = [ } ] var ctx = document.getElementById("factChart").getContext("2d"); - var myNewChart = new Chart(ctx).Pie(data); - new Chart(ctx).Pie(data); + new Chart(ctx).Pie(data.sort(function(a,b) { return parseFloat(a.value) - parseFloat(b.value)})); + +{%- endmacro %} +{% macro facts_graph_value(facts, autofocus=False, condensed=False, show_node=False, margin_top=20, margin_bottom=20) -%} + + + {%- endmacro %} diff --git a/puppetboard/templates/fact.html b/puppetboard/templates/fact.html index bafd909..e2d3ded 100644 --- a/puppetboard/templates/fact.html +++ b/puppetboard/templates/fact.html @@ -3,5 +3,6 @@ {% block content %}

{{name}}

{{macros.facts_graph(facts, autofocus=True, show_node=True, margin_bottom=10)}} +{{macros.facts_graph_value(facts, autofocus=True, show_node=True, margin_bottom=10)}} {{macros.facts_table(facts, autofocus=True, show_node=True, margin_bottom=10)}} {% endblock content %}