diff --git a/output/meshviewer-ffrgb/struct.go b/output/meshviewer-ffrgb/struct.go index 398401e..a6db356 100644 --- a/output/meshviewer-ffrgb/struct.go +++ b/output/meshviewer-ffrgb/struct.go @@ -32,8 +32,8 @@ type Node struct { NodeID string `json:"node_id"` MAC string `json:"mac"` Addresses []string `json:"addresses"` - SiteCode string `json:"site_code,omitempty"` - DomainCode string `json:"-"` + SiteCode string `json:"-"` + DomainCode string `json:"domain"` Hostname string `json:"hostname"` Owner string `json:"owner,omitempty"` Location *Location `json:"location,omitempty"` @@ -154,5 +154,10 @@ func NewNode(nodes *runtime.Nodes, n *runtime.Node) *Node { } } + // fix site to domain - if empty + if node.DomainCode == "" { + node.DomainCode = node.SiteCode + } + return node }