<%~ include('./partials/head', { title: it.isNew ? 'New incident' : 'Edit incident' }) %> <%~ include('./partials/nav', { nav: 'incidents' }) %> <% const i = it.incident || {}; const allMonitors = it.allMonitors || []; const allPages = it.allPages || []; const attachedMonitors = new Set((it.incident?.monitor_ids || [])); const attachedPages = new Set((it.incident?.status_page_ids || [])); const updates = it.incident?.updates || []; %>
← Back to incidents

<%= it.isNew ? 'New incident' : 'Edit incident' %>

<% if (allMonitors.length === 0) { %>

No monitors yet.

<% } else { %>
<% allMonitors.forEach(function(m) { %> <% }) %>
<% } %>
<% if (allPages.length === 0) { %>

No status pages yet. Create one.

<% } else { %>
<% allPages.forEach(function(p) { %> <% }) %>
<% } %>
<% if (it.isNew) { %>

Markdown supported: **bold**, *italic*, `code`, [link](https://...)

<% } %>
<% if (!it.isNew && updates.length > 0) { %>

Timeline

<% updates.slice().reverse().forEach(function(u) { %>
<%= u.status %> ยท <%~ it.timeAgoSSR(u.created_at) %>
<%~ u.body_html %>
<% }) %>
<% } %> <% if (!it.isNew) { %>

Post update

<% } %>