bfg-common 1.1.98 → 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>({
@@ -18,8 +18,8 @@
18
18
  </div>
19
19
 
20
20
  <common-vm-actions-add-select-name
21
- v-show="stepPosition === 1"
22
- :show="stepPosition === 1"
21
+ v-show="stepPosition === 0"
22
+ :show="stepPosition === 0"
23
23
  :name-form-submit="nameFormSubmit"
24
24
  :project="props.project"
25
25
  @submit="onChangeNameAndNext(...$event)"
@@ -27,19 +27,19 @@
27
27
  @loading="loading = $event"
28
28
  />
29
29
  <common-vm-actions-add-select-storage
30
- v-show="stepPosition === 2"
30
+ v-show="stepPosition === 1"
31
31
  :storage-submit="storageSubmit"
32
32
  :datastore="props.datastore"
33
33
  :get-datastore-table-func="props.getDatastoreTableFunc"
34
34
  @submit="onChangeStorageAndNext"
35
35
  />
36
36
  <common-vm-actions-clone-select-options
37
- v-show="stepPosition === 3"
37
+ v-show="stepPosition === 2"
38
38
  :select-options-submit="selectOptionsSubmit"
39
39
  @submit="onChangeSelectOptionsAndNext"
40
40
  />
41
41
  <common-vm-actions-add-customize-hardware
42
- v-show="stepPosition === 4"
42
+ v-show="stepPosition === 3"
43
43
  v-model:vm-name="vmName"
44
44
  v-model:guest-machine-type="vmSettings.guestMachineType"
45
45
  v-model:guest-os-family="vmSettings.guestOsFamily"
@@ -82,7 +82,7 @@
82
82
  @send-data="onChangeCustomizeHardware"
83
83
  />
84
84
  <common-vm-actions-clone-ready-to-complete
85
- v-if="stepPosition === 5"
85
+ v-if="stepPosition === 4"
86
86
  :ready-complete-table-info="props.readyCompleteTableInfo"
87
87
  />
88
88
  </div>
@@ -91,7 +91,7 @@
91
91
  <template #modalFooter>
92
92
  <div class="flex-align-center flex-space-between w-100">
93
93
  <div class="power-on-by-default-wrap">
94
- <template v-if="stepPosition === 5">
94
+ <template v-if="stepPosition === 4">
95
95
  <input
96
96
  id="power-on-by-default"
97
97
  v-model="isPowerOnByDefault"
@@ -215,7 +215,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
215
215
 
216
216
  const stepPosition = ref<number>(0)
217
217
  watch(stepPosition, (newValue) => {
218
- if (newValue === 5) validateSendData()
218
+ if (newValue === 4) validateSendData()
219
219
  })
220
220
  const stepItems = ref<UI_I_VerticalStepItem[]>([])
221
221
  stepItems.value = stepItemsFunc(localization.value, props.project)
@@ -379,34 +379,34 @@ const checkLocalChangeAndChangeStepStatus = (): void => {
379
379
  }
380
380
 
381
381
  const checkSubmit = (force = false): boolean => {
382
- if (stepPosition.value === 1 && !force) {
382
+ if (stepPosition.value === 0 && !force) {
383
383
  nameFormSubmit.value++
384
384
  return false
385
385
  }
386
- if (stepPosition.value === 2 && !force) {
386
+ if (stepPosition.value === 1 && !force) {
387
387
  storageSubmit.value++
388
388
  return false
389
389
  }
390
- if (stepPosition.value === 3 && !force) {
390
+ if (stepPosition.value === 2 && !force) {
391
391
  selectOptionsSubmit.value++
392
392
  return false
393
393
  }
394
- if (stepPosition.value === 4 && !force) {
394
+ if (stepPosition.value === 3 && !force) {
395
395
  customizeHardwareSubmit.value++
396
396
  return false
397
397
  }
398
398
  return true
399
399
  }
400
400
  const checkSubmitByManual = (step: number): boolean => {
401
- if (stepPosition.value === 1) {
401
+ if (stepPosition.value === 0) {
402
402
  nameFormSubmit.value++
403
403
  return false
404
404
  }
405
- if (stepPosition.value === 2) {
405
+ if (stepPosition.value === 1) {
406
406
  storageSubmit.value++
407
407
  return false
408
408
  }
409
- if (step === 6) {
409
+ if (step === 5) {
410
410
  customizeHardwareSubmit.value++
411
411
  return false
412
412
  }
@@ -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 },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.98",
4
+ "version": "1.1.99",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",