@@ -32,23 +32,24 @@ func NewOutput(ctx context.Context, g *netmap.Graph, e *enum.Enumeration, filter
32
32
}
33
33
34
34
var assets []* types.Asset
35
+ qtime := e .Config .CollectionStartTime .UTC ()
35
36
for _ , atype := range []oam.AssetType {oam .FQDN , oam .IPAddress , oam .Netblock , oam .ASN , oam .RIROrg } {
36
- if a , err := g .DB .FindByType (atype , e . Config . CollectionStartTime . UTC () ); err == nil {
37
+ if a , err := g .DB .FindByType (atype , qtime ); err == nil {
37
38
assets = append (assets , a ... )
38
39
}
39
40
}
40
41
41
42
for _ , from := range assets {
42
- fromstr := extractAssetName (from , e . Config . CollectionStartTime . UTC () )
43
+ fromstr := extractAssetName (from , qtime )
43
44
44
- if rels , err := g .DB .OutgoingRelations (from , e . Config . CollectionStartTime . UTC () ); err == nil {
45
+ if rels , err := g .DB .OutgoingRelations (from , qtime ); err == nil {
45
46
for _ , rel := range rels {
46
47
lineid := from .ID + rel .ID + rel .ToAsset .ID
47
48
if filter .Has (lineid ) {
48
49
continue
49
50
}
50
- if to , err := g .DB .FindById (rel .ToAsset .ID , e . Config . CollectionStartTime . UTC () ); err == nil {
51
- tostr := extractAssetName (to , e . Config . CollectionStartTime . UTC () )
51
+ if to , err := g .DB .FindById (rel .ToAsset .ID , qtime ); err == nil {
52
+ tostr := extractAssetName (to , qtime )
52
53
53
54
output = append (output , fmt .Sprintf ("%s %s %s %s %s" , fromstr , "-->" , magenta (rel .Type ), "-->" , tostr ))
54
55
filter .Insert (lineid )
0 commit comments