mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-05 19:21:46 +00:00
refactor: remove support for non-linkable connections
Connections have always been linkable, so this is dead code.
This commit is contained in:
@@ -48,7 +48,6 @@ type Connection struct {
|
||||
NodeID string `json:"nodeId"` // ID of a node in the topology. Optional, must be set if linkable is true.
|
||||
Label string `json:"label"`
|
||||
LabelMinor string `json:"labelMinor,omitempty"`
|
||||
Linkable bool `json:"linkable"`
|
||||
Metadata []report.MetadataRow `json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
@@ -132,7 +131,6 @@ func (c *connectionCounters) rows(r report.Report, ns report.Nodes, includeLocal
|
||||
NodeID: summary.ID,
|
||||
Label: summary.Label,
|
||||
LabelMinor: summary.LabelMinor,
|
||||
Linkable: true,
|
||||
}
|
||||
if row.remoteAddr != "" {
|
||||
connection.Label = row.remoteAddr
|
||||
|
||||
@@ -154,7 +154,6 @@ func TestMakeDetailedHostNode(t *testing.T) {
|
||||
NodeID: fixture.ServerHostNodeID,
|
||||
Label: "server",
|
||||
LabelMinor: "hostname.com",
|
||||
Linkable: true,
|
||||
Metadata: []report.MetadataRow{
|
||||
{
|
||||
ID: "port",
|
||||
@@ -261,7 +260,6 @@ func TestMakeDetailedContainerNode(t *testing.T) {
|
||||
NodeID: fixture.ClientContainerNodeID,
|
||||
Label: "client",
|
||||
LabelMinor: "client.hostname.com",
|
||||
Linkable: true,
|
||||
Metadata: []report.MetadataRow{
|
||||
{
|
||||
ID: "port",
|
||||
@@ -274,10 +272,9 @@ func TestMakeDetailedContainerNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
|
||||
NodeID: render.IncomingInternetID,
|
||||
Label: fixture.RandomClientIP,
|
||||
Linkable: true,
|
||||
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
|
||||
NodeID: render.IncomingInternetID,
|
||||
Label: fixture.RandomClientIP,
|
||||
Metadata: []report.MetadataRow{
|
||||
{
|
||||
ID: "port",
|
||||
@@ -378,7 +375,6 @@ func TestMakeDetailedPodNode(t *testing.T) {
|
||||
NodeID: fixture.ClientPodNodeID,
|
||||
Label: "pong-a",
|
||||
LabelMinor: "1 container",
|
||||
Linkable: true,
|
||||
Metadata: []report.MetadataRow{
|
||||
{
|
||||
ID: "port",
|
||||
@@ -391,10 +387,9 @@ func TestMakeDetailedPodNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
|
||||
NodeID: render.IncomingInternetID,
|
||||
Label: fixture.RandomClientIP,
|
||||
Linkable: true,
|
||||
ID: connectionID(render.IncomingInternetID, fixture.RandomClientIP),
|
||||
NodeID: render.IncomingInternetID,
|
||||
Label: fixture.RandomClientIP,
|
||||
Metadata: []report.MetadataRow{
|
||||
{
|
||||
ID: "port",
|
||||
|
||||
Reference in New Issue
Block a user