From e9788459e46ff2498113a1b786cf2ba91b25939c Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Mon, 8 May 2017 13:14:19 -0700 Subject: [PATCH] api_topologies: Don't put namespace filters on containers-by-dns/image This should never have been added. The IsNamespace filter will always return false for these nodes. It isn't even clear what this filter would mean, even if implemented, since those nodes don't map to a single container and therefore not to a single namespace. --- app/api_topologies.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/api_topologies.go b/app/api_topologies.go index 387857ab78..fb9a10fb23 100644 --- a/app/api_topologies.go +++ b/app/api_topologies.go @@ -89,7 +89,7 @@ func updateSwarmFilters(rpt report.Report, topologies []APITopologyDesc) []APITo } topologies = append([]APITopologyDesc{}, topologies...) // Make a copy so we can make changes safely for i, t := range topologies { - if t.id == containersID || t.id == containersByImageID || t.id == containersByHostnameID || t.id == swarmServicesID { + if t.id == containersID || t.id == swarmServicesID { topologies[i] = mergeTopologyFilters(t, []APITopologyOptionGroup{ namespaceFilters(ns, docker.DefaultNamespace, "All Stacks"), }) @@ -122,7 +122,7 @@ func updateKubeFilters(rpt report.Report, topologies []APITopologyDesc) []APITop sort.Strings(ns) topologies = append([]APITopologyDesc{}, topologies...) // Make a copy so we can make changes safely for i, t := range topologies { - if t.id == containersID || t.id == containersByImageID || t.id == containersByHostnameID || t.id == podsID || t.id == servicesID || t.id == deploymentsID || t.id == replicaSetsID { + if t.id == containersID || t.id == podsID || t.id == servicesID || t.id == deploymentsID || t.id == replicaSetsID { topologies[i] = mergeTopologyFilters(t, []APITopologyOptionGroup{ namespaceFilters(ns, "default", "All Namespaces"), })