Record origin changes and show them on the prefix page (closes #161)
check / check (push) Successful in 4m6s
check / check (push) Successful in 4m6s
The routing table records each prefix and origin AS pair's origin changes: when it gains its first peer and when it loses its last. Each row holds the prefix, the origin AS, announced or withdrawn, the peer count and the time. The prefix handler writes them to a new origin_changes table, and the database maintainer prunes each prefix to its newest 500 rows and 72 hours. The prefix page lists them newest first, at most 5,000. Model: deepseek-v4-pro
This commit is contained in:
@@ -297,6 +297,41 @@
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .OriginChanges}}
|
||||
<div class="origins-section">
|
||||
<h3>Origin Changes</h3>
|
||||
{{if .MoreOriginChanges}}
|
||||
<p>There are more than 5,000 changes. Showing the newest 5,000.</p>
|
||||
{{end}}
|
||||
<table class="route-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Time (UTC)</th>
|
||||
<th>Change</th>
|
||||
<th>Origin AS</th>
|
||||
<th>Peers</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .OriginChanges}}
|
||||
<tr>
|
||||
<td>{{.Time.Format "2006-01-02 15:04:05"}}</td>
|
||||
<td>{{if .Announced}}Announced{{else}}Withdrawn{{end}}</td>
|
||||
<td>
|
||||
{{if .OriginASN}}
|
||||
<a href="/as/{{.OriginASN}}" class="as-link">AS{{.OriginASN}}</a>
|
||||
{{else}}
|
||||
No known origin
|
||||
{{end}}
|
||||
</td>
|
||||
<td>{{.PeerCount}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .Routes}}
|
||||
|
||||
Reference in New Issue
Block a user