[% USE Number.Format(THOUSANDS_SEP = settings.thousands_separator) %]
    <div class="row">
    [% IF stats.day %]
      <div class="span5 offset1">
      <h4>Statistics for this installation</h4>
        <table class="table table-condensed">
          <thead>
            <tr>
              <th>[% stats.device_count | format_number %] devices
                  with [% stats.device_ip_count | format_number %] IPs
              </th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <th>[% stats.device_port_count | format_number %] interfaces
                  of which [% stats.device_port_up_count | format_number %] are up
              </th>
            </tr>
            [% IF stats.device_link_count %]
            <tr>
              <th>[% stats.device_link_count| format_number %] layer 2 links between devices</th>
            </tr>
            [% END %]
            <tr>
              <th>[% stats.node_table_count | format_number %] nodes logged, of which [% stats.node_active_count | format_number %] are active</th>
            </tr>
            <tr>
              <th>[% stats.phone_count | format_number %] phones, [% stats.wap_count | format_number %] wireless access points</th>
            </tr>
            <tr>
              <th>[% stats.ip_table_count | format_number %] IPs logged, of which [% stats.ip_active_count | format_number %] are active</th>
            </tr>
            <tr>
              <th>Statistics last generated on [% stats.day | html_entity %]</th>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="span4 offset1">
      <h4>Built using Open Source</h4>
        <table class="table table-condensed">
          <thead>
            <tr>
              <th>Software</th>
              <th>Version</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <th><b><a href="http://netdisco.org" target="_blank">App::Netdisco</a></b></th>
              <th>[% stats.netdisco_ver | html_entity %]</th>
            </tr>
            <tr>
              <th><a href="https://github.com/netdisco/snmp-info" target="_blank">SNMP::Info</a></th>
              <th>[% stats.snmpinfo_ver | html_entity %]</th>
            </tr>
            <tr>
              <th><a href="https://metacpan.org/module/netdisco-db-deploy" target="_blank">DB Schema</a></th>
              <th>[% stats.schema_ver | html_entity %]</th>
            </tr>
            <tr>
              <th><a href="http://www.postgresql.org" target="_blank">PostgreSQL</a></th>
              <th>[% '<span class="badge alert-danger">' IF stats.pg_ver.remove('\.\d+') < 9.6 %][% stats.pg_ver | html_entity %][% '</span>' IF stats.pg_ver.remove('\.\d+') < 9.6 %]</th>
            </tr>
            <tr>
              <th><a href="https://www.perl.org" target="_blank">Perl</a>
              <th>[% stats.perl_ver || 'n/a' | html_entity %]
            </tr>
            <tr>
              <th><a href="https://www.python.org" target="_blank">Python</a></th>
              <th>[% stats.python_ver || 'n/a' | html_entity %]</th>
            </tr>
          </tbody>
        </table>
      </div>
    [% ELSE %]
      <div class="span4 alert alert-info">Statistics will be available tomorrow.</div>
    [% END %]
    </div>