bfg-common 1.1.55 → 1.1.56

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.
@@ -81,7 +81,8 @@
81
81
  @get-folders-or-files="emits('get-folders-or-files', $event)"
82
82
  @get-active-device-child="emits('get-active-device-child', $event)"
83
83
  @show-datastore-child="emits('show-datastore-child', $event)"
84
- @remove="onRemoveCdDvdDrive(cdDvdDrivesIndex[key])"
84
+ @remove="onRemoveCdDvdDrive(cdDvdDrivesIndex[key], item)"
85
+ @roll-back="onRollBackCdDvdDrive(cdDvdDrivesIndex[key])"
85
86
  @send-data="
86
87
  sendDataNewCdDvdDriveMethod($event, cdDvdDrivesIndex[key])
87
88
  "
@@ -369,8 +370,18 @@ const addCdDvdDrive = (): void => {
369
370
  cdDvdDrivesType.value.push('new')
370
371
  cdDvdDrives.value.push(useDeepCopy(defaultCdDvdDriver))
371
372
  }
372
- const onRemoveCdDvdDrive = (index: number): void => {
373
+ const onRemoveCdDvdDrive = (index: number, cdDvdDrive: UI_I_SendDataNewCdDvdDrive): void => {
373
374
  const removeIndex = cdDvdDrivesIndex.value.indexOf(index)
375
+
376
+ if (!cdDvdDrive.create && !cdDvdDrive.attach) {
377
+ cdDvdDrivesType.value = cdDvdDrivesType.value.map((item, key) => {
378
+ if (key === removeIndex) return 'removed'
379
+ return item
380
+ })
381
+ sendData()
382
+ return
383
+ }
384
+
374
385
  cdDvdDrivesIndex.value = cdDvdDrivesIndex.value.filter(
375
386
  (cdDvdDrive) => cdDvdDrive !== index
376
387
  )
@@ -384,6 +395,14 @@ const onRemoveCdDvdDrive = (index: number): void => {
384
395
  delete sendDataNewCdDvdDrive.value[index]
385
396
  sendData()
386
397
  }
398
+ const onRollBackCdDvdDrive = (index: number): void => {
399
+ const removeIndex = cdDvdDrivesIndex.value.indexOf(index)
400
+ cdDvdDrivesType.value = cdDvdDrivesType.value.map((item, key) => {
401
+ if (key === removeIndex) return 'edit'
402
+ return item
403
+ })
404
+ }
405
+
387
406
  const defaultPciDevice: UI_I_PciDevice = {
388
407
  id: '',
389
408
  vendor_name: '',
@@ -1,223 +1,274 @@
1
- <template>
2
- <div class="hardware-cd-dvd-drive">
3
- <atoms-stack-block
4
- :has-children="true"
5
- :removable="isRemovable"
6
- @remove="removeCdDvdDrive"
7
- >
8
- <template #stackBlockKey>
9
- <div
10
- class="vm-wizard-toggle-block-cd-dvd-drive vm-wizard-toggle-block-hard-disk"
11
- >
12
- <span>{{ label }}</span>
13
- </div>
14
- </template>
15
- <template #stackBlockContent>
16
- <div class="flex-align-center flex-space-between">
17
- <div class="select">
18
- <select
19
- id="vm-wizard-cd-dvd-drive-field"
20
- v-model="selectedCdDvdDrive"
21
- class="vm-wizard-cd-dvd-drive-field"
22
- @click.stop
23
- @change="changeCdDvdDrive"
24
- >
25
- <option
26
- v-for="(item, key) in cdDvdDriveOptions"
27
- :key="key"
28
- :value="item.value"
29
- >
30
- {{ item.text }}
31
- </option>
32
- </select>
33
- </div>
34
- </div>
35
- </template>
36
- <template #stackChildren>
37
- <common-vm-actions-add-customize-hardware-virtual-hardware-cd-dvd-drive-media
38
- v-if="selectedCdDvdDrive === 'datastoreIsoFile'"
39
- v-model:cd-dvd-media="cdDvdMedia"
40
- @browse="isShowFileModal = true"
41
- />
42
-
43
- <common-vm-actions-add-customize-hardware-virtual-hardware-bus
44
- v-model:bus="bus"
45
- :index="indexByHardDisks"
46
- :validation-type="busValidationType"
47
- :error-validation-fields="props.errorValidationFields"
48
- :disabled="isRunning"
49
- component-type="disk_devices"
50
- @remove-error-by-title="emits('remove-error-by-title', $event)"
51
- />
52
- </template>
53
- </atoms-stack-block>
54
-
55
- <Teleport to="body">
56
- <common-vm-actions-add-customize-hardware-virtual-hardware-browse-view
57
- v-if="isShowFileModal"
58
- :show="isShowFileModal"
59
- :file-types="fileTypes"
60
- :nodes="props.nodes"
61
- :files="props.files"
62
- @submit="onSelectFile"
63
- @get-storage="emits('get-storage', $event)"
64
- @get-folders-or-files="emits('get-folders-or-files', $event)"
65
- @get-active-device-child="emits('get-active-device-child', $event)"
66
- @show-datastore-child="emits('show-datastore-child', $event)"
67
- @hide="isShowFileModal = false"
68
- />
69
- </Teleport>
70
- </div>
71
- </template>
72
-
73
- <script lang="ts" setup>
74
- import { UI_I_FileTreeNode } from '~/components/models/interfaces'
75
- import { UI_I_TablePayload } from '~/models/store/interfaces'
76
- import { UI_T_CdDvdDrive } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/models/types'
77
- import { UI_I_SendDataNewCdDvdDrive } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/models/interfaces'
78
- import { UI_I_Localization, UI_I_HTMLSelectElement } from '~/models/interfaces'
79
- import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
80
- import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
81
- import { UI_I_FolderOrFileTreePayload } from '~/models/store/storage/interfaces'
82
- import { UI_T_CdDvdType } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/models/types'
83
- import { cdDvdDriveOptionsFunc } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/options'
84
- import { fileTypesFunc } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/fileTypes'
85
-
86
- const props = defineProps<{
87
- hardDisksCount: number
88
- index: number
89
- cdDvdDrive: UI_I_SendDataNewCdDvdDrive
90
- nodes: UI_I_FileTreeNode[]
91
- files: UI_I_FileTreeNode[]
92
- errorValidationFields: UI_I_ErrorValidationField<string>[]
93
- type: UI_T_CdDvdType
94
- isEdit: boolean
95
- state?: string
96
- }>()
97
-
98
- const emits = defineEmits<{
99
- (event: 'send-data', value: UI_I_SendDataNewCdDvdDrive): void
100
- (event: 'remove'): void
101
- (event: 'remove-error-by-title', value: string): void
102
- (event: 'get-storage', value: UI_I_TablePayload): void
103
- (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
104
- (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
105
- (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
106
- }>()
107
-
108
- const localization = computed<UI_I_Localization>(() => useLocal())
109
-
110
- const isRunning = computed<boolean>(() => {
111
- return props.state === '1'
112
- })
113
-
114
- const isRemovable = computed<boolean>(() => {
115
- return (
116
- !props.isEdit ||
117
- !isRunning.value ||
118
- (isRunning.value && bus.value === 'virtio')
119
- )
120
- })
121
-
122
- const indexByHardDisks = computed<number>(
123
- () => props.index + props.hardDisksCount
124
- )
125
-
126
- const label = computed<string>(() => {
127
- if (props.type === 'edit')
128
- return `${localization.value.cdDvdDrive} ${props.index + 1}`
129
-
130
- return `${localization.value.newCdDvdDrive} *`
131
- })
132
-
133
- const busValidationType = computed<string>(
134
- () => `disk_devices[${indexByHardDisks}].bus`
135
- )
136
-
137
- const selectedCdDvdDrive = ref<UI_T_CdDvdDrive>('clientDevice')
138
- const cdDvdDriveOptions = ref<UI_I_OptionItem[]>(
139
- cdDvdDriveOptionsFunc(localization.value)
140
- )
141
- const changeCdDvdDrive = (event: UI_I_HTMLSelectElement): void => {
142
- const isDatastoreIsoFile = event.target.value === 'datastoreIsoFile'
143
- if (!isDatastoreIsoFile) return
144
-
145
- isShowFileModal.value = true
146
- }
147
- const isShowFileModal = ref<boolean>(false)
148
- const onSelectFile = (file: UI_I_FileTreeNode): void => {
149
- cdDvdMedia.value = file.path
150
- }
151
- const fileTypes = computed<UI_I_OptionItem[]>(() =>
152
- fileTypesFunc(localization.value)
153
- )
154
-
155
- const removeCdDvdDrive = (): void => {
156
- emits('remove')
157
- }
158
-
159
- const cdDvdMedia = ref<string>('')
160
- const bus = ref<string>('ide')
161
-
162
- watch(
163
- [cdDvdMedia, bus],
164
- () => {
165
- if (!props.isEdit) {
166
- emits('send-data', {
167
- create: false,
168
- source: cdDvdMedia.value,
169
- bus: bus.value,
170
- device_type: 'cdrom',
171
- boot_order: -1,
172
- })
173
- return
174
- }
175
- emits('send-data', {
176
- create: false,
177
- source: cdDvdMedia.value,
178
- bus: bus.value,
179
- device_type: 'cdrom',
180
- boot_order: -1,
181
- size: 0,
182
- target: 'hda',
183
- storage_id: '',
184
- provision_type: 'thick',
185
- disk_mode: 'dependent',
186
- sharing: false,
187
- read_only: true,
188
- shares: 0,
189
- cache: 'none',
190
- io: 'native',
191
- limit_iops: 0,
192
- discard: 'unmap',
193
- })
194
- },
195
- { immediate: true }
196
- )
197
-
198
- // Добавляем данные для редактирования
199
- watch(
200
- () => props.cdDvdDrive,
201
- (newValue) => {
202
- if (newValue.source !== '') {
203
- selectedCdDvdDrive.value = 'datastoreIsoFile'
204
- cdDvdMedia.value = newValue.source
205
- }
206
- if (newValue.bus !== '') {
207
- bus.value = newValue.bus
208
- }
209
- },
210
- { immediate: true }
211
- )
212
- watch(
213
- isRunning,
214
- (newValue) => {
215
- if (newValue && props.type === 'new') {
216
- bus.value = 'virtio'
217
- }
218
- },
219
- { immediate: true }
220
- )
221
- </script>
222
-
223
- <style lang="scss" scoped></style>
1
+ <template>
2
+ <div class="hardware-cd-dvd-drive">
3
+ <atoms-stack-block
4
+ :has-children="true"
5
+ :is-roll-back="props.type === 'removed'"
6
+ :removable="isRemovable"
7
+ @remove="onRemoveCdDvdDrive"
8
+ @roll-back="onRollBackCdDvdDrive"
9
+ >
10
+ <template #stackBlockKey>
11
+ <div
12
+ class="vm-wizard-toggle-block-cd-dvd-drive vm-wizard-toggle-block-hard-disk"
13
+ >
14
+ <span>{{ label }}</span>
15
+ </div>
16
+ </template>
17
+ <template #stackBlockContent>
18
+ <div class="flex-align-center flex-space-between">
19
+ <template v-if="props.type === 'removed'">
20
+ <span>{{ localization.deviceWillRemoved }}</span>
21
+ <div class="flex-align-center">
22
+ <input
23
+ id="delete-files-from-datastore"
24
+ v-model="deleteFilesFromDatastore"
25
+ :disabled="props.disabled"
26
+ type="checkbox"
27
+ class="pointer"
28
+ @click.stop
29
+ />
30
+ <label
31
+ for="delete-files-from-datastore"
32
+ :class="[
33
+ 'label-text-normal pointer',
34
+ props.disabled && 'div-disabled',
35
+ ]"
36
+ >{{ localization.deleteFilesFromDatastore }}</label
37
+ >
38
+ </div>
39
+ </template>
40
+ <template v-else>
41
+ <div class="select">
42
+ <select
43
+ id="vm-wizard-cd-dvd-drive-field"
44
+ v-model="selectedCdDvdDrive"
45
+ class="vm-wizard-cd-dvd-drive-field"
46
+ @click.stop
47
+ @change="changeCdDvdDrive"
48
+ >
49
+ <option
50
+ v-for="(item, key) in cdDvdDriveOptions"
51
+ :key="key"
52
+ :value="item.value"
53
+ >
54
+ {{ item.text }}
55
+ </option>
56
+ </select>
57
+ </div>
58
+ </template>
59
+ </div>
60
+ </template>
61
+ <template #stackChildren>
62
+ <common-vm-actions-add-customize-hardware-virtual-hardware-cd-dvd-drive-media
63
+ v-if="selectedCdDvdDrive === 'datastoreIsoFile'"
64
+ v-model:cd-dvd-media="cdDvdMedia"
65
+ @browse="isShowFileModal = true"
66
+ />
67
+
68
+ <common-vm-actions-add-customize-hardware-virtual-hardware-bus
69
+ v-model:bus="bus"
70
+ :index="indexByHardDisks"
71
+ :validation-type="busValidationType"
72
+ :error-validation-fields="props.errorValidationFields"
73
+ :disabled="isRunning"
74
+ component-type="disk_devices"
75
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
76
+ />
77
+ </template>
78
+ </atoms-stack-block>
79
+
80
+ <Teleport to="body">
81
+ <common-vm-actions-add-customize-hardware-virtual-hardware-browse-view
82
+ v-if="isShowFileModal"
83
+ :show="isShowFileModal"
84
+ :file-types="fileTypes"
85
+ :nodes="props.nodes"
86
+ :files="props.files"
87
+ @submit="onSelectFile"
88
+ @get-storage="emits('get-storage', $event)"
89
+ @get-folders-or-files="emits('get-folders-or-files', $event)"
90
+ @get-active-device-child="emits('get-active-device-child', $event)"
91
+ @show-datastore-child="emits('show-datastore-child', $event)"
92
+ @hide="isShowFileModal = false"
93
+ />
94
+ </Teleport>
95
+ </div>
96
+ </template>
97
+
98
+ <script lang="ts" setup>
99
+ import { UI_I_FileTreeNode } from '~/components/models/interfaces'
100
+ import { UI_I_TablePayload } from '~/models/store/interfaces'
101
+ import { UI_T_CdDvdDrive } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/models/types'
102
+ import { UI_I_SendDataNewCdDvdDrive } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/models/interfaces'
103
+ import { UI_I_Localization, UI_I_HTMLSelectElement } from '~/models/interfaces'
104
+ import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
105
+ import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
106
+ import { UI_I_FolderOrFileTreePayload } from '~/models/store/storage/interfaces'
107
+ import { UI_T_CdDvdType } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/models/types'
108
+ import { cdDvdDriveOptionsFunc } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/options'
109
+ import { fileTypesFunc } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/fileTypes'
110
+
111
+ const props = defineProps<{
112
+ hardDisksCount: number
113
+ index: number
114
+ cdDvdDrive: UI_I_SendDataNewCdDvdDrive
115
+ nodes: UI_I_FileTreeNode[]
116
+ files: UI_I_FileTreeNode[]
117
+ errorValidationFields: UI_I_ErrorValidationField<string>[]
118
+ type: UI_T_CdDvdType
119
+ isEdit: boolean
120
+ state?: string
121
+ }>()
122
+
123
+ const emits = defineEmits<{
124
+ (event: 'send-data', value: UI_I_SendDataNewCdDvdDrive): void
125
+ (event: 'remove'): void
126
+ (event: 'roll-back'): void
127
+ (event: 'remove-error-by-title', value: string): void
128
+ (event: 'get-storage', value: UI_I_TablePayload): void
129
+ (event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
130
+ (event: 'get-active-device-child', value: UI_I_FileTreeNode): void
131
+ (event: 'show-datastore-child', value: UI_I_FileTreeNode): void
132
+ }>()
133
+
134
+ const localization = computed<UI_I_Localization>(() => useLocal())
135
+
136
+ const isRunning = computed<boolean>(() => {
137
+ return props.state === '1'
138
+ })
139
+
140
+ const isRemovable = computed<boolean>(() => {
141
+ return (
142
+ !props.isEdit ||
143
+ !isRunning.value ||
144
+ (isRunning.value && bus.value === 'virtio')
145
+ )
146
+ })
147
+
148
+ const indexByHardDisks = computed<number>(
149
+ () => props.index + props.hardDisksCount
150
+ )
151
+
152
+ const label = computed<string>(() => {
153
+ if (props.type === 'edit' || props.type === 'removed')
154
+ return `${localization.value.cdDvdDrive} ${props.index + 1}`
155
+
156
+ return `${localization.value.newCdDvdDrive} *`
157
+ })
158
+
159
+ const busValidationType = computed<string>(
160
+ () => `disk_devices[${indexByHardDisks}].bus`
161
+ )
162
+
163
+ const selectedCdDvdDrive = ref<UI_T_CdDvdDrive>('clientDevice')
164
+ const cdDvdDriveOptions = ref<UI_I_OptionItem[]>(
165
+ cdDvdDriveOptionsFunc(localization.value)
166
+ )
167
+ const changeCdDvdDrive = (event: UI_I_HTMLSelectElement): void => {
168
+ const isDatastoreIsoFile = event.target.value === 'datastoreIsoFile'
169
+ if (!isDatastoreIsoFile) return
170
+
171
+ isShowFileModal.value = true
172
+ }
173
+ const isShowFileModal = ref<boolean>(false)
174
+ const onSelectFile = (file: UI_I_FileTreeNode): void => {
175
+ cdDvdMedia.value = file.path
176
+ }
177
+ const fileTypes = computed<UI_I_OptionItem[]>(() =>
178
+ fileTypesFunc(localization.value)
179
+ )
180
+
181
+ const onRemoveCdDvdDrive = (): void => {
182
+ emits('remove')
183
+ }
184
+ const onRollBackCdDvdDrive = (): void => {
185
+ emits('roll-back')
186
+ }
187
+
188
+ const cdDvdMedia = ref<string>('')
189
+ const bus = ref<string>('ide')
190
+
191
+ const deleteFilesFromDatastore = ref<boolean>(false)
192
+
193
+ watch(
194
+ [cdDvdMedia, bus, deleteFilesFromDatastore, , () => props.type],
195
+ () => {
196
+ emits('send-data', {
197
+ create: props.cdDvdDrive.create,
198
+ attach: props.cdDvdDrive.attach,
199
+ source: cdDvdMedia.value,
200
+ size: 0,
201
+ bus: bus.value,
202
+ device_type: 'cdrom',
203
+ provision_type: 'thick',
204
+ disk_mode: 'dependent',
205
+ sharing: false,
206
+ read_only: true,
207
+ shares: 0,
208
+ cache: 'none',
209
+ io: 'native',
210
+ limit_iops: 0,
211
+ discard: 'unmap',
212
+ boot_order: -1,
213
+ detach: props.type === 'removed',
214
+ remove: props.type === 'removed' && deleteFilesFromDatastore.value, // Проверяем если удалили диск и указали Delete files from datastore
215
+ })
216
+ // if (!props.isEdit) {
217
+ // emits('send-data', {
218
+ // create: false,
219
+ // source: cdDvdMedia.value,
220
+ // bus: bus.value,
221
+ // device_type: 'cdrom',
222
+ // boot_order: -1,
223
+ // })
224
+ // return
225
+ // }
226
+ // emits('send-data', {
227
+ // create: false,
228
+ // source: cdDvdMedia.value,
229
+ // bus: bus.value,
230
+ // device_type: 'cdrom',
231
+ // boot_order: -1,
232
+ // size: 0,
233
+ // target: 'hda',
234
+ // storage_id: '',
235
+ // provision_type: 'thick',
236
+ // disk_mode: 'dependent',
237
+ // sharing: false,
238
+ // read_only: true,
239
+ // shares: 0,
240
+ // cache: 'none',
241
+ // io: 'native',
242
+ // limit_iops: 0,
243
+ // discard: 'unmap',
244
+ // })
245
+ },
246
+ { immediate: true }
247
+ )
248
+
249
+ // Добавляем данные для редактирования
250
+ watch(
251
+ () => props.cdDvdDrive,
252
+ (newValue) => {
253
+ if (newValue.source !== '') {
254
+ selectedCdDvdDrive.value = 'datastoreIsoFile'
255
+ cdDvdMedia.value = newValue.source
256
+ }
257
+ if (newValue.bus !== '') {
258
+ bus.value = newValue.bus
259
+ }
260
+ },
261
+ { immediate: true }
262
+ )
263
+ watch(
264
+ isRunning,
265
+ (newValue) => {
266
+ if (newValue && props.type === 'new') {
267
+ bus.value = 'virtio'
268
+ }
269
+ },
270
+ { immediate: true }
271
+ )
272
+ </script>
273
+
274
+ <style lang="scss" scoped></style>
@@ -288,6 +288,7 @@ watch(
288
288
  reservation,
289
289
  reservationType,
290
290
  limit,
291
+ limitType,
291
292
  shares,
292
293
  selectedCpu,
293
294
  selectedMaxCpu,
@@ -187,17 +187,19 @@ const limitErrorLocalText = computed<string>(() => {
187
187
  return localization.value.inputContainsInvalidCharacters
188
188
  }
189
189
 
190
- const value = $binary.universalFromTo(
190
+ if (limitLocal.value !== 'Unlimited') {
191
+ const value = $binary.universalFromTo(
191
192
  +limitLocal.value,
192
193
  limitTypeLocal.value,
193
194
  binaryKeys[0],
194
195
  0
195
- )
196
- if (value % props.multiply !== 0) {
197
- return localization.value.valueShouldMultiple.replace(
198
- '{0}',
199
- `${props.multiply} ${binaryKeys[0].toUpperCase()}`
200
196
  )
197
+ if (value % props.multiply !== 0) {
198
+ return localization.value.valueShouldMultiple.replace(
199
+ '{0}',
200
+ `${props.multiply} ${binaryKeys[0].toUpperCase()}`
201
+ )
202
+ }
201
203
  }
202
204
 
203
205
  return ''
@@ -244,7 +244,8 @@ const reserveGuestMemory = ref<boolean>(false)
244
244
  const limit = ref<string>('Unlimited')
245
245
  watch(limit, (newValue) => {
246
246
  const valueInt = parseInt('' + newValue)
247
- limit.value !== 'Unlimited' && (limit.value = isNaN(valueInt) ? '0' : '' + valueInt)
247
+ limit.value !== 'Unlimited' &&
248
+ (limit.value = isNaN(valueInt) ? '0' : '' + valueInt)
248
249
  })
249
250
  const limitType = ref<string>('mb')
250
251
  const limitOptions = computed<UI_I_OptionItem[] | undefined>(() => {
@@ -265,7 +266,7 @@ watch(isDisabledMemoryHotPlug, (newValue) => {
265
266
  })
266
267
 
267
268
  watch(
268
- [memoryInMb, memoryHotPlug, reservation, reservationType, limit],
269
+ [memoryInMb, memoryHotPlug, reservation, reservationType, limit, limitType],
269
270
  () => {
270
271
  const reservationInMb =
271
272
  reservationType.value === 'mb'
@@ -277,11 +278,17 @@ watch(
277
278
  'mb',
278
279
  12
279
280
  )
281
+ const limitInMb =
282
+ limit.value === 'Unlimited'
283
+ ? limit.value
284
+ : limitType.value === 'gb'
285
+ ? $binary.gbToMb(+limit.value)
286
+ : +limit.value
280
287
  emits('send-data', {
281
288
  memory: '' + memoryInMb.value,
282
289
  hotplug: memoryHotPlug.value,
283
290
  reservation_mb: reservationInMb,
284
- limit_mb: limit.value,
291
+ limit_mb: limitInMb,
285
292
  })
286
293
  },
287
294
  { immediate: true }
@@ -1,4 +1,4 @@
1
1
  export type UI_T_HardDiskType = 'new' | 'edit' | 'exist' | 'removed'
2
2
  export type UI_T_PciDeviceType = 'new' | 'edit'
3
3
  export type UI_T_NetworkType = 'new' | 'edit'
4
- export type UI_T_CdDvdType = 'new' | 'edit'
4
+ export type UI_T_CdDvdType = 'new' | 'edit' | 'removed'
@@ -383,7 +383,7 @@ watch(
383
383
  discard: discard.value,
384
384
  capacity: sizeInMb.value,
385
385
  boot_order: -1,
386
- detach: props.type === 'removed' && !deleteFilesFromDatastore.value, // Проверяем если удалили диск но не указали Delete files from datastore
386
+ detach: props.type === 'removed',
387
387
  remove: props.type === 'removed' && deleteFilesFromDatastore.value, // Проверяем если удалили диск и указали Delete files from datastore
388
388
  })
389
389
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.55",
4
+ "version": "1.1.56",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",