refactor: remove duplication of filtering logic
refactor: remove duplication of filtering logic

weaveworks/scope,kinvolk/scope,alban/scope,weaveworks/scope,weaveworks/scope,alban/scope,alban/scope,kinvolk/scope,weaveworks/scope,kinvolk/scope,kinvolk/scope,weaveworks/scope,alban/scope,kinvolk/scope,weaveworks/scope,alban/scope,alban/scope,kinvolk/scope