{% extends 'dcim/device.html' %} {% load helpers %} {% load static %} {% block style %} {% endblock %} {% block content %}

Connection Info

Hostname / IP
{% if connection_info.hostname %} {{ connection_info.hostname }} {% else %} Missing {% endif %}
Platform
{% if connection_info.platform %} {{ connection_info.platform }} {% else %} Missing {% endif %}
Connection
{% if device_valid %} Ready {% else %} Not Ready {% endif %}
{% if device_valid %} Device is ready for command execution. {% else %} {{ validation_message }} {% endif %}
{% if rate_limit_status.enabled %}

Rate Limiting

{% if rate_limit_status.bypassed %}
Rate Limiting Bypassed
You have unlimited command execution privileges.
{% else %}
Commands Remaining
{{ rate_limit_status.remaining }}
Successful Commands Used
{{ rate_limit_status.current_count }} / {{ rate_limit_status.limit }}
Time Window
{{ rate_limit_status.time_window_minutes }} minutes
{{ rate_limit_status.message }}
{% if rate_limit_status.is_exceeded %}
Rate Limit Exceeded
Command execution is blocked. Wait for the time window to reset or contact an administrator.
{% elif rate_limit_status.is_warning %}
Rate Limit Warning
You are approaching the command execution limit. Commands will be blocked if the limit is exceeded.
{% endif %} {% endif %}
{% endif %}

Available Commands

{% if command_count is not None and total_command_count != command_count %}
Showing {{ command_count }} of {{ total_command_count }} based on your permissions
{% endif %}
{% if commands %}
{% for command in commands %}
{% if command.command_type == 'config' %} {% endif %} {{ command.name }}
{% endfor %}
{% else %}
{% if object.platform %} {% if not user.is_authenticated %} You must be logged in to see commands. {% else %} No commands available for platform "{{ object.platform }}" with your current permissions. {% endif %} {% else %} No platform assigned to this device. {% endif %} {% if perms.netbox_toolkit_plugin.add_command %} Add a command {% endif %}
{% endif %}

Recent History

Last 3
{% if object.command_logs.all %}
{% for log in object.command_logs.all|dictsortreversed:"execution_time"|slice:":3" %}
{{ log.command|truncatechars:40 }}
{{ log.username }} {{ log.execution_time|timesince }} ago
{% endfor %}
{% else %}
No history available
{% endif %}

Command Output

{% if executed_command %} {% endif %}
{% if command_output %} {% if execution_success %}
Command executed successfully {% if execution_time %}
Execution time: {{ execution_time|floatformat:3 }}s {% endif %}
Command Output
{{ command_output }}
{% if parsed_data %}
Structured Data
{% if parsing_template %} Template: {{ parsing_template }} {% endif %}
{% if parsed_data|length > 0 %} {{ parsed_data|json_script:"parsed-data-json" }}
{% endif %}
{% if parsed_data|length > 0 %} {% if parsed_data.0 %}
{% for key in parsed_data.0.keys %} {% endfor %} {% for row in parsed_data %} {% for value in row.values %} {% endfor %} {% endfor %}
{{ key|title }}
{{ value }}
{% else %}
{{ parsed_data|pprint }}
{% endif %} {% else %}
No structured data found in the output.
{% endif %}
{% endif %}
{% elif has_syntax_error %}
Syntax Error Details and Guidance
{{ command_output }}
{% else %}
Error Details and Troubleshooting
{{ command_output }}
{% endif %} {% else %}
Select a command to execute from the list on the left.
{% endif %}
{% endblock %} {% block javascript %} {% endblock %}