{# Windows Task Scheduler Management Page #} {% extends "base.html" %} {# --- Page Title Block --- #} {% block title %}{{ super() }} - Task Scheduler: {{ server_name }}{% endblock %} {# --- Head Scripts Block --- #} {% block head_scripts %} {# Define page-specific JS variables within a namespace #} {# Core utilities (showStatusMessage, sendServerActionRequest) #} {# JS specific to Windows task scheduling UI interactions and API calls #} {% endblock %} {# --- Main Content Block --- #} {% block content %} {# Main heading for the page #}

Windows Task Scheduler

{# Server context #}

Server: {{ server_name }}

{# --- Status Message Area --- #} {# Targeted by JavaScript (showStatusMessage) #}
{# Server-side flash messages (handled by base.html) #} {# --- Section to Display Existing Tasks --- #}
{# Use list-section for consistency #}

Current Scheduled Tasks

List of scheduled tasks associated with this server found in the configuration.

{# Container for the task list table #}
{# Check if tasks data (list of dicts) was passed from the route #} {% if tasks %} {# Responsive wrapper for the table #}
{# Use standard table style #} {# Fixed width #} {# Loop through tasks passed from the route #} {% for task in tasks %} {% endfor %}
Task Name Command Schedule Actions
{{ task.task_name }} {{ task.command }} {{ task.schedule }}
{# Wrapper for buttons #} {# Modify Button: Calls JS to populate form #} Modify {# Delete Button: Calls JS with confirmation #} Delete
{# --- End .table-responsive-wrapper --- #} {% else %} {# Message displayed if no tasks are found #}

{# Use consistent class #} No scheduled tasks found associated with server '{{ server_name }}'.

{% endif %}
{# --- End #task-list-container --- #} {# Actions related to the list view #}
{# Consistent actions wrapper #} {# Button calls JS function to prepare and show the Add form #} « Back to Dashboard
{# --- End .windows-tasks-section --- #} {# --- Section for Add/Modify Form (Initially Hidden) --- #} {# --- End .add-modify-task-section --- #} {% endblock %}