From c8cfd2af5fc30b0f10288e22c33b10a19a0a77de Mon Sep 17 00:00:00 2001 From: Peter Bourgon Date: Wed, 20 May 2015 10:46:07 +0200 Subject: [PATCH] Topologies no longer have a 'type' (for grouping) --- app/api_topologies.go | 2 -- app/api_topologies_test.go | 3 --- app/router.go | 5 ++--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/api_topologies.go b/app/api_topologies.go index c484dea82e..5bceb6ec29 100644 --- a/app/api_topologies.go +++ b/app/api_topologies.go @@ -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"` } @@ -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)), }) } diff --git a/app/api_topologies_test.go b/app/api_topologies_test.go index 9b6a0dc4a8..ea76bb1b98 100644 --- a/app/api_topologies_test.go +++ b/app/api_topologies_test.go @@ -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) } diff --git a/app/router.go b/app/router.go index d121a7872b..b7ad86d898 100644 --- a/app/router.go +++ b/app/router.go @@ -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}, }