[TASK] meshviewer-ffrgb: drop site for domain
This commit is contained in:
parent
d14d3386c7
commit
7b4e3ce221
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue