Trending
{# NOTE: We cannot use loop.first because we loop through many empty histGroups! #}
{# See: https://stackoverflow.com/a/4880398 #}
{% set firstLoopCompleted = [] %}
{% for subsystemName, subsystem in trendingManager.trendingDB.items() %}
{% if selectedHistGroup == subsystemName or (selectedHistGroup == None and firstLoopCompleted == []) %}
{% for name, trendingObject in subsystem.items() %}
{% if selectedHist == name or selectedHist == None %}
{# Effective increments our counter #}
{% if firstLoopCompleted.append(1) %}{% endif %}
{{ trendingObject.desc }}
{# Set histogramContainer style when we using jsRoot to set the proper shadows #}
{%- set histogramContainerClasses = "histogramContainerStyle" -%}
{% if jsRoot != True %}

{% else %}
{# Provide indication that we are loading jsroot content #}
{# It will disappear once jsroot loads the histogram #}
Loading...
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{# Should only get here if nothing was selected! #}
{%- if firstLoopCompleted == [] -%}
Error! No trending histogram available for selected subsystem (input: {{ selectedHistGroup }}) or selected histogram (input: {{ selectedHist }})! Please try again with a different value or contact the admin!
{%- endif -%}