diff --git a/lang/de.json b/lang/de.json
index b71c2a9..63b6000 100644
--- a/lang/de.json
+++ b/lang/de.json
@@ -18,12 +18,7 @@
"Export": "Report exportieren",
"ScopeLabel": "Umfang",
"ShowAll": "Alle Findings",
- "ShowWarnings": "Nur Warnungen",
- "DetailLabel": "Details",
- "GroupedOnly": "Nur Gruppen",
- "WithRaw": "Mit Einzelfällen",
- "ShowRaw": "Einzelfälle anzeigen",
- "HideRaw": "Einzelfälle ausblenden"
+ "ShowWarnings": "Nur Warnungen"
},
"Progress": {
"Initialize": "Initialisiere Analyse",
@@ -64,8 +59,6 @@
"NoGrouped": "Keine gruppierten {scope}Findings vorhanden.",
"NoPrompt": "Die Analyse kann direkt aus dieser Ansicht gestartet werden.",
"Running": "Analyse läuft...",
- "NoRaw": "Keine {scope}Findings gefunden.",
- "RawEntries": "Einzelfälle",
"Samples": "Beispiele",
"UnanchoredPackageTargets": "Unverankerte Paketziele",
"UnanchoredPackageTargetsDesc": "Diese Ziele liegen in Modul- oder Systemordnern, werden aus Weltdaten referenziert, sind im Owner-Paket selbst aber derzeit nicht als Referenz sichtbar.",
diff --git a/lang/en.json b/lang/en.json
index aa1bb61..83e5285 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -18,12 +18,7 @@
"Export": "Export Report",
"ScopeLabel": "Scope",
"ShowAll": "All Findings",
- "ShowWarnings": "Warnings Only",
- "DetailLabel": "Details",
- "GroupedOnly": "Grouped Only",
- "WithRaw": "With Raw Entries",
- "ShowRaw": "Show Raw Entries",
- "HideRaw": "Hide Raw Entries"
+ "ShowWarnings": "Warnings Only"
},
"Progress": {
"Initialize": "Initializing analysis",
@@ -64,8 +59,6 @@
"NoGrouped": "No grouped {scope}findings available.",
"NoPrompt": "The analysis can be started directly from this view.",
"Running": "Analysis in progress...",
- "NoRaw": "No {scope}findings found.",
- "RawEntries": "Raw Entries",
"Samples": "Examples",
"UnanchoredPackageTargets": "Unanchored Package Targets",
"UnanchoredPackageTargetsDesc": "These targets live in module or system folders, are referenced from world data, but are currently not visibly referenced by their owning package.",
diff --git a/module.json b/module.json
index 7b97a84..d455ada 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.22",
+ "version": "0.0.23",
"compatibility": {
"minimum": "13",
"verified": "13"
diff --git a/scripts/apps/audit-report-app.js b/scripts/apps/audit-report-app.js
index f402eaa..9e751e8 100644
--- a/scripts/apps/audit-report-app.js
+++ b/scripts/apps/audit-report-app.js
@@ -6,7 +6,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
actions: {
runAnalysis: StorageAuditReportApp.#onRunAnalysis,
toggleShowAll: StorageAuditReportApp.#onToggleShowAll,
- toggleRaw: StorageAuditReportApp.#onToggleRaw,
exportReport: StorageAuditReportApp.#onExportReport
},
window: {
@@ -24,7 +23,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
#loading = false;
#showAll = false;
#progress = null;
- #showRaw = false;
constructor(options = {}) {
super(options);
@@ -39,11 +37,9 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
loading: this.#loading,
hasAnalysis: !!this.#analysis,
showAll: this.#showAll,
- showRaw: this.#showRaw,
progress: this.#progress,
summary: this.#summarize(this.#analysis),
- groupedFindings,
- findings: await enrichFindings(visibleFindings)
+ groupedFindings
};
}
@@ -90,35 +86,11 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
-
-
${localize("KSA.Action.DetailLabel")}
-
-
-
-
-
${renderProgress(context.progress, context.loading)}
${renderSummary(context.summary, context.loading)}
${renderGroupedFindingList(context.groupedFindings, context.hasAnalysis, context.loading, context.showAll)}
- ${renderFindingList(context.findings, context.hasAnalysis, context.loading, context.showAll, context.showRaw)}
`;
return container;
}
@@ -165,16 +137,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
return this.render({ force: true });
}
- toggleRaw() {
- this.#showRaw = !this.#showRaw;
- return this.render({ force: true });
- }
-
- setShowRaw(value) {
- this.#showRaw = !!value;
- return this.render({ force: true });
- }
-
exportReport() {
if (!this.#analysis) return;
const payload = {
@@ -245,17 +207,6 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
return this.toggleShowAll();
}
- static #onToggleRaw(_event, _button) {
- const mode = _button?.dataset?.mode;
- if (mode === "grouped") {
- return this.setShowRaw(false);
- }
- if (mode === "raw") {
- return this.setShowRaw(true);
- }
- return this.toggleRaw();
- }
-
static #onExportReport(_event, _button) {
return this.exportReport();
}
@@ -432,43 +383,6 @@ function renderGroupedSourcesCell(sources) {
return `${sources.map(source => `
${source.renderedSource ?? renderPlainSourceLabel(source)}
`).join("")}
`;
}
-function renderFindingList(findings, hasAnalysis, loading, showAll, showRaw) {
- if (loading) {
- return `${localize("KSA.Section.Running")}
`;
- }
- if (!hasAnalysis) {
- return `${localize("KSA.Section.NoPrompt")}
`;
- }
- if (!showRaw) {
- return "";
- }
- if (!findings.length) {
- return `${format("KSA.Section.NoRaw", { scope: localize(showAll ? "KSA.Scope.Empty" : "KSA.Scope.Warning") })}
`;
- }
-
- const items = findings.map(finding => `
-
-
- ${severityLabel(finding.severity)}
- ${humanizeKind(finding.kind)}
-
- ${escapeHtml(finding.reason)}
-
- - ${localize("KSA.Field.Target")}
${escapeHtml(finding.target.locator ?? `${finding.target.storage}:${finding.target.path}`)}
- ${finding.source ? `- ${localize("KSA.Field.Source")}
- ${finding.source.renderedSource ?? renderPlainSourceLabel(finding.source)}
` : ""}
-
- ${escapeHtml(finding.recommendation)}
-
- `).join("");
-
- return `
-
- ${localize("KSA.Section.RawEntries")}
- ${items}
-
- `;
-}
-
function groupFindings(findings) {
return {
brokenReferences: groupByTarget(findings.filter(f => f.kind === "broken-reference")),
@@ -645,24 +559,6 @@ async function enrichGroupedSources(groups) {
return enriched;
}
-async function enrichFindings(findings) {
- const enriched = [];
- for (const finding of findings) {
- if (!finding.source) {
- enriched.push(finding);
- continue;
- }
- enriched.push({
- ...finding,
- source: {
- ...finding.source,
- renderedSource: await renderSourceHtml(finding.source)
- }
- });
- }
- return enriched;
-}
-
async function renderSourceHtml(source) {
const markup = buildSourceMarkup(source);
if (!markup) return renderPlainSourceLabel(source);