{% extends '@WebProfiler/Profiler/layout.html.twig' %}

{% block toolbar %}
    {% set status_color = collector.currentChannel is null ? 'red' : '' %}

    {% set icon %}
        {{ include('@SyliusChannel/Collector/Icon/channel.svg') }}
        <span class="sf-toolbar-value">{{ collector.currentChannel.name|default('Undefined') }}</span>
    {% endset %}

    {% set text %}
        {% for channel in collector.channels %}
            <div class="sf-toolbar-info-piece">
                <b>{{ channel.name }}</b>
                <span>{{ channel.hostname }}{% if collector.isChannelChangeSupported %} (<a href="?_channel_code={{ channel.code }}">change</a>){% endif %}</span>
            </div>
        {% endfor %}
    {% endset %}

    {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: status_color }) }}
{% endblock %}

{% extends '@WebProfiler/Profiler/layout.html.twig' %}

{% block toolbar %}
    {% set status_color = collector.currentChannel is null ? 'red' : '' %}

    {% set icon %}
        {{ include('@SyliusChannel/Collector/Icon/channel.svg') }}
        <span class="sf-toolbar-value">{{ collector.currentChannel.name|default('Undefined') }}</span>
    {% endset %}

    {% set text %}
        <div class="sf-toolbar-info-piece">
            <b>Channels</b>
            <span class="sf-toolbar-status {% if collector.channels is empty %}sf-toolbar-status-red{% endif %}">{{ collector.channels|length }}</span>
        </div>

        {% for channel in collector.channels %}
            <div class="sf-toolbar-info-piece">
                <b>{{ channel.name }}</b>
                <span>{{ channel.hostname }}{% if collector.isChannelChangeSupported %} (<a href="?_channel_code={{ channel.code }}">change</a>){% endif %}</span>
            </div>
        {% endfor %}
    {% endset %}

    {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: false, status: status_color }) }}
{% endblock %}

Add number of channels to the collector
[Channel] Add number of channels to the collector
