MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / shutdownSystem

Function shutdownSystem

web/scripts/ragnar_modern.js:7977–8003  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7975 }
7976 if ((d.prefixes || []).length) {
7977 html += '<p class="text-xs uppercase text-gray-400 mt-2 mb-1">Advertised prefixes (' + d.prefixes.length + ')</p>' +
7978 '<table class="min-w-full text-xs text-gray-300 whitespace-nowrap"><thead>' +
7979 '<tr class="text-left text-gray-500"><th class="px-2 py-1">Prefix</th><th class="px-2 py-1">Originator</th><th class="px-2 py-1">Metric</th><th class="px-2 py-1">Status</th></tr>' +
7980 '</thead><tbody>' +
7981 d.prefixes.map(p => {
7982 const bad = (p.status === 'new' || p.status === 're-homed');
7983 const st = bad ? `<span class="text-red-300">${escapeHtml(p.status)}</span>` : `<span class="text-gray-500">${escapeHtml(p.status)}</span>`;
7984 return `<tr class="border-t border-slate-800">
7985 <td class="px-2 py-1 font-mono ${bad ? 'text-red-300' : ''}">${escapeHtml(p.pfx)}</td>
7986 <td class="px-2 py-1 text-gray-400">${escapeHtml(p.origin_name || p.origin)}</td>
7987 <td class="px-2 py-1 font-mono">${p.metric == null ? '—' : p.metric}</td>
7988 <td class="px-2 py-1">${st}</td>
7989 </tr>`;
7990 }).join('') +
7991 '</tbody></table>';
7992 }
7993 if (d.reasons && d.reasons.length) {
7994 html += '<ul class="text-xs text-gray-400 mt-2 list-disc pl-5">' +
7995 d.reasons.map(r => '<li>' + escapeHtml(r) + '</li>').join('') + '</ul>';
7996 }
7997 (d.advisories || []).forEach(a => {
7998 html += `<div class="mt-2 px-3 py-2 rounded border text-xs text-gray-400 border-slate-700 bg-slate-900/40">${escapeHtml(a)}</div>`;
7999 });
8000 out.innerHTML = html;
8001 } catch (e) {
8002 out.innerHTML = '<p class="text-sm text-red-400">Failed: ' + escapeHtml(e.message) + '</p>';
8003 } finally {
8004 _ndBusy(btn, false);
8005 }
8006}

Callers

nothing calls this directly

Calls 5

errorMethod · 0.80
addConsoleMessageFunction · 0.70
updateElementFunction · 0.70
postAPIFunction · 0.70
updateConnectionStatusFunction · 0.70

Tested by

no test coverage detected