From 9535ab298714900989a5aa1d118bf9413c7928e7 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 19 Oct 2021 12:31:30 +0100 Subject: [PATCH] ui: Remove remaining partition FIXME comments (#11312) --- ui/packages/consul-ui/app/adapters/intention.js | 12 ++---------- .../consul-ui/app/components/auth-form/index.hbs | 5 ++--- ui/packages/consul-ui/app/models/discovery-chain.js | 10 +++++++++- ui/packages/consul-ui/app/models/proxy.js | 3 ++- ui/packages/consul-ui/app/services/client/http.js | 1 - ui/packages/consul-ui/app/services/repository/kv.js | 1 - .../consul-ui/app/services/repository/partition.js | 1 - 7 files changed, 15 insertions(+), 18 deletions(-) diff --git a/ui/packages/consul-ui/app/adapters/intention.js b/ui/packages/consul-ui/app/adapters/intention.js index 13108e860..88285eb25 100644 --- a/ui/packages/consul-ui/app/adapters/intention.js +++ b/ui/packages/consul-ui/app/adapters/intention.js @@ -7,9 +7,8 @@ import { get } from '@ember/object'; // 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 -// FIXME: Is now a good time to change this behaviour ^ ? - -// TODO: Update to use this.formatDatacenter() +// TODO: Change the above so that we only list intentions with +// Source/Destination in the currently selected nspace export default class IntentionAdapter extends Adapter { requestForQuery(request, { dc, ns, partition, filter, index, uri }) { return request` @@ -46,8 +45,6 @@ export default class IntentionAdapter extends Adapter { DestinationName, ] = id.split(':').map(decodeURIComponent); - // FIXME: Service and Namespace are encoded into the URL here - // guessing we need to do the same thing for Partitions return request` GET /v1/connect/intentions/exact?${{ source: `${SourcePartition}/${SourceNS}/${SourceName}`, @@ -82,8 +79,6 @@ export default class IntentionAdapter extends Adapter { body.Permissions = serialized.Permissions; } } - // FIXME: Service and Namespace are encoded into the URL here - // guessing we need to do the same thing for Partitions return request` PUT /v1/connect/intentions/exact?${{ source: `${data.SourcePartition}/${data.SourceNS}/${data.SourceName}`, @@ -99,14 +94,11 @@ export default class IntentionAdapter extends Adapter { // you can no longer save Destinations delete serialized.DestinationName; delete serialized.DestinationNS; - // FIXME: Does the above comment stand for partitions also? delete serialized.DestinationPartition; return this.requestForCreateRecord(...arguments); } requestForDeleteRecord(request, serialized, data) { - // FIXME: Service and Namespace are encoded into the URL here - // guessing we need to do the same thing for Partitions return request` DELETE /v1/connect/intentions/exact?${{ source: `${data.SourcePartition}/${data.SourceNS}/${data.SourceName}`, diff --git a/ui/packages/consul-ui/app/components/auth-form/index.hbs b/ui/packages/consul-ui/app/components/auth-form/index.hbs index 9379b0ade..45f50569f 100644 --- a/ui/packages/consul-ui/app/components/auth-form/index.hbs +++ b/ui/packages/consul-ui/app/components/auth-form/index.hbs @@ -80,7 +80,7 @@ @src={{uri '/${partition}/${nspace}/${dc}/oidc/providers' (hash partition=partition - nspace=(or nspace '') + nspace=nspace dc=dc ) }} @@ -102,11 +102,10 @@ {{/if}} - {{!FIXME: default partition?}}