diff --git a/module.json b/module.json index fa732aa..7b97a84 100644 --- a/module.json +++ b/module.json @@ -2,7 +2,7 @@ "id": "kosmos-storage-audit", "title": "Kosmos Storage Audit", "description": "Analyzes media references and risky storage locations across Foundry data and public roots.", - "version": "0.0.21", + "version": "0.0.22", "compatibility": { "minimum": "13", "verified": "13" diff --git a/scripts/apps/audit-report-app.js b/scripts/apps/audit-report-app.js index 355ed1c..f402eaa 100644 --- a/scripts/apps/audit-report-app.js +++ b/scripts/apps/audit-report-app.js @@ -394,22 +394,18 @@ function renderGroupedTable(groups, { includeOwner=false, includeReason=false, i `${localize("KSA.Table.References")}` ]; if (includeOwner) headers.push(`${localize("KSA.Field.OwnerPackage")}`); - if (includeReason) headers.push(`${localize("KSA.Table.Note")}`); if (includeSources) headers.push(`${localize("KSA.Field.Source")}`); const rows = groups.map(group => { + const note = includeReason + ? buildGroupedTooltip(group) + : ""; const cells = [ - `${severityLabel(group.severity)}`, + `${severityLabel(group.severity)}`, `${escapeHtml(group.target)}`, `${group.count ?? ""}` ]; if (includeOwner) cells.push(`${escapeHtml(group.ownerLabel ?? "")}`); - if (includeReason) { - const note = group.targetKind === "wildcard" - ? `${group.shortReason ?? group.reason ?? ""} ${localize("KSA.Finding.WildcardNoMatch")}` - : (group.shortReason ?? group.reason ?? ""); - cells.push(`${escapeHtml(note.trim())}`); - } if (includeSources) { cells.push(`${renderGroupedSourcesCell(group.sources ?? [])}`); } @@ -424,6 +420,13 @@ function renderGroupedTable(groups, { includeOwner=false, includeReason=false, i `; } +function buildGroupedTooltip(group) { + const note = group.targetKind === "wildcard" + ? `${group.shortReason ?? group.reason ?? ""} ${localize("KSA.Finding.WildcardNoMatch")}` + : (group.shortReason ?? group.reason ?? ""); + return note.trim(); +} + function renderGroupedSourcesCell(sources) { if (!sources.length) return ""; return `
${sources.map(source => `
${source.renderedSource ?? renderPlainSourceLabel(source)}
`).join("")}
`; diff --git a/styles/audit.css b/styles/audit.css index 8ccab1e..97bcc84 100644 --- a/styles/audit.css +++ b/styles/audit.css @@ -290,6 +290,10 @@ min-width: 0; } +.storage-audit__severity--hint { + cursor: help; +} + .severity-high .storage-audit__severity { background: color-mix(in srgb, #b03e29 80%, transparent); color: white;