{% extends "base.html" %} {% block content %}
{% if surface == "profile_team" or surface == "profile_team_repo" %} {% with profile_nav_active="teams" %} {% include "partials/profile_sidebar.html" %} {% endwith %} {% elif surface == "profile_personal_repo" %} {% with profile_nav_active="repos" %} {% include "partials/profile_sidebar.html" %} {% endwith %} {% elif surface == "staff_team" %} {% with staff_nav_active="teams" %} {% include "partials/staff_sidebar.html" %} {% endwith %} {% else %} {% with staff_nav_active="repos" %} {% include "partials/staff_sidebar.html" %} {% endwith %} {% endif %}
{% include "partials/breadcrumbs.html" %} {% if surface == "profile_team" %} {% with profile_team_tabs_active="timers", can_manage_timers=true %} {% include "profile/team_tabs.html" %} {% endwith %} {% elif surface == "profile_personal_repo" %} {% with profile_repo_subnav_active="timers" %} {% include "profile/personal_repo_subnav.html" %} {% endwith %} {% elif surface == "profile_team_repo" %} {% with profile_repo_subnav_active="timers" %} {% include "profile/team_repo_subnav.html" %} {% endwith %} {% elif surface == "staff_team" %} {% with team_tabs_base="/staff/teams/" ~ team.uuid, team_tabs_active="timers" %} {% include "partials/team_tabs.html" %} {% endwith %} {% elif surface == "staff_repo" %} {% with staff_repo_subnav_active="timers" %} {% include "staff/repo_subnav.html" %} {% endwith %} {% endif %} {% if notice %}
{{ notice }}
{% endif %} {% if error %}
{{ error }}
{% endif %} {% if mode == "list" %}

{{ scope_title }}

Events scheduled for this scope.

{% if can_manage %}Create timer{% endif %}
{% if page.results | length == 0 %}

No timers yet. A timer emits an event carrying its message, either once or on a repeat.

{% else %}
{% if can_manage %}{% endif %} {% for timer in page.results %} {% if can_manage %} {% endif %} {% endfor %}
Message Schedule Status Next Run RunsActions
{{ timer.message }} {{ timer.schedule }} {% if timer.status == "active" %} Active {% elif timer.status == "paused" %} Paused {% elif timer.status == "completed" %} Completed {% else %} Cancelled {% endif %} {% if timer.next_run_at %} {{ timer.next_run_at }} {% else %} {% endif %} {{ timer.run_count }}
Edit
{% endif %}
{% with page=page, query=query, per_page_id="timers-per-page", per_page_form="timer-filters" %} {% include "partials/paging_footer.html" %} {% endwith %}
{% if can_manage %} {% with modal_id="confirm-delete-timer", modal_title="Delete timer", modal_body='Delete ?', modal_confirm_text="Delete timer", modal_desc="This timer will be removed and will not fire again." %} {% include "partials/confirm_modal.html" %} {% endwith %} {% endif %} {% else %}

{% if mode == "new" %}Create timer{% else %}Edit timer{% endif %}

Emit a scoped event once or on a repeating schedule.

Back to timers
{% with is_new=mode == "new" %} {% include "partials/timer_form_fields.html" %} {% endwith %}
Cancel
{% if mode == "edit" and timer %}
Current Schedule

{{ timer.schedule }}

Next run
{% if timer.next_run_at %}{{ timer.next_run_at }}{% else %}—{% endif %}
Last run
{% if timer.last_run_at %}{{ timer.last_run_at }}{% else %}—{% endif %}
Times fired
{{ timer.run_count }}
{% endif %}
{% endif %}
{% endblock %}