From 2940f25fe0b805f1ffdb499becb916cdc7899eee Mon Sep 17 00:00:00 2001 From: Andy Lee Date: Mon, 24 Mar 2025 15:31:14 +0800 Subject: [PATCH] fix volume won't be dismiss after deleting (#216) Signed-off-by: Andy Lee --- pkg/harvester/list/harvesterhci.io.volume.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/harvester/list/harvesterhci.io.volume.vue b/pkg/harvester/list/harvesterhci.io.volume.vue index 688dde3a..d878e85e 100644 --- a/pkg/harvester/list/harvesterhci.io.volume.vue +++ b/pkg/harvester/list/harvesterhci.io.volume.vue @@ -59,10 +59,7 @@ export default { if (!pvcSchema?.collectionMethods.find((x) => x.toLowerCase() === 'post')) { this.$store.dispatch('type-map/configureType', { match: HCI.VOLUME, isCreatable: false }); } - // we only show the non golden image PVCs in the list - const pvcs = hash.pvcs.filter((pvc) => pvc?.metadata?.annotations?.[HCI_ANNOTATIONS.GOLDEN_IMAGE] !== 'true'); - - this.rows = pvcs; + this.rows = hash.pvcs; }, data() { @@ -73,7 +70,10 @@ export default { schema() { return schema; }, - + filterRows() { + // we only show the non golden image PVCs in the list + return this.rows.filter((pvc) => pvc?.metadata?.annotations?.[HCI_ANNOTATIONS.GOLDEN_IMAGE] !== 'true'); + }, headers() { return [ STATE, @@ -150,7 +150,7 @@ export default { :groupable="true" default-sort-by="age" :namespaced="true" - :rows="rows" + :rows="filterRows" :schema="schema" key-field="_key" >