<t:block id="content" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" xmlns:p="tapestry:parameter">

    <!-- TODO: Convert to a Bootstrap tab set -->

    <t:unless test="productionMode">
        <ul>
            <li>
                <a href="#EntitiesStatistics">
                    Entities Statistics
                </a>
            </li>
            <li>
                <a href="#CollectionStatistics">
                    Collection Statistics
                </a>
            </li>
            <li>
                <a href="#QueriesStatistics">Queries Statistics</a>
            </li>
            <li>
                <a href="#SecondLevelCacheStatistics">
                    Second Level Cache Statistics
                </a>
            </li>
        </ul>

        <h1>Session Factory Statistics</h1>
        <t:beandisplay object="statistics"/>

        <a name="EntitiesStatistics"/>

        <h1>Entities Statistics</h1>
        <t:loop source="statistics.entityNames"
                value="currentEntityName">
            <h2>${currentEntityName}</h2>
            <t:beandisplay object="entityStatistics"/>
        </t:loop>

        <a name="CollectionStatistics"/>

        <h1>Collection Statistics</h1>
        <t:loop source="statistics.collectionRoleNames"
                value="currentCollectionRoleName">
            <h2>${currentCollectionRoleName}</h2>
            <t:beandisplay object="collectionStatistics"/>
        </t:loop>

        <a name="QueriesStatistics"/>

        <h1>Queries Statistics</h1>
        <t:loop source="statistics.queries" value="currentQuery">
            <t:beandisplay object="queryStatistics"/>
        </t:loop>

        <a name="SecondLevelCacheStatistics"/>

        <h1>Second Level Cache Statistics</h1>
        <t:loop source="statistics.secondLevelCacheRegionNames"
                value="currentSecondLevelCacheRegionName">
            <t:beandisplay object="secondLevelCacheStatistics"/>
        </t:loop>

        <p:else>
            <p>
                <em>${message:hibernate-statistics-hidden}</em>
            </p>
        </p:else>
    </t:unless>
</t:block>