diff --git a/ui/mirage/config.js b/ui/mirage/config.js index 3978c9c5e..367dc67ba 100644 --- a/ui/mirage/config.js +++ b/ui/mirage/config.js @@ -234,7 +234,13 @@ export default function() { return new Response(200, {}, '[]'); } - return this.serialize(csiVolumes.all()); + const json = this.serialize(csiVolumes.all()); + const namespace = queryParams.namespace || 'default'; + return json.filter(volume => + namespace === 'default' + ? !volume.NamespaceID || volume.NamespaceID === namespace + : volume.NamespaceID === namespace + ); }) );