fix: forklift mapping UX and migration progress fixes (#1049)

* refactor: modify relatedResources using ownerReferences uid

Signed-off-by: Andy Lee <andy.lee@suse.com>

* refactor: wordings

Signed-off-by: Andy Lee <andy.lee@suse.com>

* fix(vm-migration): keep completed VMs green and linkable in failed plans

When a plan fails overall, VMs that already reached 100% were marked with an error: their progress bar turned red while the label still read "Finished Successfully", and the migrated-VM detail link was hidden.

Skip the plan-level failure fallback for VMs at 100% and drop the !planFailed guard from the detail-link condition so successfully migrated VMs stay green and stay navigable.

Signed-off-by: Andy Lee <andy.lee@suse.com>

---------

Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
Andy Lee
2026-07-23 14:38:49 +08:00
committed by GitHub
parent eadda2a18b
commit 2d747e435a
4 changed files with 76 additions and 82 deletions
@@ -1,5 +1,4 @@
<script setup>
import { computed } from 'vue';
import { useStore } from 'vuex';
import LabeledSelect from '@shell/components/form/LabeledSelect';
import { RcItemCard } from '@components/RcItemCard';
@@ -18,8 +17,10 @@ const props = defineProps({
clearable: { type: Boolean, default: false },
});
const selectOptions = computed(() => {
if (!props.clearable) {
// Only offer "Remove Map" for entries that already have a target selected;
// entries without a selection just show the regular options.
const optionsFor = (entry) => {
if (!props.clearable || !entry.target) {
return props.options;
}
@@ -34,14 +35,9 @@ const selectOptions = computed(() => {
disabled: true,
kind: 'divider',
},
{
label: `${ props.placeholder }:`,
disabled: true,
kind: 'title',
},
...props.options,
];
});
};
</script>
<template>
@@ -85,7 +81,7 @@ const selectOptions = computed(() => {
<div class="mapping-target">
<LabeledSelect
v-model:value="entry.target"
:options="selectOptions"
:options="optionsFor(entry)"
:placeholder="placeholder+'...'"
:searchable="true"
/>