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

Function complianceStatCard

web/scripts/ragnar_modern.js:10533–10538  ·  view source on GitHub ↗
(value, label, color)

Source from the content-addressed store, hash-verified

10531 _ndBusy(btn, true, 'Snooping…');
10532 out.classList.remove('hidden');
10533 out.innerHTML = `<p class="text-sm text-gray-400">Passively snooping DHCP on the wire for ${secs}s…</p>`;
10534 try {
10535 const d = await fetchAPI('/api/net/dhcp-snoop?seconds=' + secs);
10536 if (!d || d.success === false) {
10537 const hint = d && d.need_config ? ' — set the trusted/untrusted ports first' : '';
10538 out.innerHTML = '<p class="text-sm text-red-400">Error: ' + escapeHtml((d && d.error) || 'failed') + escapeHtml(hint) + '</p>';
10539 return;
10540 }
10541 const [cls, label] = _SNOOP_VERDICT_STYLE[d.verdict] || _SNOOP_VERDICT_STYLE.unknown;

Callers 2

renderComplianceCISFunction · 0.70
renderCompliancePCIFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected