bfg-common 1.1.97 → 1.1.99

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.
@@ -55,6 +55,7 @@
55
55
  :networks="props.networksForBootOptions"
56
56
  :options="props.options"
57
57
  :is-edit="props.isEdit"
58
+ :is-clone="props.isClone"
58
59
  :error-validation-fields="props.errorValidationFields"
59
60
  :state="props.state"
60
61
  @change-boot-order="onChangeBootOrder"
@@ -126,6 +127,7 @@ const props = defineProps<{
126
127
  usbController?: string
127
128
  options?: UI_I_SendDataVmoptions
128
129
  isEdit?: boolean
130
+ isClone?: boolean
129
131
  state?: string | number
130
132
  passthroughDevices?: UI_I_ConfigurePciDevicesTable | null
131
133
  }>()
@@ -8,6 +8,7 @@
8
8
  v-model:guest-os-family="guestOsFamilyLocal"
9
9
  v-model:guest-os-version="guestOsVersionLocal"
10
10
  :is-edit="props.isEdit"
11
+ :is-clone="props.isClone"
11
12
  :state="props.state"
12
13
  />
13
14
  <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options
@@ -65,6 +66,7 @@ const props = defineProps<{
65
66
  cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
66
67
  networks: UI_I_SendDataNewNetwork[] | null
67
68
  isEdit: boolean
69
+ isClone: boolean
68
70
  errorValidationFields: UI_I_ErrorValidationField[]
69
71
  options?: UI_I_SendDataVmoptions
70
72
  state?: string | number
@@ -108,6 +108,7 @@ const props = defineProps<{
108
108
  guestOsFamily: UI_I_OptionItem | null
109
109
  guestOsVersion: UI_I_OptionItem | null
110
110
  isEdit: boolean
111
+ isClone: boolean
111
112
  state?: string | number
112
113
  }>()
113
114
  const emits = defineEmits<{
@@ -118,7 +119,7 @@ const emits = defineEmits<{
118
119
  }>()
119
120
 
120
121
  const isDisabled = computed<boolean>(
121
- () => !props.isEdit || (props.isEdit && props.state !== 1)
122
+ () => (!props.isEdit && !props.isClone) || (props.isEdit && props.state !== 1)
122
123
  )
123
124
 
124
125
  const vmNameLocal = computed<string>({
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="add-vm">
2
+ <div class="clone-vm">
3
3
  <atoms-modal-by-steps
4
- test-id="add-vm-wizard"
4
+ test-id="clone-vm-wizard"
5
5
  :show="true"
6
6
  :title="localization.cloneExistingVirtualMachine"
7
7
  :step-items="stepItems"
@@ -11,14 +11,15 @@
11
11
  @hide="onHideModal"
12
12
  >
13
13
  <template #modalBody>
14
- <div class="add-vm-context">
14
+ <atoms-loader v-show="!vmSettings || loading" id="loader" />
15
+ <div v-if="vmSettings" class="vm-context">
15
16
  <div class="context-title-wrap">
16
17
  <p>{{ stepSubTitle }}</p>
17
18
  </div>
18
19
 
19
20
  <common-vm-actions-add-select-name
20
- v-show="stepPosition === 1"
21
- :show="stepPosition === 1"
21
+ v-show="stepPosition === 0"
22
+ :show="stepPosition === 0"
22
23
  :name-form-submit="nameFormSubmit"
23
24
  :project="props.project"
24
25
  @submit="onChangeNameAndNext(...$event)"
@@ -26,19 +27,19 @@
26
27
  @loading="loading = $event"
27
28
  />
28
29
  <common-vm-actions-add-select-storage
29
- v-show="stepPosition === 2"
30
+ v-show="stepPosition === 1"
30
31
  :storage-submit="storageSubmit"
31
32
  :datastore="props.datastore"
32
33
  :get-datastore-table-func="props.getDatastoreTableFunc"
33
34
  @submit="onChangeStorageAndNext"
34
35
  />
35
36
  <common-vm-actions-clone-select-options
36
- v-show="stepPosition === 3"
37
+ v-show="stepPosition === 2"
37
38
  :select-options-submit="selectOptionsSubmit"
38
39
  @submit="onChangeSelectOptionsAndNext"
39
40
  />
40
41
  <common-vm-actions-add-customize-hardware
41
- v-show="stepPosition === 4"
42
+ v-show="stepPosition === 3"
42
43
  v-model:vm-name="vmName"
43
44
  v-model:guest-machine-type="vmSettings.guestMachineType"
44
45
  v-model:guest-os-family="vmSettings.guestOsFamily"
@@ -81,7 +82,7 @@
81
82
  @send-data="onChangeCustomizeHardware"
82
83
  />
83
84
  <common-vm-actions-clone-ready-to-complete
84
- v-if="stepPosition === 5"
85
+ v-if="stepPosition === 4"
85
86
  :ready-complete-table-info="props.readyCompleteTableInfo"
86
87
  />
87
88
  </div>
@@ -90,7 +91,7 @@
90
91
  <template #modalFooter>
91
92
  <div class="flex-align-center flex-space-between w-100">
92
93
  <div class="power-on-by-default-wrap">
93
- <template v-if="stepPosition === 5">
94
+ <template v-if="stepPosition === 4">
94
95
  <input
95
96
  id="power-on-by-default"
96
97
  v-model="isPowerOnByDefault"
@@ -146,7 +147,10 @@ import type {
146
147
  UI_I_FolderOrFileTreePayload,
147
148
  } from '~/models/store/storage/interfaces'
148
149
  import type { UI_I_NetworkTableItem } from '~/models/store/network/interfaces'
149
- import type { API_UI_I_Error, UI_I_TablePayload } from '~/models/store/interfaces'
150
+ import type {
151
+ API_UI_I_Error,
152
+ UI_I_TablePayload,
153
+ } from '~/models/store/interfaces'
150
154
  import type { UI_I_FileTreeNode } from '~/components/models/interfaces'
151
155
  import type { UI_I_Localization } from '~/models/interfaces'
152
156
  import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/add/customizeHardware/models/interfaces'
@@ -188,11 +192,9 @@ const props = defineProps<{
188
192
  errorValidationFields: UI_I_ErrorValidationField[]
189
193
  readyCompleteTableInfo: UI_I_TableInfoItem[]
190
194
  vmCpuHelpTextSecond: string
191
- finishFunc: UI_T_AddVmFinishFunc
195
+ finishFunc: any
192
196
  getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
193
- validateSendDataFunc: UI_T_AddVmFinishFunc<
194
- [UI_T_SelectedNavItem, null | number] | null
195
- >
197
+ validateSendDataFunc: any
196
198
  passthroughDevices: UI_I_ConfigurePciDevicesTable | null
197
199
  vmNameInWizard: string
198
200
  }>()
@@ -213,7 +215,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
213
215
 
214
216
  const stepPosition = ref<number>(0)
215
217
  watch(stepPosition, (newValue) => {
216
- if (newValue === 5) validateSendData()
218
+ if (newValue === 4) validateSendData()
217
219
  })
218
220
  const stepItems = ref<UI_I_VerticalStepItem[]>([])
219
221
  stepItems.value = stepItemsFunc(localization.value, props.project)
@@ -377,34 +379,34 @@ const checkLocalChangeAndChangeStepStatus = (): void => {
377
379
  }
378
380
 
379
381
  const checkSubmit = (force = false): boolean => {
380
- if (stepPosition.value === 1 && !force) {
382
+ if (stepPosition.value === 0 && !force) {
381
383
  nameFormSubmit.value++
382
384
  return false
383
385
  }
384
- if (stepPosition.value === 2 && !force) {
386
+ if (stepPosition.value === 1 && !force) {
385
387
  storageSubmit.value++
386
388
  return false
387
389
  }
388
- if (stepPosition.value === 3 && !force) {
390
+ if (stepPosition.value === 2 && !force) {
389
391
  selectOptionsSubmit.value++
390
392
  return false
391
393
  }
392
- if (stepPosition.value === 4 && !force) {
394
+ if (stepPosition.value === 3 && !force) {
393
395
  customizeHardwareSubmit.value++
394
396
  return false
395
397
  }
396
398
  return true
397
399
  }
398
400
  const checkSubmitByManual = (step: number): boolean => {
399
- if (stepPosition.value === 1) {
401
+ if (stepPosition.value === 0) {
400
402
  nameFormSubmit.value++
401
403
  return false
402
404
  }
403
- if (stepPosition.value === 2) {
405
+ if (stepPosition.value === 1) {
404
406
  storageSubmit.value++
405
407
  return false
406
408
  }
407
- if (step === 6) {
409
+ if (step === 5) {
408
410
  customizeHardwareSubmit.value++
409
411
  return false
410
412
  }
@@ -425,8 +427,6 @@ const onChangeStep = (key: number): void => {
425
427
  }
426
428
 
427
429
  const compatibility = ref<UI_I_OptionItem[]>(capabilities.compatibility)
428
- const cpuModels = ref<UI_I_OptionItem[]>(capabilities.cpuModels)
429
- const maxCpus = ref<number>(capabilities.maxCpus)
430
430
  const maxMemory = ref<number>(capabilities.maxMemory)
431
431
 
432
432
  const vmSettings = computed<UI_I_VmSettings | null>(() => props.vmSettings)
@@ -445,7 +445,7 @@ const onHideModal = (): void => {
445
445
  width: 20px;
446
446
  top: 0;
447
447
  }
448
- .add-vm-context {
448
+ .vm-context {
449
449
  padding: 16px 15px 10px 10px;
450
450
  height: 100%;
451
451
  display: flex;
@@ -458,12 +458,12 @@ const onHideModal = (): void => {
458
458
  h4 {
459
459
  font-weight: 700;
460
460
  font-size: 13px;
461
- color: var(--add-vm-context-title);
461
+ color: var(--vm-context-title);
462
462
  }
463
463
  p {
464
464
  font-weight: 400;
465
465
  font-size: 13px;
466
- color: var(--add-vm-context-sub-title);
466
+ color: var(--vm-context-sub-title);
467
467
  }
468
468
  }
469
469
 
@@ -534,11 +534,11 @@ const onHideModal = (): void => {
534
534
 
535
535
  <style>
536
536
  :root {
537
- --add-vm-context-title: #333;
538
- --add-vm-context-sub-title: #000;
537
+ --vm-context-title: #333;
538
+ --vm-context-sub-title: #000;
539
539
  }
540
540
  :root.dark-theme {
541
- --add-vm-context-title: #adbbc4;
542
- --add-vm-context-sub-title: #adbbc4;
541
+ --vm-context-title: #adbbc4;
542
+ --vm-context-sub-title: #adbbc4;
543
543
  }
544
544
  </style>
@@ -49,35 +49,17 @@ const emits = defineEmits<{
49
49
  const localization = computed<UI_I_Localization>(() => useLocal())
50
50
 
51
51
  const selectedOptions = ref<string[]>([])
52
- watch(selectedOptions, newValue => {
53
- emits('submit', newValue)
52
+ watch(() => props.selectOptionsSubmit, () => {
53
+ emits('submit', selectedOptions.value)
54
54
  })
55
55
  </script>
56
56
 
57
57
  <style scoped lang="scss">
58
- .select-os {
59
- .select-os-block {
60
- label:not(.windows-virtualization-label) {
61
- padding: 0 5px 5px 0;
62
- }
58
+ .select-options {
59
+ padding: 12px 0 0;
63
60
 
64
- .windows-virtualization-label {
65
- padding: 0 4px;
66
- }
67
- }
68
- }
69
-
70
- #os-select-help-icon {
71
- h3 {
72
- margin-top: 7px;
73
- font-size: 22px;
74
- color: #565656;
75
- }
76
- p {
77
- width: 310px;
78
- margin-top: 24px;
79
- font-size: 14px;
80
- color: #565656;
61
+ .checkbox {
62
+ margin: 6px 0;
81
63
  }
82
64
  }
83
65
  </style>
@@ -12,7 +12,7 @@ export const stepItemsFunc = (
12
12
  return [
13
13
  {
14
14
  text: localization.selectName,
15
- disabled: true,
15
+ disabled: false,
16
16
  complete: false,
17
17
  },
18
18
  { text: localization.selectStorage, disabled: true, complete: false },
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <div class="add-vm">
2
+ <div class="edit-vm">
3
3
  <atoms-modal
4
- test-id="vm-edit-settings"
4
+ test-id="edit-vm-wizard"
5
5
  :show="true"
6
6
  :title="localization.editSettings"
7
7
  :second-title="vmNameCash"
@@ -14,7 +14,7 @@
14
14
  v-show="!vmSettings || loading"
15
15
  id="loader"
16
16
  />
17
- <div v-if="vmSettings" class="add-vm-context">
17
+ <div v-if="vmSettings" class="vm-context">
18
18
  <common-vm-actions-add-customize-hardware
19
19
  v-model:vm-name="vmName"
20
20
  v-model:guest-machine-type="vmSettings.guestMachineType"
@@ -205,7 +205,7 @@ const validateSendData = async (): Promise<void> => {
205
205
  </script>
206
206
 
207
207
  <style scoped lang="scss">
208
- .add-vm-context {
208
+ .vm-context {
209
209
  padding: 16px 15px 10px 10px;
210
210
  height: 100%;
211
211
  display: flex;
@@ -218,12 +218,12 @@ const validateSendData = async (): Promise<void> => {
218
218
  h4 {
219
219
  font-weight: 700;
220
220
  font-size: 13px;
221
- color: var(--add-vm-context-title);
221
+ color: var(--vm-context-title);
222
222
  }
223
223
  p {
224
224
  font-weight: 400;
225
225
  font-size: 13px;
226
- color: var(--add-vm-context-sub-title);
226
+ color: var(--vm-context-sub-title);
227
227
  }
228
228
  }
229
229
 
@@ -306,11 +306,11 @@ const validateSendData = async (): Promise<void> => {
306
306
 
307
307
  <style>
308
308
  :root {
309
- --add-vm-context-title: #333;
310
- --add-vm-context-sub-title: #000;
309
+ --vm-context-title: #333;
310
+ --vm-context-sub-title: #000;
311
311
  }
312
312
  :root.dark-theme {
313
- --add-vm-context-title: #adbbc4;
314
- --add-vm-context-sub-title: #adbbc4;
313
+ --vm-context-title: #adbbc4;
314
+ --vm-context-sub-title: #adbbc4;
315
315
  }
316
316
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.97",
4
+ "version": "1.1.99",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",