checker: add RuleName field to CheckState instead of overloading Code

Rules can now set Code freely without the server clobbering it; the
originating rule is reported separately via RuleName.
This commit is contained in:
nemunaire 2026-04-23 14:50:00 +07:00
commit c9ee6655ca
4 changed files with 57 additions and 13 deletions

View file

@ -302,11 +302,12 @@ var checkResultTemplate = template.Must(template.New("result").Funcs(templateFun
{{if .States}}
<h2>Check states</h2>
<table>
<thead><tr><th>Status</th><th>Code</th><th>Subject</th><th>Message</th></tr></thead>
<thead><tr><th>Status</th><th>Rule</th><th>Code</th><th>Subject</th><th>Message</th></tr></thead>
<tbody>
{{range .States}}
<tr>
<td><span class="badge {{statusClass .Status}}">{{statusString .Status}}</span></td>
<td>{{.RuleName}}</td>
<td>{{.Code}}</td>
<td>{{.Subject}}</td>
<td>{{.Message}}</td>