mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
refactor: don't set shape based on unitialised topology
This doesn't make any difference to the outcome - we were simply setting the shape in the NodeSummary to "", which is what it starts out as - but looks less weird in the code.
This commit is contained in:
@@ -134,14 +134,15 @@ func (n NodeSummary) SummarizeMetrics() NodeSummary {
|
||||
}
|
||||
|
||||
func baseNodeSummary(r report.Report, n report.Node) NodeSummary {
|
||||
t, _ := r.Topology(n.Topology)
|
||||
summary := NodeSummary{
|
||||
ID: n.ID,
|
||||
Shape: t.GetShape(),
|
||||
Linkable: true,
|
||||
Parents: Parents(r, n),
|
||||
Adjacency: n.Adjacency,
|
||||
}
|
||||
if t, ok := r.Topology(n.Topology); ok {
|
||||
summary.Shape = t.GetShape()
|
||||
}
|
||||
if _, ok := n.Counters.Lookup(n.Topology); ok {
|
||||
// This is a group of nodes, so no metadata, metrics, tables
|
||||
return summary
|
||||
|
||||
Reference in New Issue
Block a user