Skip to content

Commit

Permalink
make nodeSummaryGroupSpecs only include what's needed
Browse files Browse the repository at this point in the history
  • Loading branch information
rade committed Jun 21, 2017
1 parent b6c886e commit ae2a5ed
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions render/detailed/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/weaveworks/scope/probe/awsecs"
"github.com/weaveworks/scope/probe/docker"
"github.com/weaveworks/scope/probe/host"
"github.com/weaveworks/scope/probe/kubernetes"
"github.com/weaveworks/scope/probe/process"
"github.com/weaveworks/scope/report"
Expand Down Expand Up @@ -126,30 +125,12 @@ func controls(r report.Report, n report.Node) []ControlInstance {
return []ControlInstance{}
}

// We only need to include topologies here where the nodes may appear
// as children of other nodes in some topology.
var nodeSummaryGroupSpecs = []struct {
topologyID string
NodeSummaryGroup
}{
{
topologyID: report.Host,
NodeSummaryGroup: NodeSummaryGroup{
Label: "Hosts",
Columns: []Column{
{ID: host.CPUUsage, Label: "CPU", Datatype: "number"},
{ID: host.MemoryUsage, Label: "Memory", Datatype: "number"},
},
},
},
{
topologyID: report.Service,
NodeSummaryGroup: NodeSummaryGroup{
Label: "Services",
Columns: []Column{
{ID: report.Pod, Label: "# Pods", Datatype: "number"},
{ID: kubernetes.IP, Label: "IP", Datatype: "ip"},
},
},
},
{
topologyID: report.ReplicaSet,
NodeSummaryGroup: NodeSummaryGroup{
Expand All @@ -172,16 +153,6 @@ var nodeSummaryGroupSpecs = []struct {
},
},
},
{
topologyID: report.ECSService,
NodeSummaryGroup: NodeSummaryGroup{
Label: "Services",
Columns: []Column{
{ID: awsecs.ServiceRunningCount, Label: "Running", Datatype: "number"},
{ID: awsecs.ServiceDesiredCount, Label: "Desired", Datatype: "number"},
},
},
},
{
topologyID: report.ECSTask,
NodeSummaryGroup: NodeSummaryGroup{
Expand Down

0 comments on commit ae2a5ed

Please sign in to comment.