mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-10-01 03:36:04 +08:00
refactor: add customized migration plan delete model (#996)
* refactor: add customized migration plan delete model Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: copilot review Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: copilot review Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user