<table>
    <tbody>
        <tr>
            <th class="dbname">Database name:</th>
            <th class="dbinfo">Database stats:</th>
            <th class="dbextra">Database details:</th>
        </tr>
        {% for dbname, dbinfo in info.iteritems %}
        <tr>
            <td class="dbname">
                <div class="djangoname">{{ dbname|capfirst }} →</div>
                <div class="smalldetails">
                    ({{ dbinfo.options.host }}:{{ dbinfo.options.port }})
                </div>
            </td>
            <td class="dbinfo">
                <ul>
                    <li><strong>Architecture: </strong> {{ dbinfo.arch_bits }} bits.</li>
                    <li><strong>Redis version: </strong> {{ dbinfo.redis_version }}</li>
                    <li><strong>Process ID: </strong> {{ dbinfo.process_id }}</li>
                    <li><strong>Role: </strong> {{ dbinfo.role }}</li>
                    <li><strong>Uptime (seconds): </strong> {{ dbinfo.uptime_in_seconds }}</li>
                    <li><strong>Current clients: </strong> {{ dbinfo.connected_clients }}</li>
                    <li><strong>Current slaves: </strong> {{ dbinfo.connected_slaves }}</li>
                </ul>
                <ul>
                    <li><strong>Keyspace Hits: </strong> {{ dbinfo.keyspace_hits }}</li>
                    <li><strong>Pub/Sub Channels: </strong> {{ dbinfo.pubsub_channels }}</li>
                    <li><strong>Pub/Sub Patterns: </strong> {{ dbinfo.pubsub_patterns }}</li>
                    <li><strong>Total connections received: </strong> {{ dbinfo.total_connections_received }}</li>
                    <li><strong>Total commands received: </strong> {{ dbinfo.total_commands_processed }}</li>
                    <li><strong>Used cpu: </strong> 
                       sys:{{ dbinfo.used_cpu_sys }} user:{{ dbinfo.used_cpu_user }}</li>
                    <li><strong>Used memory: </strong> {{ dbinfo.used_memory_human }}</li>
                </ul>
            </td>
            <td class="dbextra">
                <div class="databases">
                    <ul>
                        {% for db, options in dbinfo.dbs.iteritems %}
                        <li id="db{{ db }}"><strong>DB{{ db }} → </strong>
                            <strong>Keys:</strong>{{ options.keys }} 
                            <strong>Expires:</strong>{{ options.expires }}
                        </li>
                        {% endfor %}
                    </ul>
                </div>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
