{% extends "admin/base_site.html" %} {% load i18n %} {% block extrastyle %} {{ block.super }} {% endblock %} {% block content %}

{% trans "Run Command" %}

{% csrf_token %}
{{ form.command.label_tag }} {{ form.command }} {% if form.command.help_text %}

{{ form.command.help_text }}

{% endif %} {{ form.command.errors }}
{% if result %}
{% trans "Status" %} {% if result.success %}{% trans "Success" %}{% else %}{% trans "Failed" %}{% endif %}
{% trans "Runtime" %} {{ result.runtime }}
{% trans "Executed" %} {{ result.created_at|date:"SHORT_DATETIME_FORMAT" }}
{% trans "Run by" %} {{ result.user|default:_('System') }}
{% trans "Resolved command" %} {{ result.resolved_command }}
{% trans "Standard output" %}
{{ result.stdout|default:_('No output') }}
{% trans "Standard error" %}
{{ result.stderr|default:_('No errors reported') }}
{% if result.traceback %}
{% trans "Traceback" %}
{{ result.traceback }}
{% endif %}
{% endif %}

{% trans "Command History" %}

{% if page_obj.object_list %} {% for entry in page_obj.object_list %} {% endfor %}
{% trans "Command" %} {% trans "Ran" %} {% trans "Runtime" %} {% trans "Status" %} {% trans "View" %}
{{ entry.resolved_command }} {{ entry.created_at|date:"SHORT_DATETIME_FORMAT" }} {{ entry.runtime }} {% if entry.success %}✔{% else %}✖{% endif %} {% if entry.success %}{% trans "Success" %}{% else %}{% trans "Failed" %}{% endif %} {% trans "View" %}
{% else %}

{% trans "No commands have been run yet." %}

{% endif %}
{% endblock %}