From 71d8ac4605e0e47148bcef6b4f399d49c92afb77 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 9 Nov 2021 17:38:24 +0000 Subject: [PATCH] ui: Filter global intentions list by selected partition (#11475) * ui: Filter global intentions list by namespace and partition Filters global intention listing by the current partition rather than trying to use a wildcard. --- .changelog/11475.txt | 4 ++++ ui/packages/consul-ui/app/adapters/intention.js | 8 ++++---- .../tests/integration/adapters/intention-test.js | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 .changelog/11475.txt diff --git a/.changelog/11475.txt b/.changelog/11475.txt new file mode 100644 index 000000000..ec28fc2e5 --- /dev/null +++ b/.changelog/11475.txt @@ -0,0 +1,4 @@ +```release-note:bug +ui: Filter the global intentions list by the currently selected parition rather +than a wildcard +``` diff --git a/ui/packages/consul-ui/app/adapters/intention.js b/ui/packages/consul-ui/app/adapters/intention.js index 88285eb25..f81b3645b 100644 --- a/ui/packages/consul-ui/app/adapters/intention.js +++ b/ui/packages/consul-ui/app/adapters/intention.js @@ -6,9 +6,9 @@ import { get } from '@ember/object'; // Listing of intentions still requires the `ns` query string parameter which // will give us all the intentions that have the `ns` as either the SourceNS or // the DestinationNS. -// We currently list intentions by the * wildcard namespace for back compat reasons -// TODO: Change the above so that we only list intentions with -// Source/Destination in the currently selected nspace + +// TODO: Investigate the above to see if we should only list intentions with +// Source/Destination in the currently selected nspace or leave as is. export default class IntentionAdapter extends Adapter { requestForQuery(request, { dc, ns, partition, filter, index, uri }) { return request` @@ -21,7 +21,7 @@ export default class IntentionAdapter extends Adapter { } ${{ - partition: '*', + partition, ns: '*', index, filter, diff --git a/ui/packages/consul-ui/tests/integration/adapters/intention-test.js b/ui/packages/consul-ui/tests/integration/adapters/intention-test.js index 124cf63eb..27ae7d6c9 100644 --- a/ui/packages/consul-ui/tests/integration/adapters/intention-test.js +++ b/ui/packages/consul-ui/tests/integration/adapters/intention-test.js @@ -25,7 +25,7 @@ module('Integration | Adapter | intention', function(hooks) { filter: '*', index: 1, ns: '*', - partition: '*', + partition: 'partition-1', }, { filter: '*',