bfg-common 1.1.53 → 1.1.55
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/add/customizeHardware/virtualHardware/VirtualHardware.vue +3 -2
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +2 -0
- package/components/common/vm/actions/editSettings/utils.ts +1 -1
- package/package.json +1 -1
package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue
CHANGED
|
@@ -251,7 +251,8 @@ const addHardDisk = (
|
|
|
251
251
|
hardDisksIndex.value.push(newIndex)
|
|
252
252
|
hardDisksType.value.push(type)
|
|
253
253
|
|
|
254
|
-
hardDisks.value.push({ create, size, source })
|
|
254
|
+
hardDisks.value.push({ create, size, source, attach: props.isEdit })
|
|
255
|
+
sendData()
|
|
255
256
|
}
|
|
256
257
|
const onAddExistHardDisk = (hardDisk: UI_I_HardDisk): void => {
|
|
257
258
|
addHardDisk(false, $binary.bToGb(hardDisk.size), hardDisk.path, 'exist')
|
|
@@ -259,7 +260,7 @@ const onAddExistHardDisk = (hardDisk: UI_I_HardDisk): void => {
|
|
|
259
260
|
const onRemoveHardDisk = (index: number, hardDisk: UI_I_SendDataNewHardDisk): void => {
|
|
260
261
|
const removeIndex = hardDisksIndex.value.indexOf(index)
|
|
261
262
|
|
|
262
|
-
if (!hardDisk.create) {
|
|
263
|
+
if (!hardDisk.create && !hardDisk.attach) {
|
|
263
264
|
hardDisksType.value = hardDisksType.value.map((item, key) => {
|
|
264
265
|
if (key === removeIndex) return 'removed'
|
|
265
266
|
return item
|
|
@@ -345,6 +345,7 @@ watch(
|
|
|
345
345
|
diskMode,
|
|
346
346
|
cache,
|
|
347
347
|
bus,
|
|
348
|
+
deleteFilesFromDatastore,
|
|
348
349
|
() => props.type,
|
|
349
350
|
],
|
|
350
351
|
() => {
|
|
@@ -364,6 +365,7 @@ watch(
|
|
|
364
365
|
|
|
365
366
|
emits('send-data', {
|
|
366
367
|
create: props.hardDisk.create,
|
|
368
|
+
attach: props.hardDisk.attach,
|
|
367
369
|
source: props.hardDisk.source,
|
|
368
370
|
size: sizeInMb.value,
|
|
369
371
|
bus: bus.value,
|
|
@@ -37,7 +37,7 @@ export const constructDiskDevicesFunc = (
|
|
|
37
37
|
io: disk.io ?? '',
|
|
38
38
|
limit_iops: disk.limit_iops ?? 0,
|
|
39
39
|
discard: disk.discard ?? '',
|
|
40
|
-
attach: disk.attach ??
|
|
40
|
+
attach: disk.attach ?? true,
|
|
41
41
|
detach: disk.detach ?? false,
|
|
42
42
|
remove: disk.remove ?? false,
|
|
43
43
|
create: disk.create ?? true,
|