diff --git a/frontend/index.html b/frontend/index.html index fd4f855..15f65f1 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1949,6 +1949,9 @@ async function loadMitre() { const borderColor = t.rule_count >= 20 ? 'border-l-purple-500' : t.rule_count >= 5 ? 'border-l-blue-500' : 'border-l-slate-600' const badgeColor = t.rule_count >= 20 ? 'bg-purple-900/60 text-purple-300 border-purple-700' : t.rule_count >= 5 ? 'bg-blue-900/60 text-blue-300 border-blue-700' : 'bg-slate-800/60 text-slate-400 border-slate-700' + const bodyId = 'mitre-body-' + t.tactic.replace(/[^a-z0-9]/gi, '_') + const chevId = 'mitre-chev-' + t.tactic.replace(/[^a-z0-9]/gi, '_') + const MAX_SHOWN = 12 const chips = t.techniques.slice(0, MAX_SHOWN).map(tech => `${esc(tech.id || tech.name)}` @@ -1963,14 +1966,25 @@ async function loadMitre() { ` : '' - return `
No technique IDs mapped
`} + const techCount = t.techniques.length + const bodyContent = techCount > 0 + ? `No technique IDs mapped
` + + return `