From 6627709a03b4af1208fb5eeb76b381d6f160acd8 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 19 May 2020 14:51:39 +0100 Subject: [PATCH] ui: Ensure datacenter is sent to the API when loading in a policy panel (#7910) * ui: Policies don't have datacenter properties, use the URL dc instead. * ui: Ensure policy saving proxy object is destroyed --- ui-v2/app/components/child-selector/index.js | 6 +++++- ui-v2/app/components/policy-selector/index.hbs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui-v2/app/components/child-selector/index.js b/ui-v2/app/components/child-selector/index.js index c1f58ef5b8..b3b498b979 100644 --- a/ui-v2/app/components/child-selector/index.js +++ b/ui-v2/app/components/child-selector/index.js @@ -76,9 +76,13 @@ export default Component.extend(SlotsMixin, WithListeners, { items, e.data, ]); + item.willDestroy(); success(); }, - error: e => this.error(e), + error: e => { + item.willDestroy(); + this.error(e); + }, }); }, remove: function(item, items) { diff --git a/ui-v2/app/components/policy-selector/index.hbs b/ui-v2/app/components/policy-selector/index.hbs index 6e2b7198ac..ad4cac71a1 100644 --- a/ui-v2/app/components/policy-selector/index.hbs +++ b/ui-v2/app/components/policy-selector/index.hbs @@ -59,7 +59,7 @@ {{#if (eq item.template '')}}