{% import "macros.txt.j2" as macros %}
{% for result in results -%}
{% if result.message == ok %}
{{ result.message }}
{% else %}
{% call macros.header(loop) %}Query{% endcall -%}
Query: {{ result.query }}
Count of IPs Returned: {{ result.count }}
Scroll Token: {{ result.scroll }}
{% if result.count > 10 %}
{{ space }}
This output format is limited to 10 results, for all results use -f json for JSON output.
Additionally, use the stats command to pull just statistics for this query
{% endif %}
{%- if result.data %}
{%- for ip_context in result.data[:10] %}
{{ macros.result_header(loop) }}
{%- include "ip_context_result.txt.j2" %}
{%- endfor %}
{% else %}
No results found for this query.
{% endif %}
{% endif %}
{% endfor %}
