{% extends "htmx/base.html" %} {% load argus_htmx %} {% block main %}
{% block incident_detail %}

{{ incident.pk }}: {{ incident.description }}

Level

{{ incident.level }}

Status

{% if incident.open %} Open {% else %} Closed {% endif %} {% if incident.acked %} Acknowledged {% else %} Unacknowledged {% endif %} {% if incident.ticket_url %} Ticket {{ incident.ticket_url }} {% else %} No ticket {% endif %}

Tags

{% for tag in incident.deprecated_tags %} {# djlint:off #} {{ tag.key }}{{ tag.TAG_DELIMITER }}{% if tag.value|is_valid_url %}{{ tag.value }}{% else %}{{ tag.value }}{% endif %} {# djlint:on #} {% endfor %}

Primary details (#{{ incident.pk }})

Description

{{ incident.description }}

{% if incident.stateful %}

Start time

{% if incident.open %}

End time

Current duration

{{ incident.start_time|timesince }}

{% else %}

End time

Total duration

{{ incident.start_time|timesince:incident.end_time }}

{% endif %} {% else %}

Timestamp

{% endif %}

Source

{{ incident.source.name }}

Incident id in {{ incident.source.name }}

{{ incident.source_incident_id|default:"—" }}

More details at

{% if incident.details_url %} {{ incident.pp_details_url }} {% else %} — {% endif %}

Ticket

{% if incident.ticket_url %} {{ incident.ticket_url }} {% else %} — {% endif %}
{% if incident.ticket_url %} {% include "htmx/incident/_incident_ticket_edit_modal.html" with action="update-ticket" dialog_id="edit-ticket-dialog" button_title="Edit ticket URL" header="Edit ticket" explanation="" cancel_text="Cancel" submit_text="Edit ticket" %} {% else %} {% include "htmx/incident/_incident_ticket_manual_create_modal.html" with action="add-ticket" dialog_id="manual-create-ticket-dialog" button_title="Add ticket URL" header="Manually add ticket URL" explanation="" cancel_text="Cancel" submit_text="Add ticket" %} {% if autocreate_ticket %} {% include "htmx/incident/_incident_ticket_autocreate_modal.html" with action="autocreate-ticket" dialog_id="auto-create-ticket-dialog" button_title="Create ticket" header="Automatically create ticket" explanation="Are you sure you want to automatically generate a ticket from this incident?" cancel_text="Cancel" submit_text="Create ticket" %} {% endif %} {% endif %}

Acknowledgements

{% include "htmx/incident/_incident_acknowledge_modal.html" with action="ack" dialog_id="create-acknowledgment-dialog" button_title="Create acknowledgment" header="Submit acknowledgment" explanation="Write a message describing why this incident was acknowledged" cancel_text="Cancel" submit_text="Submit" %}
{% for ack in incident.acks %}

{{ ack.event.description }}

{{ ack.event.actor }} @ {{ ack.event.timestamp|date:preferences.argus_htmx.datetime_format }}

{% if ack.expiration %}

Expires: {{ ack.expiration|date:preferences.argus_htmx.datetime_format }}

{% endif %}
{% if not forloop.last %}
{% endif %} {% endfor %}

Related events

{% if incident.stateful %} {% if incident.open %} {% include "htmx/incident/_incident_close_modal.html" with action="close" dialog_id="close-incident-dialog" button_title="Close incident" header="Manually close incident" explanation="Write a message describing why the incident was manually closed" cancel_text="Cancel" submit_text="Close now" %} {% else %} {% include "htmx/incident/_incident_reopen_modal.html" with action="reopen" dialog_id="reopen-incident-dialog" button_title="Reopen incident" header="Manually reopen incident" explanation="Write a message describing why the incident was manually reopend" cancel_text="Cancel" submit_text="Reopen now" %} {% endif %} {% endif %}
{% for event in incident.events.all %} {% if not event.ack %}

{{ event.get_type_display }}

{{ event.description }}

{{ event.actor }} @ {{ event.timestamp|date:preferences.argus_htmx.datetime_format }}

{% if not forloop.last %}
{% endif %} {% endif %} {% endfor %}
{% endblock incident_detail %}
{% endblock main %}