Handle references into inactive modules
This commit is contained in:
@@ -38,6 +38,7 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
|
||||
hasAnalysis: !!this.#analysis,
|
||||
showAll: this.#showAll,
|
||||
progress: this.#progress,
|
||||
notices: this.#analysis?.notices ?? [],
|
||||
summary: this.#summarize(this.#analysis),
|
||||
groupedFindings
|
||||
};
|
||||
@@ -89,6 +90,7 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
|
||||
</div>
|
||||
</section>
|
||||
${renderProgress(context.progress, context.loading)}
|
||||
${renderNotices(context.notices, context.loading)}
|
||||
${renderSummary(context.summary, context.loading)}
|
||||
${renderGroupedFindingList(context.groupedFindings, context.hasAnalysis, context.loading, context.showAll)}
|
||||
`;
|
||||
@@ -141,6 +143,7 @@ export class StorageAuditReportApp extends foundry.applications.api.ApplicationV
|
||||
if (!this.#analysis) return;
|
||||
const payload = {
|
||||
exportedAt: new Date().toISOString(),
|
||||
notices: this.#analysis.notices ?? [],
|
||||
summary: this.#summarize(this.#analysis),
|
||||
groupedFindings: groupFindings(this.#analysis.findings),
|
||||
findings: this.#analysis.findings.map(serializeFinding)
|
||||
@@ -232,6 +235,17 @@ function renderProgress(progress, loading) {
|
||||
`;
|
||||
}
|
||||
|
||||
function renderNotices(notices, loading) {
|
||||
if (loading || !notices?.length) return "";
|
||||
const items = notices.map(notice => `<li>${escapeHtml(notice.message ?? "")}</li>`).join("");
|
||||
return `
|
||||
<section class="storage-audit__summary storage-audit__summary--notices">
|
||||
<h3>${localize("KSA.Notice.Title")}</h3>
|
||||
<ul class="storage-audit__notice-list">${items}</ul>
|
||||
</section>
|
||||
`;
|
||||
}
|
||||
|
||||
function renderSummary(summary, loading) {
|
||||
if (loading) return "";
|
||||
if (!summary) {
|
||||
|
||||
Reference in New Issue
Block a user