{% comment %} HTMX partial template for command output results {% endcomment %} {% if command_output or has_syntax_error %} {% if execution_success and not has_syntax_error %}
Raw command output
{{ command_output }}
{% if parsed_data %}
Structured data {% if parsing_method %}(via {{ parsing_method }}){% endif %}
{% if command_log_id %} Download CSV {% else %} CSV Unavailable {% endif %}
{% if parsed_data|length > 0 and parsed_data.0.keys %}
{% for header in parsed_data.0.keys %} {% endfor %} {% for row in parsed_data %} {% for value in row.values %} {% endfor %} {% endfor %}
{{ header }}
{{ value }}
{% else %}
{{ parsed_data|safe }}
{% endif %}
{% endif %}
{% else %}
{% if has_syntax_error %} {% if syntax_error_type == "empty_result" %} Empty Result Output {% else %} Syntax Error Output {% endif %} {% else %} Error Output {% endif %}
{{ command_output|default:"No output received from device" }}
{% endif %} {% else %}

No command output yet

Execute a command to see results here
{% endif %}