{% extends "admin/base.html" %}

{% block extrahead %}
{{ block.super }}

<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@{{ bootstrap_version }}/dist/js/bootstrap.bundle.min.js" integrity="{{ bootstrap_version_integrity }}" crossorigin="anonymous"></script>

{{ cached_task_events|json_script:"cached_alerts" }}
{{ websocket_port|json_script:"socket_port" }}
{{ websocket_uri|json_script:"socket_uri" }}

{% load static %}
<script src="{% static 'js/task_alerts.js' %}"></script>
{% endblock %}

{% block messages %}
{{ block.super }}
{% if request.user.is_authenticated %}
    {% include "task_alerts.html" %}
    <script>
        var websocket = websocket || newChannelTasksWebSocket();
    </script>
{% endif %}
{% endblock %}
