mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-15 19:41:02 +00:00
Make pseudo nodes clickable.
This commit is contained in:
11476
app/static.go
11476
app/static.go
File diff suppressed because it is too large
Load Diff
@@ -46,9 +46,9 @@ const Node = React.createClass({
|
||||
const textOffsetY = scale(0.5) + 18;
|
||||
const isPseudo = !!this.props.pseudo;
|
||||
const color = isPseudo ? '' : this.getNodeColor(this.props.label);
|
||||
const onClick = isPseudo ? null : this.props.onClick;
|
||||
const onMouseEnter = isPseudo ? null : this.handleMouseEnter;
|
||||
const onMouseLeave = isPseudo ? null : this.handleMouseLeave;
|
||||
const onClick = this.props.onClick;
|
||||
const onMouseEnter = this.handleMouseEnter;
|
||||
const onMouseLeave = this.handleMouseLeave;
|
||||
const classNames = ['node'];
|
||||
|
||||
if (this.props.highlighted) {
|
||||
|
||||
@@ -24,6 +24,10 @@ var (
|
||||
EgressByteCount: newu64(700),
|
||||
},
|
||||
Adjacency: adjacency,
|
||||
Origins: report.MakeIDList(
|
||||
test.UnknownClient1NodeID,
|
||||
test.UnknownClient2NodeID,
|
||||
),
|
||||
}
|
||||
}
|
||||
unknownPseudoNode2 = func(adjacency report.IDList) render.RenderableNode {
|
||||
@@ -37,6 +41,9 @@ var (
|
||||
EgressByteCount: newu64(500),
|
||||
},
|
||||
Adjacency: adjacency,
|
||||
Origins: report.MakeIDList(
|
||||
test.UnknownClient3NodeID,
|
||||
),
|
||||
}
|
||||
}
|
||||
theInternetNode = func(adjacency report.IDList) render.RenderableNode {
|
||||
@@ -50,6 +57,9 @@ var (
|
||||
EgressByteCount: newu64(600),
|
||||
},
|
||||
Adjacency: adjacency,
|
||||
Origins: report.MakeIDList(
|
||||
test.RandomClientNodeID,
|
||||
),
|
||||
}
|
||||
}
|
||||
ClientProcess1ID = render.MakeProcessID(test.ClientHostID, test.Client1PID)
|
||||
@@ -348,6 +358,7 @@ var (
|
||||
Adjacency: report.MakeIDList(ServerHostRenderedID),
|
||||
NodeMetadata: report.MakeNodeMetadata(),
|
||||
EdgeMetadata: report.EdgeMetadata{},
|
||||
Origins: report.MakeIDList(test.UnknownAddress1NodeID),
|
||||
},
|
||||
pseudoHostID2: {
|
||||
ID: pseudoHostID2,
|
||||
@@ -356,6 +367,7 @@ var (
|
||||
Adjacency: report.MakeIDList(ServerHostRenderedID),
|
||||
NodeMetadata: report.MakeNodeMetadata(),
|
||||
EdgeMetadata: report.EdgeMetadata{},
|
||||
Origins: report.MakeIDList(test.UnknownAddress2NodeID),
|
||||
},
|
||||
render.TheInternetID: {
|
||||
ID: render.TheInternetID,
|
||||
@@ -364,6 +376,7 @@ var (
|
||||
Adjacency: report.MakeIDList(ServerHostRenderedID),
|
||||
NodeMetadata: report.MakeNodeMetadata(),
|
||||
EdgeMetadata: report.EdgeMetadata{},
|
||||
Origins: report.MakeIDList(test.RandomAddressNodeID),
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
@@ -182,9 +182,7 @@ func (m LeafMap) Render(rpt report.Report) RenderableNodes {
|
||||
if !ok {
|
||||
return "", false
|
||||
}
|
||||
// TODO(tomwilkie): we should propagate origin nodes for pseudo nodes.
|
||||
// Not worth doing until they are selectable in the UI
|
||||
// pseudoNode.Origins = pseudoNode.Origins.Add(srcID)
|
||||
pseudoNode.Origins = pseudoNode.Origins.Add(srcNodeID)
|
||||
existing, ok := nodes[pseudoNode.ID]
|
||||
if ok {
|
||||
pseudoNode.Merge(existing)
|
||||
|
||||
Reference in New Issue
Block a user