diff --git a/apps/status/src/views/page.ejs b/apps/status/src/views/page.ejs
index 3317b1e..5dde360 100644
--- a/apps/status/src/views/page.ejs
+++ b/apps/status/src/views/page.ejs
@@ -185,42 +185,31 @@
<%= overallText %>
- <%
- // Shared timeline render — used for both active (top of page) and past
- // (bottom) incidents. Standard status-page pattern: every update from
- // every status the incident has been in, newest first.
- function renderIncident(i) {
- const klass = i.resolved_at ? `incident ${i.severity} resolved` : `incident ${i.severity}`;
- const startedFmt = fmtTimestamp(i.started_at);
- const resolvedFmt = i.resolved_at ? fmtTimestamp(i.resolved_at) : null;
- let html = `
`;
- html += `
${escapeHtmlSSR(i.title)}
`;
- html += `
${i.status}`;
- html += `Started ${startedFmt}`;
- if (resolvedFmt) html += ` · Resolved ${resolvedFmt}`;
- html += `
`;
- if (i.updates && i.updates.length > 0) {
- html += `
`;
- for (const u of i.updates) {
- html += `
`;
- html += `
${u.status}${fmtTimestamp(u.created_at)}
`;
- html += `
${u.body_html}
`;
- html += `
`;
- }
- html += `
`;
- }
- html += `
`;
- return html;
- }
- // Eta doesn't have a built-in HTML escape helper exposed at template
- // scope, so define a tiny one inline. Only used for incident titles.
- function escapeHtmlSSR(s) {
- return String(s).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, ''');
- }
- %>
<% if (incidents.active.length > 0) { %>
- <% incidents.active.forEach(function(i) { %><%~ renderIncident(i) %><% }); %>
+ <% incidents.active.forEach(function(i) { %>
+
+
<%= i.title %>
+
+ <%= i.status %>
+ Started <%= fmtTimestamp(i.started_at) %>
+ <% if (i.resolved_at) { %> · Resolved <%= fmtTimestamp(i.resolved_at) %><% } %>
+
+ <% if (i.updates && i.updates.length > 0) { %>
+
+ <% i.updates.forEach(function(u) { %>
+
+
+ <%= u.status %>
+ <%= fmtTimestamp(u.created_at) %>
+
+
<%~ u.body_html %>
+
+ <% }); %>
+
+ <% } %>
+
+ <% }); %>
<% } %>
@@ -311,7 +300,29 @@
<% if (incidents.recent.length > 0) { %>
Past incidents
- <% incidents.recent.forEach(function(i) { %><%~ renderIncident(i) %><% }); %>
+ <% incidents.recent.forEach(function(i) { %>
+
+
<%= i.title %>
+
+ <%= i.status %>
+ Started <%= fmtTimestamp(i.started_at) %>
+ <% if (i.resolved_at) { %> · Resolved <%= fmtTimestamp(i.resolved_at) %><% } %>
+
+ <% if (i.updates && i.updates.length > 0) { %>
+
+ <% i.updates.forEach(function(u) { %>
+
+
+ <%= u.status %>
+ <%= fmtTimestamp(u.created_at) %>
+
+
<%~ u.body_html %>
+
+ <% }); %>
+
+ <% } %>
+
+ <% }); %>
<% } %>