-
-
+
{
overallProgress += (stepPct / 100) * stepWeight;
if (!currentStep) {
- currentStep = step.name || `Step ${ idx + 1 }`;
+ currentStep = step.name || t('harvester.addons.vmMigration.dashboard.progress.step', { index: idx + 1 });
}
if (step.error && !errorMsg) {
const reasons = (step.error.reasons || []).join('; ') || t('harvester.addons.vmMigration.plan.states.error');
- errorMsg = `${ step.name || `Step ${ idx + 1 }` }: ${ reasons }`;
+ errorMsg = `${ step.name || t('harvester.addons.vmMigration.dashboard.progress.step', { index: idx + 1 }) }: ${ reasons }`;
}
if (step.phase === 'Failed' && !errorMsg) {
- errorMsg = `${ step.name || `Step ${ idx + 1 }` }: ${ t('harvester.addons.vmMigration.dashboard.progress.failed') }`;
+ errorMsg = `${ step.name || t('harvester.addons.vmMigration.dashboard.progress.step', { index: idx + 1 }) }: ${ t('harvester.addons.vmMigration.dashboard.progress.failed') }`;
}
}
});
@@ -215,7 +215,7 @@ init();
@@ -246,7 +246,7 @@ init();
v-if="vm.progress >= 100"
class="step-label text-muted"
>
- Finished Successfully
+ {{ t('harvester.addons.vmMigration.dashboard.progress.finishedSuccessfully') }}
- Canceled
+ {{ t('harvester.addons.vmMigration.plan.states.canceled') }}
{
);
if (secret?.data) {
- try {
- stepData.provider.username = atob(secret.data.user || '');
- stepData.provider.password = atob(secret.data.password || '');
- stepData.provider.skipTlsVerify = atob(secret.data.insecureSkipVerify || '') === 'true';
- } catch (e) {
- errors.value = [t('harvester.addons.vmMigration.errors.failedDecodeCredentials')];
- }
+ const decode = (val) => {
+ try {
+ return atob(val || '');
+ } catch (e) {
+ return '';
+ }
+ };
+
+ stepData.provider.username = decode(secret.data.user);
+ stepData.provider.password = decode(secret.data.password);
+ stepData.provider.skipTlsVerify = decode(secret.data.insecureSkipVerify) === 'true';
stepData.provider.createdSecret = secret;
}
}
@@ -230,7 +234,7 @@ const init = async() => {
// Maps may not exist yet
}
} catch (err) {
- errors.value = [`Failed to load provider: ${ err.message || err }`];
+ errors.value = [t('harvester.addons.vmMigration.errors.failedLoadProvider', { error: err.message || err })];
}
initialLoading.value = false;
diff --git a/pkg/harvester/pages/c/_cluster/vm-migration/vm-migration-wizard.vue b/pkg/harvester/pages/c/_cluster/vm-migration/vm-migration-wizard.vue
index 7bb3e0c8..e9af5c13 100644
--- a/pkg/harvester/pages/c/_cluster/vm-migration/vm-migration-wizard.vue
+++ b/pkg/harvester/pages/c/_cluster/vm-migration/vm-migration-wizard.vue
@@ -15,14 +15,11 @@ const { t } = useI18n(store);
const cruRef = ref(null);
const providerStepRef = ref(null);
-const mappingsStepRef = ref(null);
const reviewStepRef = ref(null);
const providerName = ref('');
const provider = ref(null);
const selectedVMs = ref([]);
-const networkMapName = ref('');
-const storageMapName = ref('');
const errors = ref([]);
const providerReady = ref(false);
@@ -263,7 +260,6 @@ const onCancel = () => {
{
:provider-name="providerName"
:provider="provider"
:selected-vms="selectedVMs"
- :network-map-name="networkMapName"
- :storage-map-name="storageMapName"
:mapping-entries="stepData.mappings"
:step-data="stepData.review"
@ready="onReviewReady"