open-consul/ui-v2/app/controllers/dc/services/show/instances.js
John Cowen 41c988270f ui: Remove WithSearching mixin, use helpers instead (#7961)
* ui: Remove WithSearching mixin, use composable helpers instead
2020-06-03 16:46:53 +00:00

22 lines
496 B
JavaScript

import Controller from '@ember/controller';
import { computed } from '@ember/object';
import { alias } from '@ember/object/computed';
export default Controller.extend({
items: alias('item.Nodes'),
queryParams: {
search: {
as: 'filter',
replace: true,
},
},
keyedProxies: computed('proxies.[]', function() {
const proxies = {};
this.proxies.forEach(item => {
proxies[item.ServiceProxy.DestinationServiceID] = true;
});
return proxies;
}),
});