{% extends "base.html" %} {% block title %}{{ script.name }} - PyRunner{% endblock %} {% block content %}
{% include "cpanel/_sidebar.html" %}

{{ script.name }} {% if script.is_archived %} Archived {% elif script.is_enabled %} Enabled {% else %} Disabled {% endif %}

{% if script.description %}

{{ script.description }}

{% endif %} {% if script.tags.exists %}
{% for tag in script.tags.all %} {{ tag.name }} {% endfor %}
{% endif %}
{% if script.is_archived %}
{% csrf_token %}
{% csrf_token %}
{% else %}
{% csrf_token %}
Edit
{% csrf_token %}
{% csrf_token %}
{% endif %}
Python Code {{ script.code|length }} chars

Script Info

Timeout
{{ script.timeout_seconds }} seconds
Created
{{ script.created_at|date:"M d, Y H:i" }}
Updated
{{ script.updated_at|date:"M d, Y H:i" }}
{% if script.created_by %}
Created By
{{ script.created_by.email }}
{% endif %}
{% if script.is_archived %}
Archived
{{ script.archived_at|date:"M d, Y H:i" }}
{% if script.archived_by %}
Archived By
{{ script.archived_by.email }}
{% endif %}
{% endif %}

Statistics

{{ script.run_count }}
Total Runs
{% if script.run_count > 0 %}{{ script.success_rate|floatformat:0 }}%{% else %}-{% endif %}
Success Rate

Schedule

{% if schedule.run_mode != 'manual' %}
{% csrf_token %}
{% endif %}
Mode
{{ schedule.schedule_display }}
{% if schedule.next_run %}
Next Run
{{ schedule.next_run|date:"M d, Y H:i" }} UTC
{% endif %} {% if schedule.last_scheduled_run %}
Last Scheduled Run
{{ schedule.last_scheduled_run|date:"M d, Y H:i" }} UTC
{% endif %}

Webhook

{% if script.has_webhook %} Enabled {% else %} Disabled {% endif %}
{% if script.has_webhook %}
Webhook URL (sensitive)
Example curl
{% csrf_token %}
|
{% csrf_token %}
{% else %}

Enable webhooks to trigger this script via HTTP requests from external services.

{% csrf_token %}
{% endif %}

Notifications

{% if script.notify_on != 'never' %} {{ script.get_notify_on_display }} {% else %} Disabled {% endif %}
{% if script.notify_on != 'never' %}
Notify On
{{ script.get_notify_on_display }}
{% if script.notify_email %}
Email Override
{{ script.notify_email }}
{% else %}
Email
Using global default
{% endif %} {% if script.notify_webhook_enabled and script.notify_webhook_url %}
Webhook
{{ script.notify_webhook_url }}
{% endif %}
{% else %}

Notifications are disabled for this script. Edit settings

{% endif %}

Recent Runs

{% if recent_runs %}
{% for run in recent_runs %} {% endfor %}
Status Duration Triggered By Started
{% if run.status == 'success' %} Success {% elif run.status == 'failed' %} Failed {% elif run.status == 'timeout' %} Timeout {% elif run.status == 'running' %} Running {% elif run.status == 'pending' %} Pending {% elif run.status == 'cancelled' %} Cancelled {% endif %} {% if run.duration_display %}{{ run.duration_display }}{% else %}-{% endif %} {% if run.triggered_by %}{{ run.triggered_by.email }}{% else %}System{% endif %} {% if run.started_at %}{{ run.started_at|date:"M d, H:i" }}{% else %}{{ run.created_at|date:"M d, H:i" }}{% endif %} View
{% else %}

No runs yet. Click "Run" to execute this script.

{% endif %}
{% endblock %}