bfg-common 1.3.257 → 1.3.259

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.
Files changed (38) hide show
  1. package/components/atoms/dropdown/tree/lib/models/interfaces.ts +1 -1
  2. package/components/atoms/switch/Switch.vue +111 -111
  3. package/components/atoms/table/compact/Compact.vue +526 -526
  4. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +1 -0
  5. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +1 -0
  6. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  7. package/components/common/vm/actions/clone/Clone.vue +518 -518
  8. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +694 -693
  9. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +1 -0
  10. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/MaxCpu.vue +1 -0
  11. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/lib/config/cpuOptions.ts +2 -0
  12. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +1 -0
  13. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +66 -59
  14. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +2 -1
  15. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +1 -0
  16. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/lib/config/memoryOptions.ts +3 -3
  17. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +1 -0
  18. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +1 -0
  20. package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
  21. package/components/common/weekSelect/lib/config/options.ts +10 -10
  22. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +3 -0
  23. package/components/common/wizards/network/add/modals/SelectNetwork.vue +1 -0
  24. package/components/common/wizards/network/add/steps/ConnectionSettings.vue +1 -0
  25. package/composables/useAppVersion.ts +21 -21
  26. package/composables/useEnvLanguage.ts +20 -20
  27. package/lib/utils/sendTask.ts +72 -72
  28. package/minify.js +146 -146
  29. package/package.json +1 -1
  30. package/public/spice-console/application/codec.js +257 -257
  31. package/public/spice-console/lib/rasterEngine.js +907 -907
  32. package/public/spice-console/network/spicechannel.js +369 -369
  33. package/store/main/lib/interfaces.ts +9 -9
  34. package/store/tasks/actions.ts +133 -133
  35. package/store/tasks/getters.ts +25 -25
  36. package/store/tasks/lib/models/interfaces.ts +18 -18
  37. package/store/tasks/mutations.ts +58 -58
  38. package/store/tasks/state.ts +16 -16
@@ -28,6 +28,7 @@
28
28
  v-model.number="selectedCpu"
29
29
  :items="cpuOptions"
30
30
  :disabled="isCpuDisabled"
31
+ test-id="vm-wizard-cpu-combobox"
31
32
  @click.stop
32
33
  />
33
34
  </template>
@@ -17,6 +17,7 @@
17
17
  v-model.number="selectedMaxCpuLocal"
18
18
  :items="cpuOptions"
19
19
  :disabled="props.disabled"
20
+ test-id="max-cpu-combobox"
20
21
  @click.stop
21
22
  />
22
23
  </template>
@@ -10,10 +10,12 @@ export const cpuOptionsFunc = (
10
10
  {
11
11
  text: `${localization.minimum}: ${min}`,
12
12
  value: min,
13
+ testId: 'option-minimum-cpu',
13
14
  },
14
15
  {
15
16
  text: `${localization.maximum}: ${max}`,
16
17
  value: max,
18
+ testId: 'option-minimum-cpu',
17
19
  },
18
20
  ]
19
21
  }
@@ -35,6 +35,7 @@
35
35
  v-model="sharesLocal"
36
36
  :items="sharesOptions"
37
37
  :disabled="isDisabledShares"
38
+ test-id="vm-wizard-shares-field"
38
39
  @click.stop
39
40
  />
40
41
  </template>
