Add rspamd symbol descriptions from embedded/API lookup
Embed rspamd-symbols.json in the binary to provide human-readable descriptions for rspamd symbols in reports. Optionally fetch fresh symbols from a configurable rspamd API URL (--rspamd-api-url flag), falling back to the embedded list on error. Update the frontend to display descriptions alongside symbol names and scores.
This commit is contained in:
parent
5c104f3c99
commit
7d3009d7d0
12 changed files with 6816 additions and 20 deletions
|
|
@ -75,7 +75,7 @@
|
|||
<tr>
|
||||
<th>Symbol</th>
|
||||
<th class="text-end">Score</th>
|
||||
<th>Parameters</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -87,7 +87,14 @@
|
|||
? "table-success"
|
||||
: ""}
|
||||
>
|
||||
<td class="font-monospace">{symbolName}</td>
|
||||
<td>
|
||||
<span class="font-monospace">{symbolName}</span>
|
||||
{#if symbol.params}
|
||||
<small class="d-block text-muted">
|
||||
{symbol.params}
|
||||
</small>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<span
|
||||
class={symbol.score > 0
|
||||
|
|
@ -99,7 +106,7 @@
|
|||
{symbol.score > 0 ? "+" : ""}{symbol.score.toFixed(2)}
|
||||
</span>
|
||||
</td>
|
||||
<td class="small text-muted">{symbol.params ?? ""}</td>
|
||||
<td class="small text-muted">{symbol.description ?? ""}</td>
|
||||
</tr>
|
||||
{/each}
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue