From 84e721b0de8ddc151798fd862820e5b1d64772cb Mon Sep 17 00:00:00 2001 From: Angel Garbarino Date: Tue, 27 Feb 2024 12:44:54 -0700 Subject: [PATCH 1/2] remove @filterBy --- ui/app/controllers/vault/cluster/secrets/backends.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/app/controllers/vault/cluster/secrets/backends.js b/ui/app/controllers/vault/cluster/secrets/backends.js index 17f964a5a5ca..b7e7df813fb9 100644 --- a/ui/app/controllers/vault/cluster/secrets/backends.js +++ b/ui/app/controllers/vault/cluster/secrets/backends.js @@ -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( From 6e3034b1da0f2fbfa41b45c5c42347da96332085 Mon Sep 17 00:00:00 2001 From: Angel Garbarino Date: Wed, 28 Feb 2024 09:28:59 -0700 Subject: [PATCH 2/2] remove filterBy in old classic --- ui/app/services/console.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/app/services/console.js b/ui/app/services/console.js index 8e8d91c91ed3..96ecc257d4ca 100644 --- a/ui/app/services/console.js +++ b/ui/app/services/console.js @@ -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 []; }),