{% extends 'generic/object.html' %} {% load helpers %} {% load static %} {% block style %} {% endblock %} {% block content %}

Command Log

{% if object.execution_duration %} {% endif %} {% if object.parsing_success %} {% elif object.parsed_data is not None %} {% endif %} {% if not object.success and object.error_message %} {% endif %}
Command {{ object.command|linkify }}
Device {{ object.device|linkify }}
Username {{ object.username }}
Execution Time {{ object.execution_time }}
Status {% if object.success %} Success {% else %} Failed {% endif %}
Duration {{ object.execution_duration|floatformat:3 }}s
Parsing Status Successfully Parsed {% if object.parsing_template %}
Template: {{ object.parsing_template }} {% endif %}
Parsing Status Parsing Attempted
Error {{ object.error_message }}

Command Output

{{ object.output }}
{% if object.parsed_data %}

Parsed Data

{% if object.parsing_template %}
Template: {{ object.parsing_template }}
{% endif %}
{% if object.parsed_data|length > 0 %} {% if object.parsed_data.0 %}
{% for key in object.parsed_data.0.keys %} {% endfor %} {% for row in object.parsed_data %} {% for value in row.values %} {% endfor %} {% endfor %}
{{ key|title }}
{{ value }}
{% else %}
{{ object.parsed_data|pprint }}
{% endif %} {% else %}
No structured data found in the output.
{% endif %} {% if object.parsed_data|length > 0 %} {{ object.parsed_data|json_script:"commandlog-parsed-data-json" }}
{% endif %}
{% endif %} {% endblock %} {% block javascript %} {% endblock %}