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:
@@ -348,12 +348,12 @@ func groupNodeSummary(base NodeSummary, r report.Report, n report.Node) (NodeSum
|
||||
}
|
||||
base.Label, base.Rank = label, label
|
||||
|
||||
t, ok := r.Topology(parts[1])
|
||||
if ok && t.Label != "" {
|
||||
base.LabelMinor = pluralize(n.Counters, parts[1], t.Label, t.LabelPlural)
|
||||
if t, ok := r.Topology(parts[1]); ok {
|
||||
base.Shape = t.GetShape()
|
||||
if t.Label != "" {
|
||||
base.LabelMinor = pluralize(n.Counters, parts[1], t.Label, t.LabelPlural)
|
||||
}
|
||||
}
|
||||
|
||||
base.Shape = t.GetShape()
|
||||
base.Stack = true
|
||||
return base, true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user