${escapeHtml(incident.title)}
${escapeHtml(incident.impact)}${formatTimestamp(incident.started_at)}
`,
];
if (incident.message) {
- parts.push(`${escapeHtml(incident.message)}
`);
+ parts.push(`${escapeHtml(incident.message)}
`);
}
parts.push('');
return parts.join('');
@@ -194,13 +194,13 @@ function renderMaintenanceCard(
}
const parts: string[] = [
- `${escapeHtml(window.title)}
${formatTimestamp(window.starts_at)} - ${formatTimestamp(window.ends_at)}
`,
+ `${escapeHtml(window.title)}
${formatTimestamp(window.starts_at)} - ${formatTimestamp(window.ends_at)}
`,
];
if (affected.length > 0) {
- parts.push(`Affected: ${affected.join(', ')}
`);
+ parts.push(`Affected: ${affected.join(', ')}
`);
}
if (window.message) {
- parts.push(`${escapeHtml(window.message)}
`);
+ parts.push(`${escapeHtml(window.message)}
`);
}
parts.push('');
return parts.join('');
@@ -247,12 +247,12 @@ function renderPreload(
: 'Never checked';
monitorCardsParts.push(
- `${escapeHtml(monitor.name)}
${escapeHtml(monitor.type)}
${escapeHtml(uptimePct)}${statusLabel}
Availability (30d)
${buildUptimeStripSvg(monitor.uptime_day_strip)}
Recent checks
${buildHeartbeatStripSvg(monitor.heartbeat_strip)}
${lastCheckedLabel}
`,
+ `${escapeHtml(monitor.name)}
${escapeHtml(monitor.type)}
${escapeHtml(uptimePct)}${statusLabel}
Availability (30d)
${buildUptimeStripSvg(monitor.uptime_day_strip)}
Recent checks
${buildHeartbeatStripSvg(monitor.heartbeat_strip)}
${lastCheckedLabel}
`,
);
}
groupedMonitorsParts.push(
- `${escapeHtml(groupName)}
${groupMonitors.length}${monitorCardsParts.join('')}
`,
+ `${escapeHtml(groupName)}
${groupMonitors.length}${monitorCardsParts.join('')}
`,
);
}
@@ -274,7 +274,7 @@ function renderPreload(
}
}
- maintenanceSection = `Scheduled Maintenance
${activeCards.length > 0 ? `${activeCards.join('')}
` : ''}${upcomingCards.length > 0 ? `${upcomingCards.join('')}
` : ''}`;
+ maintenanceSection = `Scheduled Maintenance
${activeCards.length > 0 ? `${activeCards.join('')}
` : ''}${upcomingCards.length > 0 ? `${upcomingCards.join('')}
` : ''}`;
}
let incidentSection = '';
@@ -283,26 +283,26 @@ function renderPreload(
for (const incident of snapshot.active_incidents) {
incidentCards.push(renderIncidentCard(incident, formatTimestamp));
}
- incidentSection = `Active Incidents
${incidentCards.join('')}
`;
+ incidentSection = `Active Incidents
${incidentCards.join('')}
`;
}
const incidentHistory = snapshot.resolved_incident_preview
? renderIncidentCard(snapshot.resolved_incident_preview, formatTimestamp)
- : 'No past incidents
';
+ : `No past incidents
`;
const maintenanceHistory = snapshot.maintenance_history_preview
? monitorNames
? renderMaintenanceCard(snapshot.maintenance_history_preview, monitorNames, formatTimestamp)
- : 'No past maintenance
'
- : 'No past maintenance
';
+ : `No past maintenance
`
+ : `No past maintenance
`;
const descriptionHtml = siteDescription
- ? `${escapeHtml(siteDescription)}
`
+ ? `${escapeHtml(siteDescription)}
`
: '';
const hiddenMonitorMessage =
hiddenMonitorCount > 0
- ? `${hiddenMonitorCount} more services will appear after the app finishes loading.
`
+ ? `${hiddenMonitorCount} more services will appear after the app finishes loading.
`
: '';
- return `${escapeHtml(siteTitle)}
${descriptionHtml}
${escapeHtml(overall)}${escapeHtml(bannerTitle)}
Updated: ${formatTimestamp(generatedAt)}
${maintenanceSection}${incidentSection}Services
${groupedMonitorsParts.join('')}${hiddenMonitorMessage}Incident History
${incidentHistory}Maintenance History
${maintenanceHistory} `;
+ return `${escapeHtml(siteTitle)}
${descriptionHtml}
${escapeHtml(overall)}${escapeHtml(bannerTitle)}
Updated: ${formatTimestamp(generatedAt)}
${maintenanceSection}${incidentSection}Services
${groupedMonitorsParts.join('')}${hiddenMonitorMessage}Incident History
${incidentHistory}Maintenance History
${maintenanceHistory} `;
}
export function buildHomepageRenderArtifact(
@@ -337,7 +337,7 @@ export function buildHomepageRenderArtifact(
return {
generated_at: snapshot.generated_at,
- preload_html: `${renderPreload(bootstrapSnapshot, allMonitorNames)}
`,
+ preload_html: `${renderPreload(bootstrapSnapshot, allMonitorNames)}
`,
snapshot: bootstrapSnapshot,
meta_title: metaTitle,
meta_description: metaDescription,