@@ -1,59 +1,66 @@
1
- import { UI_I_Localization } from '~/lib/models/interfaces'
2
- import { UI_I_DropdownTreeItem } from '~/components/atoms/dropdown/tree/lib/models/interfaces'
3
- import { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
4
-
5
- export const dropdownItemsFunc = (
6
- localization: UI_I_Localization,
7
- state: string | number | undefined,
8
- passthroughDevices?: UI_I_PciDevice[]
9
- ): UI_I_DropdownTreeItem[] => {
10
- const { $text } = useNuxtApp()
11
-
12
- return [
13
- {
14
- text: localization.disksDrivesStorage,
15
- children: [
16
- { text: $text.toCapitalizeEveryWord(localization.hardDisk), value: 1 },
17
- {
18
- text: $text.toCapitalizeEveryWord(localization.existingHardDisk),
19
- value: 2,
20
- },
21
- // { text: 'RDM Disk', value: 2 },
22
- // { text: 'Host USB Device', value: 3 },
23
- // { text: 'NVDIMM', value: 4 },
24
- { text: localization.cdDvdDrive, value: 5 },
25
- ],
26
- },
27
- // {
28
- // text: 'Controllers',
29
- // children: [
30
- // { text: 'NVMe Controller', value: 6 },
31
- // { text: 'SATA Controller', value: 7 },
32
- // { text: 'SCSI Controller', value: 8 },
33
- // { text: 'USB Controller', value: 9 },
34
- // ],
35
- // },
36
- {
37
- text: 'Other Devices',
38
- children: [
39
- {
40
- text: 'PCI Device',
41
- value: 10,
42
- disabled: state === 2 || !passthroughDevices?.length,
43
- },
44
- // { text: 'Watchdog Timer', value: 11 },
45
- // { text: 'Precision Clock', value: 12 },
46
- // { text: 'Serial Port', value: 13 },
47
- ],
48
- },
49
- {
50
- text: localization.network,
51
- children: [
52
- {
53
- text: $text.toCapitalizeEveryWord(localization.networkAdapter),
54
- value: 14,
55
- },
56
- ],
57
- },
58
- ]
59
- }
1
+ import { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import { UI_I_DropdownTreeItem } from '~/components/atoms/dropdown/tree/lib/models/interfaces'
3
+ import { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
4
+
5
+ export const dropdownItemsFunc = (
6
+ localization: UI_I_Localization,
7
+ state: string | number | undefined,
8
+ passthroughDevices?: UI_I_PciDevice[]
9
+ ): UI_I_DropdownTreeItem[] => {
10
+ const { $text } = useNuxtApp()
11
+
12
+ return [
13
+ {
14
+ text: localization.disksDrivesStorage,
15
+ children: [
16
+ {
17
+ text: $text.toCapitalizeEveryWord(localization.hardDisk),
18
+ value: 1,
19
+ testId: 'disks-drives-storage',
20
+ },
21
+ {
22
+ text: $text.toCapitalizeEveryWord(localization.existingHardDisk),
23
+ value: 2,
24
+ testId: 'existing-hard-disk',
25
+ },
26
+ // { text: 'RDM Disk', value: 2 },
27
+ // { text: 'Host USB Device', value: 3 },
28
+ // { text: 'NVDIMM', value: 4 },
29
+ { text: localization.cdDvdDrive, value: 5, testId: 'cd-dvd-drive' },
30
+ ],
31
+ },
32
+ // {
33
+ // text: 'Controllers',
34
+ // children: [
35
+ // { text: 'NVMe Controller', value: 6 },
36
+ // { text: 'SATA Controller', value: 7 },
37
+ // { text: 'SCSI Controller', value: 8 },
38
+ // { text: 'USB Controller', value: 9 },
39
+ // ],
40
+ // },
41
+ {
42
+ text: 'Other Devices',
43
+ children: [
44
+ {
45
+ text: 'PCI Device',
46
+ value: 10,
47
+ disabled: state === 2 || !passthroughDevices?.length,
48
+ testId: 'pci-device',
49
+ },
50
+ // { text: 'Watchdog Timer', value: 11 },
51
+ // { text: 'Precision Clock', value: 12 },
52
+ // { text: 'Serial Port', value: 13 },
53
+ ],
54
+ },
55
+ {
56
+ text: localization.network,
57
+ children: [
58
+ {
59
+ text: $text.toCapitalizeEveryWord(localization.networkAdapter),
60
+ value: 14,
61
+ testId: 'network-adapter',
62
+ },
63
+ ],
64
+ },
65
+ ]
66
+ }
@@ -18,13 +18,14 @@
18
18
  v-model="limitLocalByLocalization"
19
19
  :items="limitOptionsLocal"
20
20
  :disabled="props.disabled"
21
+ :test-id="`vm-wizard-${props.componentType}-limit`"
21
22
  @click.stop
22
23
  @select="onSelectLimit"
23
24
  />
24
25
  </template>
25
26
  <template #content>{{ limitLocalAndApiErrorsTexts }}</template>
26
27
  </atoms-tooltip-error>
27
- </div>
28
+ </div>
28
29
  <div class="select">
29
30
  <select
30
31
  id="vm-wizard-limit-type-select"
@@ -26,6 +26,7 @@
26
26
  v-model="selectedMemory"
27
27
  :items="memoryOptions"
28
28
  :disabled="isMemoryDisabled"
29
+ test-id="vm-wizard-memory-field"
29
30
  class="input-text-color"
30
31
  @click.stop
31
32
  @select="onSelectMemory"
@@ -15,12 +15,12 @@ export const memoryOptionsFunc = (
15
15
  {
16
16
  text: `${localization.minimum}: ${minValueText}`,
17
17
  value: { value: +value, type: type.toLowerCase() },
18
+ testId: 'option-minimum-memory',
18
19
  },
19
20
  {
20
- text: `${localization.maximum}: ${maxValue} ${
21
- localization.gb
22
- }`,
21
+ text: `${localization.maximum}: ${maxValue} ${localization.gb}`,
23
22
  value: { value: maxValue, type: 'gb' },
23
+ testId: 'option-minimum-memory',
24
24
  },
25
25
  ]
26
26
  }
@@ -37,6 +37,7 @@
37
37
  v-show="limitIopsType !== 'unlimited'"
38
38
  v-model.number="limitIopsLocal"
39
39
  :items="limitIopsOptions"
40
+ test-id="limit-iops-combobox"
40
41
  @click.stop
41
42
  />
42
43
  <div v-show="limitIopsErrorText" class="flex-align-center">
@@ -1,165 +1,165 @@
1
- <template>
2
- <div class="hardware-pci-device">
3
- <atoms-stack-block
4
- :has-children="true"
5
- :removable="isRemovable"
6
- @remove="onRemovePciDevice"
7
- >
8
- <template #stackBlockKey>
9
- <div class="flex-align-center">
10
- <span>{{ label }}</span>
11
- </div>
12
- </template>
13
- <template #stackBlockContent>
14
- <span class="main-label">
15
- {{ selectedLabel }}
16
- </span>
17
- </template>
18
- <template #stackChildren>
19
- <template v-if="props.type === 'new'">
20
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
21
- v-model="selectedType"
22
- :options="pciDeviceTypeOptions"
23
- :pci-device-index="props.index"
24
- />
25
-
26
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
27
- v-show="selectedType.value === 'direct_path_io'"
28
- v-model="directPathIo"
29
- :pci-device-index="props.index"
30
- :passthrough-devices="props.passthroughDevices"
31
- />
32
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
33
- v-show="selectedType.value === 'dynamic_direct_path_io'"
34
- v-model="dynamicDirectPathIo"
35
- :pci-device-index="props.index"
36
- :passthrough-devices="props.passthroughDevices"
37
- />
38
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
39
- v-show="selectedType.value === 'nvidia_grid'"
40
- v-model="nvidiaGridProfile"
41
- :pci-device-index="props.index"
42
- />
43
- </template>
44
-
45
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
46
- </template>
47
- </atoms-stack-block>
48
- </div>
49
- </template>
50
-
51
- <script setup lang="ts">
52
- import type { UI_I_Localization } from '~/lib/models/interfaces'
53
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
54
- import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
55
- import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
56
- import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
57
- import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
58
-
59
- const props = defineProps<{
60
- index: number
61
- pciDevice: UI_I_SendDataNewPciDevice
62
- passthroughDevices: UI_I_PciDevice[]
63
- type: UI_T_PciDeviceType
64
- isEdit: boolean
65
- state?: string | number
66
- // errorValidationFields: UI_I_ErrorValidationField<string>[]
67
- }>()
68
- const emits = defineEmits<{
69
- (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
70
- (event: 'remove'): void
71
- }>()
72
-
73
- const localization = computed<UI_I_Localization>(() => useLocal())
74
-
75
- const isRunning = computed<boolean>(() => {
76
- return props.state === 2
77
- })
78
-
79
- const isRemovable = computed<boolean>(() => {
80
- return !props.isEdit || !isRunning.value
81
- })
82
-
83
- const label = computed<string>(() => {
84
- if (props.type === 'edit')
85
- return `${localization.value.newPciDevice} ${props.index + 1}`
86
-
87
- return `${localization.value.pciDevice} *`
88
- })
89
-
90
- const selectedLabel = computed<string>(() => {
91
- switch (selectedType.value.value) {
92
- case 'direct_path_io':
93
- return `${directPathIo.value.address}|${directPathIo.value.device_name}`
94
- case 'dynamic_direct_path_io':
95
- return dynamicDirectPathIo.value
96
- default:
97
- return nvidiaGridProfile.value
98
- }
99
- })
100
-
101
- const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
102
- const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
103
-
104
- const directPathIo = ref<UI_I_PciDevice>(
105
- props.passthroughDevices[0]
106
- )
107
- const dynamicDirectPathIo = ref<string>('')
108
- const nvidiaGridProfile = ref<string>('')
109
-
110
- watch(
111
- props.pciDevice,
112
- (newValue) => {
113
- // const passthroughDevice = props.passthroughDevices.find(
114
- // (item) => item.address === newValue.address
115
- // )
116
- // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
117
- newValue && (directPathIo.value = newValue)
118
- },
119
- { immediate: true }
120
- )
121
-
122
- const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
123
- switch (selectedType.value.value) {
124
- case 'direct_path_io':
125
- return {
126
- address: directPathIo.value.address,
127
- vendor_name: directPathIo.value.vendor_name,
128
- class_name: directPathIo.value.class_name,
129
- device_name: directPathIo.value.device_name,
130
- }
131
- case 'dynamic_direct_path_io':
132
- return {
133
- address: '',
134
- vendor_name: '',
135
- class_name: '',
136
- device_name: '',
137
- }
138
- default:
139
- return {
140
- address: '',
141
- vendor_name: '',
142
- class_name: '',
143
- device_name: '',
144
- }
145
- }
146
- })
147
-
148
- watch(
149
- sendData,
150
- (newValue) => {
151
- emits('send-data', newValue)
152
- },
153
- { immediate: true }
154
- )
155
-
156
- const onRemovePciDevice = (): void => {
157
- emits('remove')
158
- }
159
- </script>
160
-
161
- <style scoped lang="scss">
162
- #network-connect {
163
- margin-right: 4px;
164
- }
165
- </style>
1
+ <template>
2
+ <div class="hardware-pci-device">
3
+ <atoms-stack-block
4
+ :has-children="true"
5
+ :removable="isRemovable"
6
+ @remove="onRemovePciDevice"
7
+ >
8
+ <template #stackBlockKey>
9
+ <div class="flex-align-center">
10
+ <span>{{ label }}</span>
11
+ </div>
12
+ </template>
13
+ <template #stackBlockContent>
14
+ <span class="main-label">
15
+ {{ selectedLabel }}
16
+ </span>
17
+ </template>
18
+ <template #stackChildren>
19
+ <template v-if="props.type === 'new'">
20
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
21
+ v-model="selectedType"
22
+ :options="pciDeviceTypeOptions"
23
+ :pci-device-index="props.index"
24
+ />
25
+
26
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
27
+ v-show="selectedType.value === 'direct_path_io'"
28
+ v-model="directPathIo"
29
+ :pci-device-index="props.index"
30
+ :passthrough-devices="props.passthroughDevices"
31
+ />
32
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
33
+ v-show="selectedType.value === 'dynamic_direct_path_io'"
34
+ v-model="dynamicDirectPathIo"
35
+ :pci-device-index="props.index"
36
+ :passthrough-devices="props.passthroughDevices"
37
+ />
38
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
39
+ v-show="selectedType.value === 'nvidia_grid'"
40
+ v-model="nvidiaGridProfile"
41
+ :pci-device-index="props.index"
42
+ />
43
+ </template>
44
+
45
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
46
+ </template>
47
+ </atoms-stack-block>
48
+ </div>
49
+ </template>
50
+
51
+ <script setup lang="ts">
52
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
53
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
54
+ import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
55
+ import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
56
+ import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
57
+ import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
58
+
59
+ const props = defineProps<{
60
+ index: number
61
+ pciDevice: UI_I_SendDataNewPciDevice
62
+ passthroughDevices: UI_I_PciDevice[]
63
+ type: UI_T_PciDeviceType
64
+ isEdit: boolean
65
+ state?: string | number
66
+ // errorValidationFields: UI_I_ErrorValidationField<string>[]
67
+ }>()
68
+ const emits = defineEmits<{
69
+ (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
70
+ (event: 'remove'): void
71
+ }>()
72
+
73
+ const localization = computed<UI_I_Localization>(() => useLocal())
74
+
75
+ const isRunning = computed<boolean>(() => {
76
+ return props.state === 2
77
+ })
78
+
79
+ const isRemovable = computed<boolean>(() => {
80
+ return !props.isEdit || !isRunning.value
81
+ })
82
+
83
+ const label = computed<string>(() => {
84
+ if (props.type === 'edit')
85
+ return `${localization.value.newPciDevice} ${props.index + 1}`
86
+
87
+ return `${localization.value.pciDevice} *`
88
+ })
89
+
90
+ const selectedLabel = computed<string>(() => {
91
+ switch (selectedType.value.value) {
92
+ case 'direct_path_io':
93
+ return `${directPathIo.value.address}|${directPathIo.value.device_name}`
94
+ case 'dynamic_direct_path_io':
95
+ return dynamicDirectPathIo.value
96
+ default:
97
+ return nvidiaGridProfile.value
98
+ }
99
+ })
100
+
101
+ const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
102
+ const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
103
+
104
+ const directPathIo = ref<UI_I_PciDevice>(
105
+ props.passthroughDevices[0]
106
+ )
107
+ const dynamicDirectPathIo = ref<string>('')
108
+ const nvidiaGridProfile = ref<string>('')
109
+
110
+ watch(
111
+ props.pciDevice,
112
+ (newValue) => {
113
+ // const passthroughDevice = props.passthroughDevices.find(
114
+ // (item) => item.address === newValue.address
115
+ // )
116
+ // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
117
+ newValue && (directPathIo.value = newValue)
118
+ },
119
+ { immediate: true }
120
+ )
121
+
122
+ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
123
+ switch (selectedType.value.value) {
124
+ case 'direct_path_io':
125
+ return {
126
+ address: directPathIo.value.address,
127
+ vendor_name: directPathIo.value.vendor_name,
128
+ class_name: directPathIo.value.class_name,
129
+ device_name: directPathIo.value.device_name,
130
+ }
131
+ case 'dynamic_direct_path_io':
132
+ return {
133
+ address: '',
134
+ vendor_name: '',
135
+ class_name: '',
136
+ device_name: '',
137
+ }
138
+ default:
139
+ return {
140
+ address: '',
141
+ vendor_name: '',
142
+ class_name: '',
143
+ device_name: '',
144
+ }
145
+ }
146
+ })
147
+
148
+ watch(
149
+ sendData,
150
+ (newValue) => {
151
+ emits('send-data', newValue)
152
+ },
153
+ { immediate: true }
154
+ )
155
+
156
+ const onRemovePciDevice = (): void => {
157
+ emits('remove')
158
+ }
159
+ </script>
160
+
161
+ <style scoped lang="scss">
162
+ #network-connect {
163
+ margin-right: 4px;
164
+ }
165
+ </style>
@@ -18,6 +18,7 @@
18
18
  v-model="reservationLocal"
19
19
  :items="reservationOptions"
20
20
  :disabled="props.disabled"
21
+ :test-id="`vm-wizard-${props.componentType}-reservation`"
21
22
  @click.stop
22
23
  @select="onSelectReservation"
23
24
  />