Ember upgrade prep: deprecate ember-data:no-a-with-array-like (#25674)

* remove @filterBy

* remove filterBy in old classic
This commit is contained in:
Angel Garbarino 2024-02-28 09:49:14 -07:00 committed by GitHub
parent 5e42f9a8d3
commit ee32a4d0d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View File

@ -7,18 +7,20 @@ import Controller from '@ember/controller';
import { service } from '@ember/service';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { filterBy } from '@ember/object/computed';
import { dropTask } from 'ember-concurrency';
export default class VaultClusterSecretsBackendController extends Controller {
@service flashMessages;
@filterBy('model', 'shouldIncludeInList') displayableBackends;
@tracked secretEngineOptions = [];
@tracked selectedEngineType = null;
@tracked selectedEngineName = null;
@tracked engineToDisable = null;
get displayableBackends() {
return this.model.filter((backend) => backend.shouldIncludeInList);
}
get sortedDisplayableBackends() {
// show supported secret engines first and then organize those by id.
const sortedBackends = this.displayableBackends.sort(

View File

@ -5,8 +5,6 @@
// Low level service that allows users to input paths to make requests to vault
// this service provides the UI synecdote to the cli commands read, write, delete, and list
import { filterBy } from '@ember/object/computed';
import Service from '@ember/service';
import { getOwner } from '@ember/application';
@ -28,7 +26,9 @@ export default Service.extend({
adapter() {
return getOwner(this).lookup('adapter:console');
},
commandHistory: filterBy('log', 'type', 'command'),
get commandHistory() {
return this.log.filter((log) => log.type === 'command');
},
log: computed(function () {
return [];
}),