[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"`
|
NodeID string `json:"node_id"`
|
||||||
MAC string `json:"mac"`
|
MAC string `json:"mac"`
|
||||||
Addresses []string `json:"addresses"`
|
Addresses []string `json:"addresses"`
|
||||||
SiteCode string `json:"site_code,omitempty"`
|
SiteCode string `json:"-"`
|
||||||
DomainCode string `json:"-"`
|
DomainCode string `json:"domain"`
|
||||||
Hostname string `json:"hostname"`
|
Hostname string `json:"hostname"`
|
||||||
Owner string `json:"owner,omitempty"`
|
Owner string `json:"owner,omitempty"`
|
||||||
Location *Location `json:"location,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
|
return node
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user