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
This commit is contained in:
John Cowen 2020-05-19 14:51:39 +01:00 committed by GitHub
parent 8602fbaad4
commit 55e05b39e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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) {

View File

@ -59,7 +59,7 @@
<BlockSlot @name="details">
{{#if (eq item.template '')}}
<DataSource
@src={{concat '/' item.Namespace '/' item.Datacenter '/policy/' item.ID}}
@src={{concat '/' item.Namespace '/' dc '/policy/' item.ID}}
@onchange={{action (mut loadedItem) value="data"}}
@loading="lazy"
/>