{%- macro render_result_reputation(nerd_result) %}
                    <table class="table table-sm">
                        <tbody>
            {%- if 'rep' in nerd_result and nerd_result['rep'] %}
                            <tr>
                                <th>{{ _('Reputation') }}:</th>
                                <td>{{ '{:.3f}'.format(nerd_result['rep']) }}</td>
                            </tr>
            {%- endif %}
            {%- if 'fmp' in nerd_result and nerd_result['fmp'] and 'general' in nerd_result['fmp'] and nerd_result['fmp']['general'] %}
                            <tr>
                                <th>{{ _('FMP score') }}:</th>
                                <td>{{ '{:.3f}'.format(nerd_result['fmp']['general']) }}</td>
                            </tr>
            {%- endif %}
            {%- if 'hostname' in nerd_result and nerd_result['hostname'] %}
                            <tr>
                                <th>{{ _('Hostname') }}:</th>
                                <td>{{ nerd_result['hostname'] }}</td>
                            </tr>
            {%- endif %}
            {%- if 'asn' in nerd_result and nerd_result['asn'] %}
                            <tr>
                                <th>{{ _('AS number') }}:</th>
                                <td>{{ nerd_result['asn'] | join(', ') }}</td>
                            </tr>
            {%- endif %}
            {%- if 'geo' in nerd_result and nerd_result['geo'] and 'ctry' in nerd_result['geo'] and nerd_result['geo']['ctry'] %}
                            <tr>
                                <th>{{ _('Country') }}:</th>
                                <td>{{ nerd_result['geo']['ctry'] | upper }} {{ get_country_flag(nerd_result['geo']['ctry']) }}</td>
                            </tr>
            {%- endif %}
            {%- if 'bgppref' in nerd_result and nerd_result['bgppref'] %}
                            <tr>
                                <th>{{ _('BGP prefix') }}:</th>
                                <td>{{ nerd_result['bgppref'] }}</td>
                            </tr>
            {%- endif %}
            {%- if 'ipblock' in nerd_result and nerd_result['ipblock'] %}
                            <tr>
                                <th>{{ _('IP block') }}:</th>
                                <td>{{ nerd_result['ipblock'] }}</td>
                            </tr>
            {%- endif %}
            {%- if 'bl' in nerd_result and nerd_result['bl'] %}
                            <tr>
                                <th>{{ _('Blacklists') }}:</th>
                                <td>{% for bl in nerd_result['bl'] %}
                                    <span class="badge text-bg-secondary">{{ bl }}</span>
                                    {% endfor %}
                                </td>
                            </tr>
            {%- endif %}
            {%- if 'tags' in nerd_result and nerd_result['tags'] %}
                            <tr>
                                <th>{{ _('Tags') }}:</th>
                                <td>{% for tag in nerd_result['tags'] %}
                                    <span class="badge text-bg-secondary">{{ tag['n'] }} ({{ tag['c'] }}x)</span>
                                    {% endfor %}
                                </td>
                            </tr>
            {%- endif %}
                        </tbody>
                    </table>
{%- endmacro %}

{%- macro get_title() -%}
    {{ get_icon('module-nerd') }} {{ _('Network Entity Reputation Database') }}
{%- endmacro %}
