bfg-common 1.4.93 → 1.4.95

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.
@@ -102,16 +102,25 @@ const busLocal = computed<string>({
102
102
  })
103
103
  const busOptions = ref<UI_I_OptionItem[]>([])
104
104
  watch(
105
- () => props.guestMachineType,
106
- () => {
107
- if (props.guestMachineType) {
108
- busOptions.value = capabilities.bus[props.guestMachineType.value]
109
-
110
- const hasSelected = busOptions.value.some(option => option.value === busLocal.value)
111
- if (!hasSelected) busLocal.value = busOptions.value[0].value
105
+ () => props.guestMachineType,
106
+ () => {
107
+ if (props.guestMachineType) {
108
+ busOptions.value = capabilities.bus[props.guestMachineType.value]
109
+ // TODO временно так
110
+ if (props.shortOptions) {
111
+ busOptions.value = [
112
+ { text: localization.value.common.ide, value: 'ide' },
113
+ { text: localization.value.common.sata, value: 'sata' },
114
+ ]
112
115
  }
113
- },
114
- { immediate: true, deep: true }
116
+
117
+ const hasSelected = busOptions.value.some(
118
+ (option) => option.value === busLocal.value
119
+ )
120
+ if (!hasSelected) busLocal.value = busOptions.value[0].value
121
+ }
122
+ },
123
+ { immediate: true, deep: true }
115
124
  )
116
125
 
117
126
  const busValidationType = computed<string>(
@@ -20,11 +20,11 @@
20
20
  />
21
21
 
22
22
  <common-wizards-vm-migrate-select-target-server
23
- v-show="currentBlockId === 'select-target-center'"
23
+ v-if="false"
24
24
  />
25
25
 
26
26
  <common-wizards-vm-migrate-select-compute-resource
27
- v-show="currentBlockId === 'select-compute-resource'"
27
+ v-if="false"
28
28
  v-model="form"
29
29
  :submit="selectComputeResourceSubmit"
30
30
  :get-compute-resource-data="props.getComputeResourceData"
@@ -43,7 +43,7 @@
43
43
  />
44
44
 
45
45
  <common-wizards-vm-migrate-select-network
46
- v-if="currentBlockId === 'select-networks'"
46
+ v-if="false"
47
47
  v-model:is-basic-network-mode="
48
48
  dataFormLocal.selectNetwork.isShowNetworkBasic
49
49
  "
@@ -51,7 +51,7 @@
51
51
  />
52
52
 
53
53
  <common-wizards-vm-migrate-select-priority
54
- v-show="currentBlockId === 'select-motion-priority'"
54
+ v-if="false"
55
55
  v-model="selectedVMotionPriority"
56
56
  />
57
57
 
@@ -73,15 +73,18 @@ import Wizard from '~/components/atoms/wizard/lib/utils/utils'
73
73
  import {
74
74
  stepsFunc,
75
75
  stepsSchemeInitial,
76
- } from '~/components/common/wizards/datastore/add/lib/config/steps'
76
+ } from '~/components/common/wizards/vmNew/migrate/lib/config/steps'
77
77
 
78
78
  import type { UI_I_Localization } from '~/lib/models/interfaces'
79
79
  import type { UI_T_Project } from '~/lib/models/types'
80
- import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
80
+ import type {
81
+ UI_I_MigrateFormLocal,
82
+ UI_I_ChangeStepsSchemes,
83
+ } from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
84
+ import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
81
85
  import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
82
86
  import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
83
87
  import type { UI_I_VmSettings } from '~/lib/models/store/vm/interfaces'
84
- import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/lib/models/types'
85
88
  import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
86
89
  import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
87
90
  import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
@@ -98,8 +101,6 @@ const props = defineProps<{
98
101
  configurePerDisks: UI_I_StorageConfigurePerDiskItem[]
99
102
  computeResourceTableData?: any
100
103
  computeResourceTree?: UI_I_TreeNode
101
- readyCompleteTableInfo?: any // пока так потом если будет нужен изменит или удалить
102
- finishFunc: any
103
104
  }>()
104
105
  const emits = defineEmits<{
105
106
  (event: 'hide'): void
@@ -153,6 +154,29 @@ const validationFunc = async (
153
154
  const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
154
155
  wizard.changeSteps(value, validationFunc)
155
156
 
157
+ // Choosing Scheme
158
+ watch(
159
+ form.migrate_type,
160
+ (newValue: UI_T_VmMigrateType) => {
161
+ const schemes: UI_I_ChangeStepsSchemes = {
162
+ procurator: {
163
+ storage: 0,
164
+ },
165
+ sphere: {
166
+ storage: 0,
167
+ resource: 1,
168
+ },
169
+ }
170
+
171
+ const projectSchemes = schemes[props.project]
172
+
173
+ if (projectSchemes && projectSchemes[newValue] !== undefined) {
174
+ wizard.changeScheme(projectSchemes[newValue] as number)
175
+ }
176
+ },
177
+ { deep: true, immediate: true }
178
+ )
179
+
156
180
  const loading = ref<boolean>(false)
157
181
 
158
182
  const selectStorageSubmit = ref<number>(0)
@@ -165,8 +189,6 @@ const vmMigrateType = ref<UI_T_VmMigrateType>(
165
189
  )
166
190
  const dataReadyView = ref<UI_I_TableInfoItem[]>([])
167
191
 
168
- const currentBlockId = computed<string>(() => '')
169
-
170
192
  const connectedStorageIdOnVm = computed<string>(
171
193
  () => props.vmSettings?.storage.id || ''
172
194
  )
@@ -200,33 +222,4 @@ const onHideModal = (): void => {
200
222
  padding-left: 10px;
201
223
  }
202
224
  }
203
-
204
- //:deep(.has-solid.close-icon.clr-icon) {
205
- // width: 20px;
206
- // top: 0;
207
- //}
208
- //:deep(.modal .modal-dialog .modal-content .modal-footer) {
209
- // flex: unset;
210
- // height: unset;
211
- // min-height: unset;
212
- //}
213
- //:deep(.wizard-modal-titlebar h3) {
214
- // color: #000;
215
- // font-size: 24px;
216
- // font-weight: 200;
217
- // line-height: 27px;
218
- // margin: 0;
219
- // padding: 0;
220
- //}
221
- //:deep(.clr-wizard-stepnav-item) {
222
- // padding-left: 0;
223
- //}
224
- //:deep(.clr-wizard-stepnav
225
- // .clr-wizard-stepnav-item
226
- // button
227
- // .clr-wizard-stepnav-link-title) {
228
- // width: 189px;
229
- // font-weight: 700;
230
- // font-size: 13px;
231
- //}
232
225
  </style>
@@ -9,6 +9,12 @@ export interface UI_I_MigrateFormLocal {
9
9
  migrate_type: UI_T_VmMigrateType
10
10
  }
11
11
 
12
+ export interface UI_I_ChangeStepsSchemes {
13
+ [key: string]: {
14
+ [key in UI_T_VmMigrateType]?: number
15
+ }
16
+ }
17
+
12
18
  export interface UI_I_MigrateReadyBlockData extends UI_I_TableInfoItem {
13
19
  permissions: UI_T_VmMigrateSelectStorageTab[]
14
20
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.93",
4
+ "version": "1.4.95",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",