File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
@xen-orchestra/web/src/modules/vm Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ const { t } = useI18n()
5757
5858const selectedVmId = useRouteQuery (' id' )
5959
60- const { filterableVms, getDisplayData } = useVmEnhancedData (rawVms )
60+ const { filterableVms, getDisplayData } = useVmEnhancedData (() => rawVms )
6161
6262const { items : filteredVms, filter } = useQueryBuilderFilter (' vms' , () => filterableVms .value )
6363
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ import type { FrontXoVm } from '@/modules/vm/remote-resources/use-xo-vm-collecti
44import { getVmIpAddresses } from '@/modules/vm/utils/xo-vm.util.ts'
55import { objectIcon } from '@core/icons'
66import { formatSizeRaw , type SizeInfo } from '@core/utils/size.util.ts'
7+ import { toComputed } from '@core/utils/to-computed.util.ts'
78import type { XoVdi } from '@vates/types'
9+ import type { MaybeRefOrGetter } from '@vueuse/core'
810import { toLower } from 'lodash-es'
911import { computed } from 'vue'
1012
@@ -22,7 +24,8 @@ export interface VmDisplayData extends VmFilterableData {
2224 vmIcon : ReturnType < typeof objectIcon >
2325}
2426
25- export function useVmEnhancedData ( rawVms : FrontXoVm [ ] ) {
27+ export function useVmEnhancedData ( rawVms : MaybeRefOrGetter < FrontXoVm [ ] > ) {
28+ const vms = toComputed ( rawVms )
2629 const { getVbdsByIds } = useXoVbdCollection ( )
2730 const { getVdiById } = useXoVdiCollection ( )
2831
@@ -40,7 +43,7 @@ export function useVmEnhancedData(rawVms: FrontXoVm[]) {
4043 * Filterable data: raw values for Query Builder schema
4144 */
4245 const filterableVms = computed ( ( ) =>
43- rawVms . map (
46+ vms . value . map (
4447 vm =>
4548 ( {
4649 ...vm ,
You can’t perform that action at this time.
0 commit comments