api_topologies: Allow selecting multiple k8s namespace filters

This is the first usage of the new 'union' selectType.
Note that we're still sending 'all' for now. There's currently no easy
way to specify this meaning, and arguably it should be done entirely clientside.
But for now it just means some UI weirdness where 'all' is one of the options and having it on
means anything else you select doesn't matter.
This commit is contained in:
Mike Lang
2017-03-22 18:14:32 -07:00
committed by jpellizzari
parent efb68fb2da
commit bfb68a54a9

View File

@@ -50,7 +50,7 @@ var (
// kubernetesFilters generates the current kubernetes filters based on the
// available k8s topologies.
func kubernetesFilters(namespaces ...string) APITopologyOptionGroup {
options := APITopologyOptionGroup{ID: "namespace", Default: "all"}
options := APITopologyOptionGroup{ID: "namespace", Default: "all", SelectType: "union"}
for _, namespace := range namespaces {
if namespace == "default" {
options.Default = namespace