{#
The left hand column is a controlled by a bootstrap navbar. The user clicks on either "By IP" or "By Time" and
bootstrap shows the appropriate tab-pane in the tab contents.
The left-hand column controls what is visible in the right-hand panel by marking at most one of them as "active".
Being inside a tab contents, only those marked active are made visible. We unfortunately cannot use a bootstrap navbar
because it requires that all the navigation tabs be within a single unordered list.
#}
{% for flag_name, glyph in name_and_glyph %}
{% set flag = context.flag_name_to_flag(flag_name) %}
{% set flag_in_use = flag in session.session_info.get_icon_flags() %}
{% if flag_in_use or full %}
{% set classes = ['fas', 'fa-' + glyph] + ([] if flag_in_use else ['invisible']) %}
{% for host_info in host_infos_by_ip %}
{% if not loop.first %}{% endif %}
{{ session_ip_or_name(host_info.sessions[0]) }}
({{ host_info.total_time }})
{# The following node is the parent of all SessionInfo nodes constructed on the fly.
We give it an id so that we can easily find it.
#}
{#
The lines marked <<<< and >>>> are special markers for the code that reads the Jinja generated output and then writes
it out to a file. Each such line consists of four <'s or >'s, an id uniquely marking the session, and the actual
contents of the line.
If we are including session info inline, the code just ignores the <<<<, >>>>, and session id, and outputs whatever
is on the rest of the line.
If session info is in separate files, then the code between the <<<< and >>>> is written in a separate file whose
name is generated from the session.id. The additional text at the end of the line is ignored.
These markers are never nested.
#}
{% set session_info_classes = "SessionInfo tab-pane" %}
Welcome to the OPUS log Analyzer
{% for session in context.sessions %}
{# session_info_classes is a variable because it is also used in the JS below. #}
<<<< {{ session.id }}
{% set host_ip = session.host_ip %}
{% if host_ip in ip_to_host_name %}