Files
wekan/client/components/settings/problemsSummary.jade
T
Lauri Ojansivu d9cf523f9e Admin Panel / Problems: Data health, a nightly scan of broken references, with repairs.
The scan counts what points at nothing: cards on a missing or another board's
list or swimlane, ghost and duplicate board members, boards with no active
admin, custom field values and boards that no longer exist, checklist items
without a checklist, and subtasks or linked cards whose card is gone. It runs
nightly when the CPU is low, claimed so that only one pod scans or repairs.

A repair that only moves data reuses the upgrade steps; one that deletes asks
twice, and the server refuses it without that confirmation. Every repair edits
with $pull or a guarded update, so a concurrent edit is not overwritten, and a
member dedupe keeps the admin entry. Legacy scalar boardId and string boardIds
of custom fields are understood.

Translations done with low confidence: ay, csb, lld, kok, wa-RR, ve-CC, bi, tpi.

Thanks to Raymond-Voogt and xet7 !

Fixes #6818.
2026-10-27 17:08:15 +02:00

105 lines
4.7 KiB
Plaintext

template(name="problemsSummary")
.global-search-results-list-wrapper
h1 {{_ 'summary'}}
//- Status overview: migrations / repairs in progress + detected problems.
//- Same data as `snap run wekan.problems`.
if statusOverview
h2 {{_ 'problems-status-title'}}
if statusOverview.anyInProgress
p {{_ 'problems-in-progress-help'}}
.admin-problem-banner
each item in inProgress
.admin-problem-item
i.fa.fa-spinner.fa-spin
span.admin-problem-path {{item.message}}
else
p {{_ 'problems-none-in-progress'}}
if statusOverview.anyProblems
.admin-problem-banner
each problem in statusProblems
.admin-problem-item
i.fa.fa-exclamation-triangle
span.admin-problem-path {{problem.title}}
if problem.count
span.admin-problem-count {{problem.count}}
br
span.quiet {{problem.detail}}
//- Broken cards are one of the two detected problems the admin can
//- fix from here: run the repair migration over every board.
if isBrokenCards problem
.admin-problem-actions
button.js-repair-broken-cards.primary(disabled="{{#if repairRunning}}disabled{{/if}}")
if repairRunning
i.fa.fa-spinner.fa-spin
| {{_ 'repairing'}}
else
i.fa.fa-wrench
| {{_ 'repair-broken-cards'}}
if repairResult
br
span.quiet {{repairResult}}
//- #6670: lists un-bound from their swimlane by the pre-#6515
//- automatic repair. The swimlane each list was created in is
//- still recorded, so this puts back exactly that and nothing else.
//- What it restores and what it leaves alone is in the problem's
//- own detail line above, so this needs no description of its own.
if isUnboundLists problem
.admin-problem-actions
button.js-restore-list-swimlanes.primary(disabled="{{#if restoreRunning}}disabled{{/if}}")
if restoreRunning
i.fa.fa-spinner.fa-spin
| {{_ 'repairing'}}
else
i.fa.fa-wrench
| {{_ 'restore'}}
if restoreResult
br
span.quiet {{restoreResult}}
//- Data health (models/lib/dataHealth.js): a Repair button where
//- the repair is safe; one that deletes data asks for a second click.
if problem.repair
.admin-problem-actions
button.js-data-health-repair.primary(data-check="{{problem.checkId}}" data-repair="{{problem.repair}}" disabled="{{#if dataHealthRepairing problem.checkId}}disabled{{/if}}")
if dataHealthRepairing problem.checkId
i.fa.fa-spinner.fa-spin
| {{_ 'repairing'}}
else if dataHealthConfirming problem.checkId
i.fa.fa-exclamation-triangle
| {{_ 'confirm'}}
else
i.fa.fa-wrench
| {{_ 'data-health-repair'}}
if dataHealthResult problem.checkId
br
span.quiet {{dataHealthResult problem.checkId}}
//- Data health: the nightly read-only scan behind the "Data health: ..."
//- problems above.
//- What the checks are and when it runs: docs/Features/Admin-Panel/
//- Problems/Data-Health.md; each finding explains itself above.
h2 {{_ 'data-health'}}
p.quiet {{_ 'last-run'}}: {{dataHealthStatus}}
.admin-problem-actions
button.js-data-health-scan.primary(disabled="{{#if dataHealthScanning}}disabled{{/if}}")
if dataHealthScanning
i.fa.fa-spinner.fa-spin
else
i.fa.fa-search
| {{_ 'start'}}
h2 {{_ 'problems'}}
if hasProblems
p {{_ 'problems-summary-help'}}
.admin-problem-banner
each area in areas
label.admin-problem-item
input.js-problem-check(type="checkbox" data-stream="{{area.stream}}")
i.fa.fa-exclamation-triangle
span.admin-problem-path {{_ 'admin-panel'}} → {{_ 'problems'}} → {{areaLabel area.stream}}
span.admin-problem-count {{area.count}} {{_ 'new-problems'}}
.admin-problem-actions
button.js-ack-checked.primary {{_ 'acknowledge'}}
else
p {{_ 'no-new-problems'}}