{% if analysis.buffer|length %}
    {% for file in analysis.buffer %}
        <div class="panel panel-default">
            <table class="table table-striped table-condensed">
                <tr>
                    <th class="col-md-1 text-right">Name</th>
                    <td><b>{{file.name}}</b></td>
                </tr>
                <tr>
                    <th class="text-right">Size</th>
                    <td>{{ file.size | sizeof_fmt }}</td>
                </tr>
                <tr>
                    <th class="text-right">Type</th>
                    <td>{{file.type}}</td>
                </tr>
                <tr>
                    <th class="text-right">MD5</th>
                    <td class="break-everwhere"><tt>{{file.md5}}</tt></td>
                </tr>
                <tr>
                    <th class="text-right">SHA1</th>
                    <td class="break-everwhere"><tt>{{file.sha1}}</tt></td>
                </tr>
                <tr>
                    <th class="text-right">SHA256</th>
                    <td class="break-everwhere"><tt>{{file.sha256}}</tt></td>
                </tr>
                <tr>
                    <th class="text-right">CRC32</th>
                    <td class="break-everwhere"><tt>{{file.crc32}}</tt></td>
                </tr>
                <tr>
                    <th class="text-right">ssdeep</th>
                    <td class="break-everwhere"><tt>{{file.ssdeep}}</tt></td>
                </tr>
                <tr>
                    <th class="text-right">Yara</th>
                    <td>
                    {% if file.yara %}
                        <ul style="margin-bottom: 0;">
                        {% for sign in file.yara %}
                            <li>{{sign.name}} - {{sign.meta.description}}</li>
                        {% endfor %}
                        </ul>
                    {% else %}
                        None matched
                    {% endif %}
                    </td>
                </tr>
                <tr>
                    <th class="text-right">VirusTotal</th>
                    <td><a href="https://www.virustotal.com/en/file/{{file.sha256}}/analysis/">Search for analysis</a></td>
                </tr>
                {% if file.object_id %}
                    <tr>
                        <th class="text-right"></th>
                        <td><a href="{% url "analysis.views.file" "buffer" file.object_id %}" class="btn btn-primary btn-small">Download</a></td>
                    </tr>
                {% endif %}
            </table>
        </div>
    {% endfor %}
{% else %}
    <div class="alert alert-info"><b>Sorry!</b> No dropped buffers.</div>
{% endif %}
