bfg-common 1.2.210 → 1.2.211

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,7 +129,8 @@
129
129
  v-model="filterShow[key]"
130
130
  :test-id="`${props.testId}-filter`"
131
131
  top="100%"
132
- right="0"
132
+ :left="key === 0 && 0"
133
+ :right="key !== 0 && 0"
133
134
  >
134
135
  <input
135
136
  :id="`${props.testId}-filter-input-${key}`"
@@ -179,7 +179,10 @@ import type {
179
179
  import type { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
180
180
  import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/models/types'
181
181
  import { capabilities } from '~/components/common/vm/actions/common/config/capabilities'
182
- import { wizardSteps } from '~/components/common/vm/actions/add/utils'
182
+ import {
183
+ stepsSchemeInitial,
184
+ stepsFunc,
185
+ } from '~/components/common/vm/actions/add/config/steps'
183
186
  import Wizard from '~/components/atoms/wizard/utils/utils'
184
187
 
185
188
  const props = defineProps<{
@@ -228,10 +231,10 @@ const { $recursion } = useNuxtApp()
228
231
 
229
232
  const localization = computed<UI_I_Localization>(() => useLocal())
230
233
 
231
- const wizard: Wizard = new Wizard(wizardSteps(localization.value), [
232
- [0, 1, 4, 5, 6, 8, 9], // Procurator
233
- [0, 2, 3, 4, 5, 7, 8, 9], // Sphere
234
- ])
234
+ const wizard: Wizard = new Wizard(
235
+ stepsFunc(localization.value),
236
+ stepsSchemeInitial
237
+ )
235
238
  if (props.project === 'sphere') wizard.changeScheme(1)
236
239
  const wasCompleted = computed<boolean>(() => wizard.wasCompleted())
237
240
  const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
@@ -0,0 +1,125 @@
1
+ import type { UI_I_Localization } from '~/models/interfaces'
2
+ import type { UI_I_WizardStep } from '~/components/atoms/wizard/models/interfaces'
3
+ import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/models/enums'
4
+
5
+ export const stepsFunc = (
6
+ localization: UI_I_Localization
7
+ ): UI_I_WizardStep[] => {
8
+ return [
9
+ {
10
+ id: 0,
11
+ stepName: '',
12
+ title: localization.selectCreationType,
13
+ subTitle: localization.howWouldLikeCreateVirtualMachine,
14
+ status: UI_E_WIZARD_STATUS.SELECTED,
15
+ isValid: true,
16
+ fields: {},
17
+ },
18
+ // Procurator
19
+ {
20
+ id: 1,
21
+ stepName: '',
22
+ title: localization.selectName,
23
+ subTitle: localization.specifyUniqueName,
24
+ status: UI_E_WIZARD_STATUS.INACTIVE,
25
+ isValid: true,
26
+ fields: {
27
+ name: {
28
+ field: '',
29
+ alert: '',
30
+ },
31
+ },
32
+ },
33
+ // Sphere
34
+ {
35
+ id: 2,
36
+ stepName: '',
37
+ title: localization.selectNameFolder,
38
+ subTitle: localization.specifyUniqueNameTargetLocation,
39
+ status: UI_E_WIZARD_STATUS.INACTIVE,
40
+ isValid: true,
41
+ fields: {},
42
+ },
43
+ // Sphere
44
+ {
45
+ id: 3,
46
+ stepName: '',
47
+ title: localization.selectComputeResource,
48
+ subTitle: localization.selectDestinationComputeResourceOperation,
49
+ status: UI_E_WIZARD_STATUS.INACTIVE,
50
+ isValid: true,
51
+ fields: {},
52
+ },
53
+ {
54
+ id: 4,
55
+ stepName: '',
56
+ title: localization.selectStorage,
57
+ subTitle: localization.selectStorageConfigurationDiskFiles,
58
+ status: UI_E_WIZARD_STATUS.INACTIVE,
59
+ isValid: true,
60
+ fields: {
61
+ storage: {
62
+ field: '',
63
+ alert: '',
64
+ },
65
+ },
66
+ },
67
+ {
68
+ id: 5,
69
+ stepName: '',
70
+ title: localization.compatibility,
71
+ subTitle: localization.selectCompatibilityVmDependingHostsEnvironment,
72
+ status: UI_E_WIZARD_STATUS.INACTIVE,
73
+ isValid: true,
74
+ fields: {},
75
+ },
76
+ // Procurator
77
+ {
78
+ id: 6,
79
+ stepName: '',
80
+ title: localization.selectGuestOSMachineType,
81
+ subTitle: localization.chooseGuestOSInstalledVmAndMachineTypeUsedCreateVm,
82
+ status: UI_E_WIZARD_STATUS.INACTIVE,
83
+ isValid: true,
84
+ fields: {},
85
+ },
86
+ // Sphere
87
+ {
88
+ id: 7,
89
+ stepName: '',
90
+ title: localization.selectGuestOS,
91
+ subTitle: localization.chooseGuestOSInstalledVM,
92
+ status: UI_E_WIZARD_STATUS.INACTIVE,
93
+ isValid: true,
94
+ fields: {},
95
+ },
96
+ {
97
+ id: 8,
98
+ stepName: '',
99
+ title: localization.customizeHardware,
100
+ subTitle: localization.configureVirtualMachineHardware,
101
+ status: UI_E_WIZARD_STATUS.INACTIVE,
102
+ isValid: true,
103
+ fields: {
104
+ customizeHardware: {
105
+ field: '',
106
+ alert: '',
107
+ },
108
+ },
109
+ },
110
+ {
111
+ id: 9,
112
+ stepName: '',
113
+ title: localization.readyComplete,
114
+ subTitle: localization.clickFinishStartCreation,
115
+ status: UI_E_WIZARD_STATUS.INACTIVE,
116
+ isValid: true,
117
+ fields: {},
118
+ },
119
+ ]
120
+ }
121
+
122
+ export const stepsSchemeInitial = [
123
+ [0, 1, 4, 5, 6, 8, 9], // Procurator
124
+ [0, 2, 3, 4, 5, 7, 8, 9], // Sphere
125
+ ]
@@ -1,222 +1,102 @@
1
- import type { UI_I_WizardStep } from '~/components/atoms/wizard/models/interfaces'
2
-
3
- import { UI_E_Fields } from '~/components/common/vm/actions/common/models/enums'
4
- import { UI_I_Localization } from '~/models/interfaces'
5
- import { UI_I_VerticalStepItem } from '~/components/atoms/models/interfaces'
6
- import { UI_T_Project } from '~/models/types'
7
- import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/models/enums'
8
- import { checkAllField } from '~/components/common/vm/actions/utils'
9
-
10
- export const getStepPositionByField = (field: string): number => {
11
- if (checkAllField(field)) {
12
- return UI_E_Fields[field]
13
- } else if (field.includes('disk_devices')) {
14
- return UI_E_Fields.disk_devices
15
- } else if (field.includes('network_devices')) {
16
- return UI_E_Fields.network_devices
17
- }
18
- return 5
19
- }
20
-
21
- export const stepItemsFunc = (
22
- localization: UI_I_Localization,
23
- project: UI_T_Project
24
- ): UI_I_VerticalStepItem[] => {
25
- if (project === 'sphere') {
26
- return [
27
- {
28
- text: localization.selectCreationType,
29
- disabled: false,
30
- complete: false,
31
- },
32
- {
33
- text: localization.selectNameFolder,
34
- disabled: true,
35
- complete: false,
36
- },
37
- {
38
- text: localization.selectComputeResource,
39
- disabled: true,
40
- complete: false,
41
- },
42
- { text: localization.selectStorage, disabled: true, complete: false },
43
- { text: localization.compatibility, disabled: true, complete: false },
44
- { text: localization.selectGuestOS, disabled: true, complete: false },
45
- {
46
- text: localization.customizeHardware,
47
- disabled: true,
48
- complete: false,
49
- },
50
- { text: localization.readyComplete, disabled: true, complete: false },
51
- ]
52
- }
53
- return [
54
- {
55
- text: localization.selectCreationType,
56
- disabled: false,
57
- complete: false,
58
- },
59
- {
60
- text: localization.selectName,
61
- disabled: true,
62
- complete: false,
63
- },
64
- { text: localization.selectStorage, disabled: true, complete: false },
65
- { text: localization.compatibility, disabled: true, complete: false },
66
- {
67
- text: localization.selectGuestOSMachineType,
68
- disabled: true,
69
- complete: false,
70
- },
71
- {
72
- text: localization.customizeHardware,
73
- disabled: true,
74
- complete: false,
75
- },
76
- { text: localization.readyComplete, disabled: true, complete: false },
77
- ]
78
- }
79
-
80
- export const subTitleFunc = (
81
- localization: UI_I_Localization,
82
- project: UI_T_Project
83
- ): string[] => {
84
- if (project === 'sphere') {
85
- return [
86
- localization.howWouldLikeCreateVirtualMachine,
87
- localization.specifyUniqueNameTargetLocation,
88
- localization.selectDestinationComputeResourceOperation,
89
- localization.selectStorageConfigurationDiskFiles,
90
- localization.selectCompatibilityVmDependingHostsEnvironment,
91
- localization.chooseGuestOSInstalledVM,
92
- localization.configureVirtualMachineHardware,
93
- localization.clickFinishStartCreation,
94
- ]
95
- }
96
- return [
97
- localization.howWouldLikeCreateVirtualMachine,
98
- localization.specifyUniqueName,
99
- localization.selectStorageConfigurationDiskFiles,
100
- localization.selectCompatibilityVmDependingHostsEnvironment,
101
- localization.chooseGuestOSInstalledVmAndMachineTypeUsedCreateVm,
102
- localization.configureVirtualMachineHardware,
103
- localization.clickFinishStartCreation,
104
- ]
105
- }
106
-
107
- export const wizardSteps = (
108
- localization: UI_I_Localization
109
- ): UI_I_WizardStep[] => {
110
- return [
111
- {
112
- id: 0,
113
- stepName: '',
114
- title: localization.selectCreationType,
115
- subTitle: localization.howWouldLikeCreateVirtualMachine,
116
- status: UI_E_WIZARD_STATUS.SELECTED,
117
- isValid: true,
118
- fields: {},
119
- },
120
- // Procurator
121
- {
122
- id: 1,
123
- stepName: '',
124
- title: localization.selectName,
125
- subTitle: localization.specifyUniqueName,
126
- status: UI_E_WIZARD_STATUS.INACTIVE,
127
- isValid: true,
128
- fields: {
129
- name: {
130
- field: '',
131
- alert: '',
132
- },
133
- },
134
- },
135
- // Sphere
136
- {
137
- id: 2,
138
- stepName: '',
139
- title: localization.selectNameFolder,
140
- subTitle: localization.specifyUniqueNameTargetLocation,
141
- status: UI_E_WIZARD_STATUS.INACTIVE,
142
- isValid: true,
143
- fields: {},
144
- },
145
- // Sphere
146
- {
147
- id: 3,
148
- stepName: '',
149
- title: localization.selectComputeResource,
150
- subTitle: localization.selectDestinationComputeResourceOperation,
151
- status: UI_E_WIZARD_STATUS.INACTIVE,
152
- isValid: true,
153
- fields: {},
154
- },
155
- {
156
- id: 4,
157
- stepName: '',
158
- title: localization.selectStorage,
159
- subTitle: localization.selectStorageConfigurationDiskFiles,
160
- status: UI_E_WIZARD_STATUS.INACTIVE,
161
- isValid: true,
162
- fields: {
163
- storage: {
164
- field: '',
165
- alert: '',
166
- },
167
- },
168
- },
169
- {
170
- id: 5,
171
- stepName: '',
172
- title: localization.compatibility,
173
- subTitle: localization.selectCompatibilityVmDependingHostsEnvironment,
174
- status: UI_E_WIZARD_STATUS.INACTIVE,
175
- isValid: true,
176
- fields: {},
177
- },
178
- // Procurator
179
- {
180
- id: 6,
181
- stepName: '',
182
- title: localization.selectGuestOSMachineType,
183
- subTitle: localization.chooseGuestOSInstalledVmAndMachineTypeUsedCreateVm,
184
- status: UI_E_WIZARD_STATUS.INACTIVE,
185
- isValid: true,
186
- fields: {},
187
- },
188
- // Sphere
189
- {
190
- id: 7,
191
- stepName: '',
192
- title: localization.selectGuestOS,
193
- subTitle: localization.chooseGuestOSInstalledVM,
194
- status: UI_E_WIZARD_STATUS.INACTIVE,
195
- isValid: true,
196
- fields: {},
197
- },
198
- {
199
- id: 8,
200
- stepName: '',
201
- title: localization.customizeHardware,
202
- subTitle: localization.configureVirtualMachineHardware,
203
- status: UI_E_WIZARD_STATUS.INACTIVE,
204
- isValid: true,
205
- fields: {
206
- customizeHardware: {
207
- field: '',
208
- alert: '',
209
- },
210
- },
211
- },
212
- {
213
- id: 9,
214
- stepName: '',
215
- title: localization.readyComplete,
216
- subTitle: localization.clickFinishStartCreation,
217
- status: UI_E_WIZARD_STATUS.INACTIVE,
218
- isValid: true,
219
- fields: {},
220
- },
221
- ]
222
- }
1
+ import type { UI_I_Localization } from '~/models/interfaces'
2
+ import type { UI_I_VerticalStepItem } from '~/components/atoms/models/interfaces'
3
+ import type { UI_T_Project } from '~/models/types'
4
+ import { UI_E_Fields } from '~/components/common/vm/actions/common/models/enums'
5
+ import { checkAllField } from '~/components/common/vm/actions/utils'
6
+
7
+ export const getStepPositionByField = (field: string): number => {
8
+ if (checkAllField(field)) {
9
+ return UI_E_Fields[field]
10
+ } else if (field.includes('disk_devices')) {
11
+ return UI_E_Fields.disk_devices
12
+ } else if (field.includes('network_devices')) {
13
+ return UI_E_Fields.network_devices
14
+ }
15
+ return 5
16
+ }
17
+
18
+ export const stepItemsFunc = (
19
+ localization: UI_I_Localization,
20
+ project: UI_T_Project
21
+ ): UI_I_VerticalStepItem[] => {
22
+ if (project === 'sphere') {
23
+ return [
24
+ {
25
+ text: localization.selectCreationType,
26
+ disabled: false,
27
+ complete: false,
28
+ },
29
+ {
30
+ text: localization.selectNameFolder,
31
+ disabled: true,
32
+ complete: false,
33
+ },
34
+ {
35
+ text: localization.selectComputeResource,
36
+ disabled: true,
37
+ complete: false,
38
+ },
39
+ { text: localization.selectStorage, disabled: true, complete: false },
40
+ { text: localization.compatibility, disabled: true, complete: false },
41
+ { text: localization.selectGuestOS, disabled: true, complete: false },
42
+ {
43
+ text: localization.customizeHardware,
44
+ disabled: true,
45
+ complete: false,
46
+ },
47
+ { text: localization.readyComplete, disabled: true, complete: false },
48
+ ]
49
+ }
50
+ return [
51
+ {
52
+ text: localization.selectCreationType,
53
+ disabled: false,
54
+ complete: false,
55
+ },
56
+ {
57
+ text: localization.selectName,
58
+ disabled: true,
59
+ complete: false,
60
+ },
61
+ { text: localization.selectStorage, disabled: true, complete: false },
62
+ { text: localization.compatibility, disabled: true, complete: false },
63
+ {
64
+ text: localization.selectGuestOSMachineType,
65
+ disabled: true,
66
+ complete: false,
67
+ },
68
+ {
69
+ text: localization.customizeHardware,
70
+ disabled: true,
71
+ complete: false,
72
+ },
73
+ { text: localization.readyComplete, disabled: true, complete: false },
74
+ ]
75
+ }
76
+
77
+ export const subTitleFunc = (
78
+ localization: UI_I_Localization,
79
+ project: UI_T_Project
80
+ ): string[] => {
81
+ if (project === 'sphere') {
82
+ return [
83
+ localization.howWouldLikeCreateVirtualMachine,
84
+ localization.specifyUniqueNameTargetLocation,
85
+ localization.selectDestinationComputeResourceOperation,
86
+ localization.selectStorageConfigurationDiskFiles,
87
+ localization.selectCompatibilityVmDependingHostsEnvironment,
88
+ localization.chooseGuestOSInstalledVM,
89
+ localization.configureVirtualMachineHardware,
90
+ localization.clickFinishStartCreation,
91
+ ]
92
+ }
93
+ return [
94
+ localization.howWouldLikeCreateVirtualMachine,
95
+ localization.specifyUniqueName,
96
+ localization.selectStorageConfigurationDiskFiles,
97
+ localization.selectCompatibilityVmDependingHostsEnvironment,
98
+ localization.chooseGuestOSInstalledVmAndMachineTypeUsedCreateVm,
99
+ localization.configureVirtualMachineHardware,
100
+ localization.clickFinishStartCreation,
101
+ ]
102
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.210",
4
+ "version": "1.2.211",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",