Skip to content

Commit

Permalink
Merge pull request #67 from weaveworks/remove-topology-type
Browse files Browse the repository at this point in the history
Topologies no longer have a 'type' (for grouping)
  • Loading branch information
peterbourgon committed May 23, 2015
2 parents f577bbc + 19296a6 commit 8c7ca1e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions app/api_topologies.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type APITopologyDesc struct {
Name string `json:"name"`
URL string `json:"url"`
GroupedURL string `json:"grouped_url,omitempty"`
Type string `json:"type"`
Stats topologyStats `json:"stats"`
}

Expand Down Expand Up @@ -43,7 +42,6 @@ func makeTopologyList(rep Reporter) func(w http.ResponseWriter, r *http.Request)
Name: def.human,
URL: url,
GroupedURL: groupedURL,
Type: def.typ,
Stats: stats(def.topologySelecter(rpt).RenderBy(def.MapFunc, false)),
})
}
Expand Down
3 changes: 0 additions & 3 deletions app/api_topologies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ func TestAPITopology(t *testing.T) {
if topo.GroupedURL != "" {
is200(t, ts, topo.GroupedURL)
}
if have := topo.Type; have == "" {
t.Errorf("Type isn't empty: %q", have)
}
if have := topo.Stats.EdgeCount; have <= 0 {
t.Errorf("EdgeCount isn't positive: %d", have)
}
Expand Down
5 changes: 2 additions & 3 deletions app/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ var topologyRegistry = map[string]struct {
topologySelecter
report.MapFunc
hasGrouped bool
typ string
}{
"applications": {"Applications", selectProcess, report.ProcessPID, true, "Process"},
"hosts": {"Hosts", selectNetwork, report.NetworkHostname, false, "Network"},
"applications": {"Applications", selectProcess, report.ProcessPID, true},
"hosts": {"Hosts", selectNetwork, report.NetworkHostname, false},
}

0 comments on commit 8c7ca1e

Please sign in to comment.