bfg-common 1.2.47 → 1.2.49
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.
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +9 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +1 -0
- package/package.json +1 -1
package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -187,6 +187,7 @@ const props = defineProps<{
|
|
|
187
187
|
maxCpus: number
|
|
188
188
|
maxMemory: number
|
|
189
189
|
isEdit: boolean
|
|
190
|
+
isClone: boolean
|
|
190
191
|
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
191
192
|
nodes: UI_I_FileTreeNode[]
|
|
192
193
|
files: UI_I_FileTreeNode[]
|
|
@@ -237,11 +238,11 @@ const hardDisks = ref<UI_I_SendDataNewHardDisk[]>([
|
|
|
237
238
|
watch(
|
|
238
239
|
() => props.hardDisks,
|
|
239
240
|
(newValue) => {
|
|
240
|
-
if (!props.isEdit || !newValue) return
|
|
241
|
+
if (!props.isEdit && !props.isClone || !newValue) return
|
|
241
242
|
|
|
242
243
|
const count = newValue?.length || 0
|
|
243
244
|
hardDisksIndex.value = [...Array(count).keys()]
|
|
244
|
-
hardDisksType.value = Array(count).fill('edit')
|
|
245
|
+
hardDisksType.value = Array(count).fill(props.isEdit ? 'edit' : 'new')
|
|
245
246
|
hardDisks.value = newValue
|
|
246
247
|
},
|
|
247
248
|
{ immediate: true }
|
|
@@ -319,13 +320,13 @@ const networksIndex = ref<number[]>([0])
|
|
|
319
320
|
watch(
|
|
320
321
|
() => props.networks,
|
|
321
322
|
(newValue) => {
|
|
322
|
-
if (!props.isEdit || !newValue) return
|
|
323
|
+
if (!props.isEdit && !props.isClone || !newValue) return
|
|
323
324
|
|
|
324
325
|
// networks.value = newValue
|
|
325
326
|
// networksType.value = Array(newValue.length).fill('edit')
|
|
326
327
|
const count = newValue?.length || 0
|
|
327
328
|
networksIndex.value = [...Array(count).keys()]
|
|
328
|
-
networksType.value = Array(count).fill('edit')
|
|
329
|
+
networksType.value = Array(count).fill(props.isEdit ? 'edit' : 'new')
|
|
329
330
|
networks.value = newValue
|
|
330
331
|
},
|
|
331
332
|
{ immediate: true }
|
|
@@ -371,13 +372,13 @@ const cdDvdDrivesType = ref<UI_T_CdDvdType[]>(['new'])
|
|
|
371
372
|
watch(
|
|
372
373
|
() => props.cdDvdDrives,
|
|
373
374
|
(newValue) => {
|
|
374
|
-
if (!props.isEdit || !newValue) return
|
|
375
|
+
if (!props.isEdit && !props.isClone || !newValue) return
|
|
375
376
|
|
|
376
377
|
// cdDvdDrives.value = newValue
|
|
377
378
|
// cdDvdDrivesType.value = Array(newValue.length).fill('edit')
|
|
378
379
|
const count = newValue?.length || 0
|
|
379
380
|
cdDvdDrivesIndex.value = [...Array(count).keys()]
|
|
380
|
-
cdDvdDrivesType.value = Array(count).fill('edit')
|
|
381
|
+
cdDvdDrivesType.value = Array(count).fill(props.isEdit ? 'edit' : 'new')
|
|
381
382
|
cdDvdDrives.value = newValue
|
|
382
383
|
},
|
|
383
384
|
{ immediate: true }
|
|
@@ -441,11 +442,11 @@ const pciDevices = ref<UI_I_PciDevice[]>([])
|
|
|
441
442
|
watch(
|
|
442
443
|
() => props.pciDevices,
|
|
443
444
|
(newValue) => {
|
|
444
|
-
if (!props.isEdit) return
|
|
445
|
+
if (!props.isEdit && !props.isClone) return
|
|
445
446
|
|
|
446
447
|
const count = newValue?.length || 0
|
|
447
448
|
pciDevicesIndex.value = [...Array(count).keys()]
|
|
448
|
-
pciDevicesType.value = Array(count).fill('edit')
|
|
449
|
+
pciDevicesType.value = Array(count).fill(props.isEdit ? 'edit' : 'new')
|
|
449
450
|
pciDevices.value = newValue || []
|
|
450
451
|
},
|
|
451
452
|
{ immediate: true }
|
|
@@ -267,6 +267,7 @@ const hardDiskTypeOptions = ref<UI_I_OptionItem[]>(
|
|
|
267
267
|
binaryOptionsFunc(localization.value)
|
|
268
268
|
)
|
|
269
269
|
|
|
270
|
+
console.log(props.hardDisk.size, 111);
|
|
270
271
|
const size = ref<number>(props.hardDisk.size) // Изначально всегда приходит в gb
|
|
271
272
|
const sizeInMb = computed<number>(() => {
|
|
272
273
|
if (hardDiskType.value === 'mb') {
|