ui: Use WithEventSource mixin on intentions to ensure cleanup (#7333)

The WithEventSource mixin has a reset method when the Controller is
exited which will close any open EventSources/Blocking queries.

This adds it in for intentions
This commit is contained in:
John Cowen 2020-02-21 14:00:33 +00:00 committed by GitHub
parent 88b69da4c5
commit 74ade640e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import Controller from '@ember/controller';
import { computed, get } from '@ember/object';
import WithFiltering from 'consul-ui/mixins/with-filtering';
import WithSearching from 'consul-ui/mixins/with-searching';
import WithEventSource from 'consul-ui/mixins/with-event-source';
import ucfirst from 'consul-ui/utils/ucfirst';
// TODO: DRY out in acls at least
const createCounter = function(prop) {
@ -10,7 +11,7 @@ const createCounter = function(prop) {
};
};
const countAction = createCounter('Action');
export default Controller.extend(WithSearching, WithFiltering, {
export default Controller.extend(WithSearching, WithFiltering, WithEventSource, {
queryParams: {
action: {
as: 'action',