fea: display protocol for prefix route.
Some checks failed
Coverage CI / build (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
Ubuntu CI / build (push) Has been cancelled

This commit is contained in:
Daniel Ding
2025-09-05 14:23:01 +08:00
parent 19829f1c5a
commit 6b041b62ce
5 changed files with 57 additions and 19 deletions

View File

@@ -24,12 +24,13 @@ func (l Prefix) List(w http.ResponseWriter, r *http.Request) {
routes, _ := libol.ListRoutes()
for _, prefix := range routes {
item := schema.PrefixRoute{
Link: prefix.Link,
Metric: prefix.Priority,
Table: prefix.Table,
Source: prefix.Src,
NextHop: prefix.Gw,
Prefix: prefix.Dst,
Link: prefix.Link,
Metric: prefix.Priority,
Table: prefix.Table,
Source: prefix.Src,
NextHop: prefix.Gw,
Prefix: prefix.Dst,
Protocol: prefix.Protocol,
}
items = append(items, item)