|
1 |
| -import { t } from 'src/utils/i18n'; |
| 1 | +import { WizardStepType } from '@patternfly/react-core'; |
| 2 | +import { t } from '@utils/i18n'; |
2 | 3 |
|
3 | 4 | export enum PlanWizardStepId {
|
4 | 5 | BasicSetUp = 'basic-set-up',
|
@@ -26,17 +27,22 @@ export const planStepNames: Record<PlanWizardStepId, string> = {
|
26 | 27 | [PlanWizardStepId.ReviewAndCreate]: t('Review and create'),
|
27 | 28 | };
|
28 | 29 |
|
29 |
| -export const planStepIndexes = Object.values(PlanWizardStepId).reduce( |
30 |
| - (acc, stepId, index) => ({ ...acc, [stepId]: index + 1 }), |
31 |
| - {}, |
32 |
| -); |
| 30 | +export const planStepOrder: Record<PlanWizardStepId, number> = { |
| 31 | + [PlanWizardStepId.BasicSetUp]: 1, |
| 32 | + [PlanWizardStepId.General]: 2, |
| 33 | + [PlanWizardStepId.VirtualMachines]: 3, |
| 34 | + [PlanWizardStepId.NetworkMapping]: 4, |
| 35 | + [PlanWizardStepId.StorageMapping]: 5, |
| 36 | + [PlanWizardStepId.MigrationType]: 6, |
| 37 | + [PlanWizardStepId.AdditionalSetUp]: 7, |
| 38 | + [PlanWizardStepId.OtherSettings]: 8, |
| 39 | + [PlanWizardStepId.Hooks]: 9, |
| 40 | + [PlanWizardStepId.ReviewAndCreate]: 10, |
| 41 | +}; |
33 | 42 |
|
34 |
| -export const defaultCurrentStep = { |
| 43 | +export const firstStep: WizardStepType = { |
35 | 44 | id: PlanWizardStepId.General,
|
36 | 45 | parentId: PlanWizardStepId.BasicSetUp,
|
37 | 46 | name: PlanWizardStepId.General,
|
38 |
| - index: planStepIndexes[PlanWizardStepId.General], |
| 47 | + index: planStepOrder[PlanWizardStepId.General], |
39 | 48 | };
|
40 |
| - |
41 |
| -export const warmMigrationLearnMoreLink = |
42 |
| - 'https://docs.redhat.com/en/documentation/migration_toolkit_for_virtualization/2.7/html-single/installing_and_using_the_migration_toolkit_for_virtualization/index#warm-migration_mtv'; |
|
0 commit comments