MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / renderHtml

Function renderHtml

apps/worker/src/boot-debug.ts:57–73  ·  view source on GitHub ↗
(jobs: { type: string; url: string }[], message?: string)

Source from the content-addressed store, hash-verified

55}
56
57function renderHtml(jobs: { type: string; url: string }[], message?: string) {
58 const links = jobs
59 .map((job) => `<li><a href="${job.url}">${escapeHtml(job.type)}</a></li>`)
60 .join('');
61 const note = message
62 ? `<pre>${escapeHtml(message)}</pre>`
63 : '<p>Click a job to run it now.</p>';
64 return `<!doctype html>
65<html lang="en">
66<head><meta charset="utf-8"><title>Debug cron</title></head>
67<body style="font-family: ui-monospace, monospace; max-width: 40rem; margin: 2rem auto;">
68<h1>Trigger a cron job</h1>
69${note}
70<ul>${links}</ul>
71</body>
72</html>`;
73}
74
75// Local-only debug routes to run a cron job on demand instead of waiting for
76// its schedule. Runs the job in this process through the same dispatcher the

Callers 1

bootDebugRoutesFunction · 0.85

Calls 3

escapeHtmlFunction · 0.85
joinMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected