refactor: add customized migration plan delete model (#996) (#997)

* refactor: add customized migration plan delete model



* refactor: copilot review



* refactor: copilot review



---------


(cherry picked from commit fb6ffa3c0f)

Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
mergify[bot]
2026-07-14 17:40:44 +08:00
committed by GitHub
co-authored by Andy Lee
parent a65b3f443e
commit 45f72749f5
4 changed files with 355 additions and 13 deletions
@@ -9,6 +9,7 @@ import ConfigureMappingsStep from '@pkg/harvester/components/vm-migration/Config
import ReviewMigrationStep from '@pkg/harvester/components/vm-migration/ReviewMigrationStep.vue';
import { PRODUCT_NAME } from '@pkg/harvester/config/harvester';
import { currentRouter } from '@pkg/harvester/utils/router';
import { exceptionToErrorsArray, stringify } from '@shell/utils/error';
const store = useStore();
const { t } = useI18n(store);
@@ -220,7 +221,13 @@ const onFinish = async(buttonCb) => {
buttonCb(true);
currentRouter().push(migrationListLocation);
} catch (err) {
errors.value = [err instanceof Error ? err.message : String(err)];
errors.value = exceptionToErrorsArray(err).map((e) => {
if (typeof e === 'string') {
return e;
}
return stringify(e);
});
buttonCb(false);
}
};