Table unification #2
2 changed files with 3 additions and 3 deletions
2
main.go
2
main.go
|
@ -60,7 +60,7 @@ const routingTableTemplate = `
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{$route.NetStart}}{{if not (eq $route.NetStart $route.NetEnd)}} - {{$route.NetEnd}}{{end}}</td>
|
<td>{{$route.NetStart}}{{if not (eq $route.NetStart $route.NetEnd)}} - {{$route.NetEnd}}{{end}}</td>
|
||||||
<td>{{if $route.Extended}}✅{{else}}-{{end}}</td>
|
<td>{{if $route.Extended}}✅{{else}}-{{end}}</td>
|
||||||
<td>{{range $route.ZoneNames}}{{.}}<br>{{end}}</td>
|
<td>{{range $route.ZoneNames.ToSlice}}{{.}}<br>{{end}}</td>
|
||||||
<td>{{$route.Distance}}</td>
|
<td>{{$route.Distance}}</td>
|
||||||
<td>{{$route.LastSeenAgo}}</td>
|
<td>{{$route.LastSeenAgo}}</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -29,8 +29,8 @@ func (rt *RouteTable) AddZonesToNetwork(n ddp.Network, zs ...string) {
|
||||||
if n < r.NetStart || n > r.NetEnd {
|
if n < r.NetStart || n > r.NetEnd {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if !r.Valid() {
|
if r.ZoneNames == nil {
|
||||||
continue
|
r.ZoneNames = make(StringSet)
|
||||||
}
|
}
|
||||||
r.ZoneNames.Insert(zs...)
|
r.ZoneNames.Insert(zs...)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue