bfg-common 1.3.467 → 1.3.469

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 (109) hide show
  1. package/assets/scss/common/normalize.scss +340 -340
  2. package/components/atoms/TheIcon2.vue +1353 -1353
  3. package/components/atoms/loader/Loader.vue +30 -30
  4. package/components/atoms/loader/PreLoader.vue +38 -38
  5. package/components/atoms/switch/Switch.vue +111 -111
  6. package/components/atoms/table/compact/Compact.vue +526 -526
  7. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  8. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  9. package/components/common/context/Context.vue +99 -99
  10. package/components/common/layout/theHeader/LanguageSwitch.vue +102 -0
  11. package/components/common/layout/theHeader/TheHeader.vue +91 -0
  12. package/components/common/layout/theHeader/TheHeaderNew.vue +229 -0
  13. package/components/common/layout/theHeader/TheHeaderOld.vue +241 -0
  14. package/components/common/layout/theHeader/feedback/Feedback.vue +104 -0
  15. package/components/common/layout/theHeader/feedback/FeedbackNew.vue +63 -0
  16. package/components/common/layout/theHeader/feedback/FeedbackOld.vue +73 -0
  17. package/components/common/layout/theHeader/helpMenu/About.vue +110 -0
  18. package/components/common/layout/theHeader/helpMenu/HelpMenu.vue +45 -0
  19. package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +116 -0
  20. package/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu.ts +25 -0
  21. package/components/common/layout/theHeader/helpMenu/helpMenuOld/HelpMenuOld.vue +69 -0
  22. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/config/dropMenu.ts +22 -0
  23. package/components/common/layout/theHeader/helpMenu/helpMenuOld/lib/models/types.ts +1 -0
  24. package/components/common/layout/theHeader/lib/models/types.ts +5 -0
  25. package/components/common/layout/theHeader/modals/Reconnect.vue +98 -0
  26. package/components/common/layout/theHeader/modals/RedirectLogin.vue +60 -0
  27. package/components/common/layout/theHeader/userMenu/UserMenu.vue +95 -0
  28. package/components/common/layout/theHeader/userMenu/lib/models/interfaces.ts +32 -0
  29. package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +210 -0
  30. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/config/form.ts +31 -0
  31. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces.ts +12 -0
  32. package/components/common/layout/theHeader/userMenu/modals/preferences/Inventory.vue +43 -0
  33. package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +119 -0
  34. package/components/common/layout/theHeader/userMenu/modals/preferences/View.vue +113 -0
  35. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +148 -0
  36. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/lang.ts +10 -0
  37. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/config/radioOptions.ts +22 -0
  38. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/enums.ts +9 -0
  39. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/interfaces.ts +11 -0
  40. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/lib/models/types.ts +1 -0
  41. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +66 -0
  42. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +30 -0
  43. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/models/interfaces.ts +5 -0
  44. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/config/preferencesTabs.ts +68 -0
  45. package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +1 -0
  46. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +67 -0
  47. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +27 -0
  48. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types.ts +1 -0
  49. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +114 -0
  50. package/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu.ts +28 -0
  51. package/components/common/layout/theHeader/userMenu/userMenuOld/UserMenuOld.vue +36 -0
  52. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/config/dropMenu.ts +36 -0
  53. package/components/common/layout/theHeader/userMenu/userMenuOld/lib/models/types.ts +5 -0
  54. package/components/common/lib/config/states.ts +160 -160
  55. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +142 -142
  56. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +248 -248
  57. package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +288 -288
  58. package/components/common/readyToComplete/ReadyToComplete.vue +15 -15
  59. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  60. package/components/common/split/horizontal/Horizontal.vue +70 -70
  61. package/components/common/vm/actions/clone/Clone.vue +511 -511
  62. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  63. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  64. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +400 -400
  65. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +329 -329
  66. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +305 -305
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +168 -168
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  71. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +114 -114
  72. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +192 -192
  73. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +72 -72
  74. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  75. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  76. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  77. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  78. package/components/common/weekSelect/lib/config/options.ts +10 -10
  79. package/components/common/wizards/datastore/add/Add.vue +436 -436
  80. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  81. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  82. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  83. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  84. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  85. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  86. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  87. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  88. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  89. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  90. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  91. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  92. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  93. package/composables/useAppVersion.ts +22 -22
  94. package/composables/useEnvLanguage.ts +20 -20
  95. package/lib/utils/sendTask.ts +73 -73
  96. package/minify.js +146 -146
  97. package/package.json +2 -1
  98. package/plugins/spice-console/spice.console.ts +147 -147
  99. package/public/spice-console/application/codec.js +263 -263
  100. package/public/spice-console/lib/rasterEngine.js +907 -907
  101. package/public/spice-console/network/spicechannel.js +375 -375
  102. package/store/main/lib/interfaces.ts +9 -9
  103. package/store/tasks/actions.ts +133 -133
  104. package/store/tasks/getters.ts +25 -25
  105. package/store/tasks/lib/models/interfaces.ts +18 -18
  106. package/store/tasks/mutations.ts +58 -58
  107. package/store/tasks/state.ts +16 -16
  108. /package/components/{layout → common/layout}/theHeader/lib/models/enums.ts +0 -0
  109. /package/components/{layout → common/layout}/theHeader/lib/utils/localization.ts +0 -0
@@ -1,168 +1,168 @@
1
- <template>
2
- <div class="hardware-pci-device">
3
- <atoms-stack-block
4
- :has-children="true"
5
- :removable="isRemovable"
6
- test-id="pci-device-stack-block"
7
- @remove="onRemovePciDevice"
8
- >
9
- <template #stackBlockKey>
10
- <div
11
- :id="`vm-wizard-toggle-block-pci-device-${props.index}`"
12
- :data-id="`vm-wizard-toggle-block-pci-device-${props.index}`"
13
- class="flex-align-center"
14
- >
15
- <span>{{ label }}</span>
16
- </div>
17
- </template>
18
- <template #stackBlockContent>
19
- <span class="main-label">
20
- {{ selectedLabel }}
21
- </span>
22
- </template>
23
- <template #stackChildren>
24
- <template v-if="props.type === 'new'">
25
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
26
- v-model="selectedType"
27
- :options="pciDeviceTypeOptions"
28
- :pci-device-index="props.index"
29
- />
30
-
31
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
32
- v-show="selectedType.value === 'direct_path_io'"
33
- v-model="directPathIo"
34
- :pci-device-index="props.index"
35
- :passthrough-devices="props.passthroughDevices"
36
- />
37
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
38
- v-show="selectedType.value === 'dynamic_direct_path_io'"
39
- v-model="dynamicDirectPathIo"
40
- :pci-device-index="props.index"
41
- :passthrough-devices="props.passthroughDevices"
42
- />
43
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
44
- v-show="selectedType.value === 'nvidia_grid'"
45
- v-model="nvidiaGridProfile"
46
- :pci-device-index="props.index"
47
- />
48
- </template>
49
-
50
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
51
- </template>
52
- </atoms-stack-block>
53
- </div>
54
- </template>
55
-
56
- <script setup lang="ts">
57
- import type { UI_I_Localization } from '~/lib/models/interfaces'
58
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
59
- import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
60
- import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
61
- import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
62
- import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
63
-
64
- const props = defineProps<{
65
- index: number
66
- pciDevice: UI_I_SendDataNewPciDevice
67
- passthroughDevices: UI_I_PciDevice[]
68
- type: UI_T_PciDeviceType
69
- isEdit: boolean
70
- state?: string | number
71
- // errorValidationFields: UI_I_ErrorValidationField<string>[]
72
- }>()
73
- const emits = defineEmits<{
74
- (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
75
- (event: 'remove'): void
76
- }>()
77
-
78
- const localization = computed<UI_I_Localization>(() => useLocal())
79
-
80
- const isRunning = computed<boolean>(() => {
81
- return props.state === 2
82
- })
83
-
84
- const isRemovable = computed<boolean>(() => {
85
- return !props.isEdit || !isRunning.value
86
- })
87
-
88
- const label = computed<string>(() => {
89
- if (props.type === 'edit')
90
- return `${localization.value.newPciDevice} ${props.index + 1}`
91
-
92
- return `${localization.value.pciDevice} *`
93
- })
94
-
95
- const selectedLabel = computed<string>(() => {
96
- switch (selectedType.value.value) {
97
- case 'direct_path_io':
98
- return `${directPathIo.value.address}|${directPathIo.value.device_name}`
99
- case 'dynamic_direct_path_io':
100
- return dynamicDirectPathIo.value
101
- default:
102
- return nvidiaGridProfile.value
103
- }
104
- })
105
-
106
- const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
107
- const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
108
-
109
- const directPathIo = ref<UI_I_PciDevice>(props.passthroughDevices[0])
110
- const dynamicDirectPathIo = ref<string>('')
111
- const nvidiaGridProfile = ref<string>('')
112
-
113
- watch(
114
- props.pciDevice,
115
- (newValue) => {
116
- // const passthroughDevice = props.passthroughDevices.find(
117
- // (item) => item.address === newValue.address
118
- // )
119
- // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
120
- newValue && (directPathIo.value = newValue)
121
- },
122
- { immediate: true }
123
- )
124
-
125
- const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
126
- switch (selectedType.value.value) {
127
- case 'direct_path_io':
128
- return {
129
- address: directPathIo.value.address,
130
- vendor_name: directPathIo.value.vendor_name,
131
- class_name: directPathIo.value.class_name,
132
- device_name: directPathIo.value.device_name,
133
- }
134
- case 'dynamic_direct_path_io':
135
- return {
136
- address: '',
137
- vendor_name: '',
138
- class_name: '',
139
- device_name: '',
140
- }
141
- default:
142
- return {
143
- address: '',
144
- vendor_name: '',
145
- class_name: '',
146
- device_name: '',
147
- }
148
- }
149
- })
150
-
151
- watch(
152
- sendData,
153
- (newValue) => {
154
- emits('send-data', newValue)
155
- },
156
- { immediate: true }
157
- )
158
-
159
- const onRemovePciDevice = (): void => {
160
- emits('remove')
161
- }
162
- </script>
163
-
164
- <style scoped lang="scss">
165
- #network-connect {
166
- margin-right: 4px;
167
- }
168
- </style>
1
+ <template>
2
+ <div class="hardware-pci-device">
3
+ <atoms-stack-block
4
+ :has-children="true"
5
+ :removable="isRemovable"
6
+ test-id="pci-device-stack-block"
7
+ @remove="onRemovePciDevice"
8
+ >
9
+ <template #stackBlockKey>
10
+ <div
11
+ :id="`vm-wizard-toggle-block-pci-device-${props.index}`"
12
+ :data-id="`vm-wizard-toggle-block-pci-device-${props.index}`"
13
+ class="flex-align-center"
14
+ >
15
+ <span>{{ label }}</span>
16
+ </div>
17
+ </template>
18
+ <template #stackBlockContent>
19
+ <span class="main-label">
20
+ {{ selectedLabel }}
21
+ </span>
22
+ </template>
23
+ <template #stackChildren>
24
+ <template v-if="props.type === 'new'">
25
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
26
+ v-model="selectedType"
27
+ :options="pciDeviceTypeOptions"
28
+ :pci-device-index="props.index"
29
+ />
30
+
31
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
32
+ v-show="selectedType.value === 'direct_path_io'"
33
+ v-model="directPathIo"
34
+ :pci-device-index="props.index"
35
+ :passthrough-devices="props.passthroughDevices"
36
+ />
37
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
38
+ v-show="selectedType.value === 'dynamic_direct_path_io'"
39
+ v-model="dynamicDirectPathIo"
40
+ :pci-device-index="props.index"
41
+ :passthrough-devices="props.passthroughDevices"
42
+ />
43
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
44
+ v-show="selectedType.value === 'nvidia_grid'"
45
+ v-model="nvidiaGridProfile"
46
+ :pci-device-index="props.index"
47
+ />
48
+ </template>
49
+
50
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
51
+ </template>
52
+ </atoms-stack-block>
53
+ </div>
54
+ </template>
55
+
56
+ <script setup lang="ts">
57
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
58
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
59
+ import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
60
+ import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
61
+ import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
62
+ import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
63
+
64
+ const props = defineProps<{
65
+ index: number
66
+ pciDevice: UI_I_SendDataNewPciDevice
67
+ passthroughDevices: UI_I_PciDevice[]
68
+ type: UI_T_PciDeviceType
69
+ isEdit: boolean
70
+ state?: string | number
71
+ // errorValidationFields: UI_I_ErrorValidationField<string>[]
72
+ }>()
73
+ const emits = defineEmits<{
74
+ (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
75
+ (event: 'remove'): void
76
+ }>()
77
+
78
+ const localization = computed<UI_I_Localization>(() => useLocal())
79
+
80
+ const isRunning = computed<boolean>(() => {
81
+ return props.state === 2
82
+ })
83
+
84
+ const isRemovable = computed<boolean>(() => {
85
+ return !props.isEdit || !isRunning.value
86
+ })
87
+
88
+ const label = computed<string>(() => {
89
+ if (props.type === 'edit')
90
+ return `${localization.value.newPciDevice} ${props.index + 1}`
91
+
92
+ return `${localization.value.pciDevice} *`
93
+ })
94
+
95
+ const selectedLabel = computed<string>(() => {
96
+ switch (selectedType.value.value) {
97
+ case 'direct_path_io':
98
+ return `${directPathIo.value.address}|${directPathIo.value.device_name}`
99
+ case 'dynamic_direct_path_io':
100
+ return dynamicDirectPathIo.value
101
+ default:
102
+ return nvidiaGridProfile.value
103
+ }
104
+ })
105
+
106
+ const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
107
+ const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
108
+
109
+ const directPathIo = ref<UI_I_PciDevice>(props.passthroughDevices[0])
110
+ const dynamicDirectPathIo = ref<string>('')
111
+ const nvidiaGridProfile = ref<string>('')
112
+
113
+ watch(
114
+ props.pciDevice,
115
+ (newValue) => {
116
+ // const passthroughDevice = props.passthroughDevices.find(
117
+ // (item) => item.address === newValue.address
118
+ // )
119
+ // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
120
+ newValue && (directPathIo.value = newValue)
121
+ },
122
+ { immediate: true }
123
+ )
124
+
125
+ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
126
+ switch (selectedType.value.value) {
127
+ case 'direct_path_io':
128
+ return {
129
+ address: directPathIo.value.address,
130
+ vendor_name: directPathIo.value.vendor_name,
131
+ class_name: directPathIo.value.class_name,
132
+ device_name: directPathIo.value.device_name,
133
+ }
134
+ case 'dynamic_direct_path_io':
135
+ return {
136
+ address: '',
137
+ vendor_name: '',
138
+ class_name: '',
139
+ device_name: '',
140
+ }
141
+ default:
142
+ return {
143
+ address: '',
144
+ vendor_name: '',
145
+ class_name: '',
146
+ device_name: '',
147
+ }
148
+ }
149
+ })
150
+
151
+ watch(
152
+ sendData,
153
+ (newValue) => {
154
+ emits('send-data', newValue)
155
+ },
156
+ { immediate: true }
157
+ )
158
+
159
+ const onRemovePciDevice = (): void => {
160
+ emits('remove')
161
+ }
162
+ </script>
163
+
164
+ <style scoped lang="scss">
165
+ #network-connect {
166
+ margin-right: 4px;
167
+ }
168
+ </style>
@@ -1,82 +1,82 @@
1
- <template>
2
- <div class="hardware-usb-controller">
3
- <atoms-stack-block :has-children="false" test-id="usb-controller-stack-block">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-usb-controller"
7
- data-id="vm-wizard-toggle-block-usb-controller"
8
- class="flex-align-center"
9
- >
10
- <span>{{ localization.newUsbController }}</span>
11
- </div>
12
- </template>
13
- <template #stackBlockContent>
14
- <div v-if="props.isEdit">
15
- {{ selectedUsbControllerText }}
16
- </div>
17
- <div v-else class="select">
18
- <select
19
- id="usb-controller-select"
20
- v-model="selectedUsbController"
21
- data-id="usb-controller-select"
22
- :disabled="props.isEdit"
23
- @click.stop
24
- >
25
- <option
26
- v-for="(item, key) in usbControllerOptions"
27
- :key="key"
28
- :value="item.value"
29
- >
30
- {{ item.text }}
31
- </option>
32
- </select>
33
- </div>
34
- </template>
35
- </atoms-stack-block>
36
- </div>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
41
- import { UI_I_Localization } from '~/lib/models/interfaces'
42
- import { usbControllerOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/lib/config/options'
43
-
44
- const props = withDefaults(
45
- defineProps<{
46
- usbController: string
47
- isEdit: boolean
48
- state?: string | number
49
- }>(),
50
- {
51
- usbController: 'usb2',
52
- }
53
- )
54
- const emits = defineEmits<{
55
- (event: 'send-data', value: string): void
56
- }>()
57
-
58
- const localization = computed<UI_I_Localization>(() => useLocal())
59
-
60
- const usbControllerOptions = ref<UI_I_OptionItem[]>(usbControllerOptionsConfig)
61
- const selectedUsbController = ref<string>(props.usbController)
62
- const selectedUsbControllerText = computed<string>(
63
- () =>
64
- usbControllerOptions.value.find(
65
- (option) => option.value === selectedUsbController.value
66
- )?.text || ''
67
- )
68
-
69
- watch(
70
- selectedUsbController,
71
- (newValue) => {
72
- emits('send-data', newValue)
73
- },
74
- { immediate: true }
75
- )
76
- </script>
77
-
78
- <style scoped lang="scss">
79
- #network-connect {
80
- margin-right: 4px;
81
- }
82
- </style>
1
+ <template>
2
+ <div class="hardware-usb-controller">
3
+ <atoms-stack-block :has-children="false" test-id="usb-controller-stack-block">
4
+ <template #stackBlockKey>
5
+ <div
6
+ id="vm-wizard-toggle-block-usb-controller"
7
+ data-id="vm-wizard-toggle-block-usb-controller"
8
+ class="flex-align-center"
9
+ >
10
+ <span>{{ localization.newUsbController }}</span>
11
+ </div>
12
+ </template>
13
+ <template #stackBlockContent>
14
+ <div v-if="props.isEdit">
15
+ {{ selectedUsbControllerText }}
16
+ </div>
17
+ <div v-else class="select">
18
+ <select
19
+ id="usb-controller-select"
20
+ v-model="selectedUsbController"
21
+ data-id="usb-controller-select"
22
+ :disabled="props.isEdit"
23
+ @click.stop
24
+ >
25
+ <option
26
+ v-for="(item, key) in usbControllerOptions"
27
+ :key="key"
28
+ :value="item.value"
29
+ >
30
+ {{ item.text }}
31
+ </option>
32
+ </select>
33
+ </div>
34
+ </template>
35
+ </atoms-stack-block>
36
+ </div>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
41
+ import { UI_I_Localization } from '~/lib/models/interfaces'
42
+ import { usbControllerOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/lib/config/options'
43
+
44
+ const props = withDefaults(
45
+ defineProps<{
46
+ usbController: string
47
+ isEdit: boolean
48
+ state?: string | number
49
+ }>(),
50
+ {
51
+ usbController: 'usb2',
52
+ }
53
+ )
54
+ const emits = defineEmits<{
55
+ (event: 'send-data', value: string): void
56
+ }>()
57
+
58
+ const localization = computed<UI_I_Localization>(() => useLocal())
59
+
60
+ const usbControllerOptions = ref<UI_I_OptionItem[]>(usbControllerOptionsConfig)
61
+ const selectedUsbController = ref<string>(props.usbController)
62
+ const selectedUsbControllerText = computed<string>(
63
+ () =>
64
+ usbControllerOptions.value.find(
65
+ (option) => option.value === selectedUsbController.value
66
+ )?.text || ''
67
+ )
68
+
69
+ watch(
70
+ selectedUsbController,
71
+ (newValue) => {
72
+ emits('send-data', newValue)
73
+ },
74
+ { immediate: true }
75
+ )
76
+ </script>
77
+
78
+ <style scoped lang="scss">
79
+ #network-connect {
80
+ margin-right: 4px;
81
+ }
82
+ </style>
@@ -1,32 +1,32 @@
1
- <template>
2
- <div class="hardware-other">
3
- <atoms-stack-block :has-children="true" test-id="other-stack-block">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-other"
7
- data-id="vm-wizard-toggle-block-other"
8
- >
9
- <span>{{ localization.other }}</span>
10
- </div>
11
- </template>
12
- <template #stackBlockContent>
13
- <span>{{ localization.additionalHardware }}</span>
14
- </template>
15
- <template #stackChildren>
16
- <common-vm-actions-common-customize-hardware-virtual-hardware-other-input-devices />
17
- </template>
18
- </atoms-stack-block>
19
- </div>
20
- </template>
21
-
22
- <script setup lang="ts">
23
- import { UI_I_Localization } from '~/lib/models/interfaces'
24
-
25
- const localization = computed<UI_I_Localization>(() => useLocal())
26
- </script>
27
-
28
- <style scoped lang="scss">
29
- #network-connect {
30
- margin-right: 4px;
31
- }
32
- </style>
1
+ <template>
2
+ <div class="hardware-other">
3
+ <atoms-stack-block :has-children="true" test-id="other-stack-block">
4
+ <template #stackBlockKey>
5
+ <div
6
+ id="vm-wizard-toggle-block-other"
7
+ data-id="vm-wizard-toggle-block-other"
8
+ >
9
+ <span>{{ localization.other }}</span>
10
+ </div>
11
+ </template>
12
+ <template #stackBlockContent>
13
+ <span>{{ localization.additionalHardware }}</span>
14
+ </template>
15
+ <template #stackChildren>
16
+ <common-vm-actions-common-customize-hardware-virtual-hardware-other-input-devices />
17
+ </template>
18
+ </atoms-stack-block>
19
+ </div>
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import { UI_I_Localization } from '~/lib/models/interfaces'
24
+
25
+ const localization = computed<UI_I_Localization>(() => useLocal())
26
+ </script>
27
+
28
+ <style scoped lang="scss">
29
+ #network-connect {
30
+ margin-right: 4px;
31
+ }
32
+ </style>