bfg-common 1.4.397 → 1.4.399

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 (123) hide show
  1. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +1 -1
  2. package/components/common/vm/actions/editSettings/EditSettingsNew.vue +1 -1
  3. package/package.json +1 -1
  4. package/components/common/vm/actions/common/_customizeHardware/CustomizeHardware.vue +0 -274
  5. package/components/common/vm/actions/common/_customizeHardware/lib/config/navItems.ts +0 -21
  6. package/components/common/vm/actions/common/_customizeHardware/lib/models/interfaces.ts +0 -7
  7. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/VirtualHardware.vue +0 -702
  8. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/browseView/BrowseView.vue +0 -203
  9. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/browseView/lib/models/interfaces.ts +0 -8
  10. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/bus/Bus.vue +0 -156
  11. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/bus/lib/config/options.ts +0 -20
  12. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +0 -270
  13. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/lib/config/fileTypes.ts +0 -9
  14. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/lib/config/options.ts +0 -11
  15. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/lib/models/types.ts +0 -1
  16. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +0 -57
  17. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +0 -110
  18. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Cpu.vue +0 -403
  19. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/CpuHotPlug.vue +0 -56
  20. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/CpuModel.vue +0 -225
  21. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Hv.vue +0 -99
  22. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Iommu.vue +0 -55
  23. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/MaxCpu.vue +0 -106
  24. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Pc.vue +0 -55
  25. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Sa.vue +0 -106
  26. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/lib/config/cpuOptions.ts +0 -21
  27. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/shares/Shares.vue +0 -160
  28. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +0 -28
  29. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/tooltip/Tooltip.vue +0 -59
  30. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/config/binaryOptions.ts +0 -12
  31. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/config/dropdownItems.ts +0 -66
  32. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/models/interfaces.ts +0 -118
  33. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/models/types.ts +0 -4
  34. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/limit/Limit.vue +0 -236
  35. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/limit/lib/config/options.ts +0 -28
  36. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/memory/Memory.vue +0 -329
  37. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/memory/MemoryHotPlug.vue +0 -54
  38. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/memory/lib/config/memoryOptions.ts +0 -35
  39. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/DiskFile.vue +0 -24
  40. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/MaximumSize.vue +0 -27
  41. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +0 -462
  42. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/cache/Cache.vue +0 -81
  43. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/cache/lib/config/options.ts +0 -7
  44. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +0 -153
  45. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/limitIops/lib/config/options.ts +0 -28
  46. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/Location.vue +0 -172
  47. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/StorageModalOld.vue +0 -52
  48. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/StorageModalNew.vue +0 -175
  49. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/lib/config/table.ts +0 -167
  50. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/mode/Mode.vue +0 -88
  51. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/mode/lib/config/options.ts +0 -18
  52. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/provisioning/Provisioning.vue +0 -88
  53. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/provisioning/lib/config/options.ts +0 -15
  54. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/sharing/Sharing.vue +0 -86
  55. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/sharing/lib/config/options.ts +0 -12
  56. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/Location.vue +0 -145
  57. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +0 -305
  58. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/adapterType/AdapterType.vue +0 -87
  59. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/adapterType/lib/config/options.ts +0 -9
  60. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +0 -148
  61. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/macAddress/lib/config/options.ts +0 -11
  62. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +0 -168
  63. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +0 -48
  64. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +0 -49
  65. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/lib/config/options.ts +0 -10
  66. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +0 -7
  67. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/note/Note.vue +0 -27
  68. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +0 -42
  69. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelection.vue +0 -57
  70. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +0 -82
  71. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newUsbController/lib/config/options.ts +0 -6
  72. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/other/InputDevices.vue +0 -21
  73. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/other/Other.vue +0 -32
  74. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/reservation/Reservation.vue +0 -237
  75. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/reservation/lib/config/options.ts +0 -33
  76. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/Graphics.vue +0 -50
  77. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/TotalVideoMemory.vue +0 -121
  78. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/VideoCard.vue +0 -182
  79. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/lib/config/options.ts +0 -11
  80. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/model/Model.vue +0 -59
  81. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/model/lib/config/options.ts +0 -10
  82. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +0 -83
  83. package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/numberDisplays/lib/config/options.ts +0 -14
  84. package/components/common/vm/actions/common/_customizeHardware/vmoptions/Vmoptions.vue +0 -181
  85. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/BootOptions.vue +0 -114
  86. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/Menu.vue +0 -50
  87. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/Secure.vue +0 -50
  88. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/delay/Delay.vue +0 -54
  89. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/delay/lib/config/config.ts +0 -14
  90. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +0 -84
  91. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/firmware/lib/config/config.ts +0 -11
  92. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/order/Order.vue +0 -201
  93. package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/order/lib/models/interfaces.ts +0 -9
  94. package/components/common/vm/actions/common/_customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +0 -192
  95. package/components/common/vm/actions/common/_customizeHardware/vmoptions/lib/models/interfaces.ts +0 -34
  96. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +0 -52
  97. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/FileTransfer.vue +0 -52
  98. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/FolderSharing.vue +0 -51
  99. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/PlaybackCompression.vue +0 -52
  100. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/PowerControl.vue +0 -50
  101. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +0 -254
  102. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/ImgCompression.vue +0 -85
  103. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/lib/config/config.ts +0 -14
  104. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/JpegCompression.vue +0 -85
  105. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/lib/config/config.ts +0 -12
  106. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +0 -56
  107. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/keymap/lib/config/config.ts +0 -6
  108. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/MouseMode.vue +0 -57
  109. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/lib/config/config.ts +0 -11
  110. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +0 -142
  111. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces.ts +0 -5
  112. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils.ts +0 -12
  113. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/SharePolicy.vue +0 -56
  114. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/lib/config/config.ts +0 -11
  115. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +0 -85
  116. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/lib/config/config.ts +0 -12
  117. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/type/Type.vue +0 -85
  118. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/type/lib/config/config.ts +0 -7
  119. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +0 -57
  120. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/lib/config/config.ts +0 -14
  121. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/ZlibCompression.vue +0 -85
  122. package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/lib/config/config.ts +0 -12
  123. package/components/common/vm/actions/common/_customizeHardware/vmoptions/tools/Tools.vue +0 -72
@@ -1,182 +0,0 @@
1
- <template>
2
- <div class="hardware-video-card">
3
- <atoms-stack-block :has-children="true" test-id="video-card-stack-block">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-video-card"
7
- data-id="vm-wizard-toggle-block-video-card"
8
- class="flex-align-center"
9
- >
10
- <span>{{ localization.common.videoCard }}: {{ videoCardModelName }}</span>
11
- <atoms-the-icon
12
- v-show="invalid"
13
- width="24px"
14
- height="24px"
15
- class="is-error tooltip-trigger"
16
- name="info"
17
- />
18
- </div>
19
- </template>
20
- <template #stackBlockContent>
21
- <atoms-tooltip-error
22
- :has-error="!!apiError"
23
- selector=".vm-wizard-video-card"
24
- @remove="onRemoveValidationError"
25
- >
26
- <template #elem>
27
- <div class="select">
28
- <select
29
- id="vm-wizard-video-card"
30
- v-model="selectedVideoCard"
31
- data-id="vm-wizard-video-card-select"
32
- class="vm-wizard-video-card input-text-color"
33
- :disabled="props.isEdit && props.state !== 1"
34
- @click.stop
35
- >
36
- <option
37
- v-for="(item, key) in videoCardOptions"
38
- :key="key"
39
- :value="item.value"
40
- >
41
- {{ item.text }}
42
- </option>
43
- </select>
44
- </div>
45
- </template>
46
- <template #content>{{ apiError }}</template>
47
- </atoms-tooltip-error>
48
- </template>
49
- <template #stackChildren>
50
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
51
- v-model:number-displays="numberDisplays"
52
- :disabled="isDisabled"
53
- :error-validation-fields="props.errorValidationFields"
54
- @remove-error-by-title="emits('remove-error-by-title', $event)"
55
- />
56
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-total-video-memory
57
- v-model:total-video-memory="totalVideoMemory"
58
- :disabled="isDisabled"
59
- :is-edit="props.isEdit"
60
- :error-validation-fields="props.errorValidationFields"
61
- @invalid="invalid = $event"
62
- @remove-error-by-title="emits('remove-error-by-title', $event)"
63
- />
64
- <!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
65
- <!-- v-models:graphics="graphics"-->
66
- <!-- />-->
67
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model
68
- v-model:video-card-model="videoCardModel"
69
- :disabled="isDisabled"
70
- />
71
- </template>
72
- </atoms-stack-block>
73
- </div>
74
- </template>
75
-
76
- <script setup lang="ts">
77
- import type { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
78
- import type { UI_I_Localization } from '~/lib/models/interfaces'
79
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
80
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
81
- import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
82
- import { videoCardOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
83
-
84
- const props = defineProps<{
85
- isEdit: boolean
86
- errorValidationFields: UI_I_ErrorValidationField[]
87
- videoCard?: UI_I_SendDataVideoCard
88
- state?: string | number
89
- }>()
90
- const emits = defineEmits<{
91
- (event: 'send-data', value: UI_I_SendDataVideoCard): void
92
- (event: 'invalid', value: boolean): void
93
- (event: 'remove-error-by-title', value: string): void
94
- }>()
95
-
96
- const localization = computed<UI_I_Localization>(() => useLocal())
97
-
98
- const selectedVideoCard = ref<number>(1)
99
- const videoCardOptions = ref<UI_I_OptionItem[]>(
100
- videoCardOptionsFunc(localization.value)
101
- )
102
-
103
- const isDisabled = computed<boolean>(
104
- () => selectedVideoCard.value === 0 || (props.isEdit && props.state !== 1)
105
- )
106
- watch(isDisabled, (val) => {
107
- if (!val) {
108
- return
109
- }
110
-
111
- numberDisplays.value = '1'
112
- })
113
- const numberDisplays = ref<string>('1')
114
-
115
- const totalVideoMemory = ref<number>(64)
116
- const invalid = ref<boolean>(false)
117
- watch(
118
- invalid,
119
- (newValue) => {
120
- emits('invalid', newValue)
121
- },
122
- { immediate: true }
123
- )
124
-
125
- // const graphics = ref(false)
126
-
127
- const videoCardModel = ref<string>('qxl')
128
- const videoCardModelOptions = ref<UI_I_OptionItem[]>(
129
- videoCardModelOptionsConfig
130
- )
131
- const videoCardModelName = computed<string>(
132
- () =>
133
- videoCardModelOptions.value.find(
134
- (videoCard) => videoCard.value === videoCardModel.value
135
- )?.text || ''
136
- )
137
-
138
- watch(
139
- [numberDisplays, totalVideoMemory, videoCardModel],
140
- () => {
141
- emits('send-data', {
142
- adapter: videoCardModel.value,
143
- displays: +numberDisplays.value,
144
- memory_mb: totalVideoMemory.value,
145
- })
146
- },
147
- { immediate: true }
148
- )
149
-
150
- // Добавляем данные для редактирования
151
- watch(
152
- () => props.videoCard,
153
- (newValue) => {
154
- if (!newValue) return
155
-
156
- selectedVideoCard.value = 1
157
- videoCardModel.value = newValue.adapter
158
- numberDisplays.value = '' + newValue.displays
159
- totalVideoMemory.value = newValue.memory_mb
160
- },
161
- { immediate: true }
162
- )
163
-
164
- const typeError = 'video_card.adapter'
165
-
166
- const apiError = computed<string>(() => {
167
- return (
168
- props.errorValidationFields?.find((message) => message.field === typeError)
169
- ?.error_message || ''
170
- )
171
- })
172
-
173
- const onRemoveValidationError = (): void => {
174
- emits('remove-error-by-title', typeError)
175
- }
176
- </script>
177
-
178
- <style scoped lang="scss">
179
- #network-connect {
180
- margin-right: 4px;
181
- }
182
- </style>
@@ -1,11 +0,0 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
3
-
4
- export const videoCardOptionsFunc = (
5
- localization: UI_I_Localization
6
- ): UI_I_OptionItem[] => {
7
- return [
8
- { text: localization.common.autoDetectSettings, value: 0 },
9
- { text: localization.common.specifyCustomSettings, value: 1 },
10
- ]
11
- }
@@ -1,59 +0,0 @@
1
- <template>
2
- <div class="">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.videoCardModel }}
6
- </template>
7
- <template #stackBlockContent>
8
- <div class="select">
9
- <select
10
- id="vm-wizard-video-card-adapter-field"
11
- v-model="videoCardModelLocal"
12
- data-id="vm-wizard-video-card-adapter-field-select"
13
- :disabled="props.disabled"
14
- >
15
- <option
16
- v-for="(item, key) in videoCardModelOptions"
17
- :key="key"
18
- :value="item.value"
19
- :disabled="item.disabled"
20
- >
21
- {{ item.text }}
22
- </option>
23
- </select>
24
- </div>
25
- </template>
26
- </atoms-stack-block>
27
- </div>
28
- </template>
29
-
30
- <script setup lang="ts">
31
- import type { UI_I_Localization } from '~/lib/models/interfaces'
32
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
33
- import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
34
-
35
- const localization = computed<UI_I_Localization>(() => useLocal())
36
-
37
- const props = defineProps<{
38
- videoCardModel: string
39
- disabled: boolean
40
- }>()
41
- const emits = defineEmits<{
42
- (event: 'update:video-card-model', value: string): void
43
- }>()
44
-
45
- const videoCardModelOptions = ref<UI_I_OptionItem[]>(
46
- videoCardModelOptionsConfig
47
- )
48
-
49
- const videoCardModelLocal = computed<string>({
50
- get() {
51
- return props.videoCardModel
52
- },
53
- set(newValue) {
54
- emits('update:video-card-model', newValue)
55
- },
56
- })
57
- </script>
58
-
59
- <style scoped></style>
@@ -1,10 +0,0 @@
1
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
2
-
3
- export const videoCardModelOptionsConfig: UI_I_OptionItem[] = [
4
- // { text: 'VGA', value: 'vga', disabled: true },
5
- // { text: 'CIRRUS', value: 'cirrus' },
6
- // { text: 'VMVGA', value: 'vmvga', disabled: true },
7
- { text: 'QXL', value: 'qxl' },
8
- // { text: 'virtio', value: 'virtio' },
9
- { text: 'none', value: 'none' },
10
- ]
@@ -1,83 +0,0 @@
1
- <template>
2
- <div class="">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.numberDisplays }}
6
- </template>
7
- <template #stackBlockContent>
8
- <atoms-tooltip-error
9
- :has-error="!!apiError"
10
- selector="#vm-wizard-video-card-display-field"
11
- @remove="onRemoveValidationError"
12
- >
13
- <template #elem>
14
- <div class="select">
15
- <select
16
- id="vm-wizard-video-card-display-field"
17
- v-model="numberDisplaysLocal"
18
- data-id="vm-wizard-video-card-display-field-select"
19
- :disabled="disabled"
20
- >
21
- <option
22
- v-for="(item, key) in numberDisplaysOptions"
23
- :key="key"
24
- :value="item.value"
25
- >
26
- {{ item.text }}
27
- </option>
28
- </select>
29
- </div>
30
- </template>
31
- <template #content>{{ apiError }}</template>
32
- </atoms-tooltip-error>
33
- </template>
34
- </atoms-stack-block>
35
- </div>
36
- </template>
37
-
38
- <script setup lang="ts">
39
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
40
- import type { UI_I_Localization } from '~/lib/models/interfaces'
41
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
42
- import { numberDisplaysOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/lib/config/options'
43
-
44
- const localization = computed<UI_I_Localization>(() => useLocal())
45
-
46
- const props = defineProps<{
47
- numberDisplays: string
48
- disabled: boolean
49
- errorValidationFields: UI_I_ErrorValidationField[]
50
- }>()
51
- const emits = defineEmits<{
52
- (event: 'update:number-displays', value: string): void
53
- (event: 'remove-error-by-title', value: string): void
54
- }>()
55
-
56
- const numberDisplaysOptions = ref<UI_I_OptionItem[]>(
57
- numberDisplaysOptionsConfig
58
- )
59
-
60
- const numberDisplaysLocal = computed<string>({
61
- get() {
62
- return props.numberDisplays
63
- },
64
- set(newValue) {
65
- emits('update:number-displays', newValue)
66
- },
67
- })
68
-
69
- const typeError = 'video_card.displays'
70
-
71
- const apiError = computed<string>(() => {
72
- return (
73
- props.errorValidationFields?.find((message) => message.field === typeError)
74
- ?.error_message || ''
75
- )
76
- })
77
-
78
- const onRemoveValidationError = (): void => {
79
- emits('remove-error-by-title', typeError)
80
- }
81
- </script>
82
-
83
- <style scoped></style>
@@ -1,14 +0,0 @@
1
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
2
-
3
- export const numberDisplaysOptionsConfig: UI_I_OptionItem[] = [
4
- { text: '1', value: '1' },
5
- { text: '2', value: '2' },
6
- { text: '3', value: '3' },
7
- { text: '4', value: '4' },
8
- // { text: '5', value: '5' },
9
- // { text: '6', value: '6' },
10
- // { text: '7', value: '7' },
11
- // { text: '8', value: '8' },
12
- // { text: '9', value: '9' },
13
- // { text: '10', value: '10' },
14
- ]
@@ -1,181 +0,0 @@
1
- <template>
2
- <div class="vm-options">
3
- <div class="clr-component">
4
- <div class="stack-view">
5
- <common-vm-actions-common-customize-hardware-vmoptions-general-options
6
- v-model:vm-name="vmNameLocal"
7
- v-model:guest-machine-type="guestMachineTypeLocal"
8
- v-model:guest-os-family="guestOsFamilyLocal"
9
- v-model:guest-os-version="guestOsVersionLocal"
10
- :is-edit="props.isEdit"
11
- :is-clone="props.isClone"
12
- :state="props.state"
13
- />
14
- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
15
- :error-validation-fields="props.errorValidationFields"
16
- :remote-console-options="props.options?.remote_console"
17
- :is-edit="props.isEdit"
18
- :state="props.state"
19
- @send-data="sendDataRemoteConsoleOptionsMethod"
20
- @invalid="remoteConsoleOptionsInvalid = $event"
21
- @remove-error-by-title="emits('remove-error-by-title', $event)"
22
- />
23
- <common-vm-actions-common-customize-hardware-vmoptions-tools
24
- :tools="props.options?.guest_tools?.enabled"
25
- @send-data="sendDataToolsMethod"
26
- />
27
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options
28
- :error-validation-fields="props.errorValidationFields"
29
- :hard-disks="props.hardDisks"
30
- :cd-dvd-drives="props.cdDvdDrives"
31
- :networks="props.networks"
32
- :boot-options="props.options?.boot_options"
33
- :is-edit="props.isEdit"
34
- @change-boot-order="changeBootOrder"
35
- @send-data="sendDataBootOptionsMethod"
36
- @remove-error-by-title="emits('remove-error-by-title', $event)"
37
- />
38
- </div>
39
- </div>
40
- </div>
41
- </template>
42
-
43
- <script setup lang="ts">
44
- import type {
45
- UI_I_SendDataRemoteConsoleOptions,
46
- UI_I_SendDataTools,
47
- UI_I_SendDataBootOptions,
48
- UI_I_SendDataVmoptions,
49
- } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
50
- import type {
51
- UI_I_SendDataNewCdDvdDrive,
52
- UI_I_SendDataNewHardDisk,
53
- UI_I_SendDataNewNetwork,
54
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
55
- import type { UI_I_Localization } from '~/lib/models/interfaces'
56
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
57
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
58
- import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
59
-
60
- const props = defineProps<{
61
- vmName: string
62
- guestMachineType: UI_I_OptionItem | null
63
- guestOsFamily: UI_I_OptionItem | null
64
- guestOsVersion: UI_I_OptionItem | null
65
- hardDisks: UI_I_SendDataNewHardDisk[] | null
66
- cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
67
- networks: UI_I_SendDataNewNetwork[] | null
68
- isEdit: boolean
69
- isClone: boolean
70
- errorValidationFields: UI_I_ErrorValidationField[]
71
- options?: UI_I_SendDataVmoptions
72
- state?: string | number
73
- }>()
74
- const emits = defineEmits<{
75
- (
76
- event: 'change-boot-order',
77
- value: [
78
- UI_I_SendDataNewHardDisk[],
79
- UI_I_SendDataNewCdDvdDrive[],
80
- UI_I_SendDataNewNetwork[]
81
- ]
82
- ): void
83
- (event: 'send-data', value: UI_I_SendDataVmoptions): void
84
- (event: 'invalid', value: string[]): void
85
- (event: 'update:vm-name', value: string): void
86
- (event: 'update:guest-machine-type', value: UI_I_OptionItem | null): void
87
- (event: 'update:guest-os-family', value: UI_I_OptionItem | null): void
88
- (event: 'update:guest-os-version', value: UI_I_OptionItem | null): void
89
- (event: 'remove-error-by-title', value: string): void
90
- }>()
91
-
92
- const vmNameLocal = computed<string>({
93
- get() {
94
- return props.vmName
95
- },
96
- set(newValue) {
97
- emits('update:vm-name', newValue)
98
- },
99
- })
100
- const guestMachineTypeLocal = computed<UI_I_OptionItem | null>({
101
- get() {
102
- return props.guestMachineType
103
- },
104
- set(newValue) {
105
- emits('update:guest-machine-type', newValue)
106
- },
107
- })
108
- const guestOsFamilyLocal = computed<UI_I_OptionItem | null>({
109
- get() {
110
- return props.guestOsFamily
111
- },
112
- set(newValue) {
113
- emits('update:guest-os-family', newValue)
114
- },
115
- })
116
- const guestOsVersionLocal = computed<UI_I_OptionItem | null>({
117
- get() {
118
- return props.guestOsVersion
119
- },
120
- set(newValue) {
121
- emits('update:guest-os-version', newValue)
122
- },
123
- })
124
-
125
- const localization = computed<UI_I_Localization>(() => useLocal())
126
-
127
- const sendDataRemoteConsoleOptions =
128
- ref<UI_I_SendDataRemoteConsoleOptions | null>(null)
129
- const sendDataRemoteConsoleOptionsMethod = (
130
- data: UI_I_SendDataRemoteConsoleOptions
131
- ): void => {
132
- sendDataRemoteConsoleOptions.value = data
133
- sendData()
134
- }
135
-
136
- const sendDataTools = ref<UI_I_SendDataTools | null>(null)
137
- const sendDataToolsMethod = (data: UI_I_SendDataTools): void => {
138
- sendDataTools.value = data
139
- sendData()
140
- }
141
-
142
- const sendDataBootOptions = ref<UI_I_SendDataBootOptions | null>(null)
143
- const sendDataBootOptionsMethod = (data: UI_I_SendDataBootOptions): void => {
144
- sendDataBootOptions.value = data
145
- sendData()
146
- }
147
-
148
- const changeBootOrder = (data: UI_T_ChangeBootOrder): void => {
149
- emits('change-boot-order', data)
150
- }
151
-
152
- const sendData = (): void => {
153
- emits('send-data', {
154
- remote_console: sendDataRemoteConsoleOptions.value,
155
- guest_tools: sendDataTools.value,
156
- boot_options: sendDataBootOptions.value,
157
- })
158
- }
159
-
160
- const remoteConsoleOptionsInvalid = ref<boolean>(false)
161
-
162
- watch(
163
- remoteConsoleOptionsInvalid,
164
- (newValue) => {
165
- const remoteConsoleOptions = newValue
166
- ? localization.value.common.remoteConsoleOptions
167
- : ''
168
- emits('invalid', [remoteConsoleOptions])
169
- },
170
- { immediate: true }
171
- )
172
- </script>
173
-
174
- <style scoped lang="scss">
175
- .clr-component {
176
- padding-top: 36px;
177
- }
178
- .stack-view {
179
- background-color: var(--block-view-bg-color);
180
- }
181
- </style>
@@ -1,114 +0,0 @@
1
- <template>
2
- <div class="boot-options">
3
- <atoms-stack-block :has-children="true" test-id="boot-options-stack-block">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-boot-option"
7
- data-id="vm-wizard-toggle-block-boot-option"
8
- class="flex-align-center"
9
- >
10
- <span>{{ localization.common.bootOptions }}</span>
11
- </div>
12
- </template>
13
- <template #stackChildren>
14
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-firmware
15
- v-model:firmware="firmware"
16
- :error-validation-fields="props.errorValidationFields"
17
- :is-edit="props.isEdit"
18
- @remove-error-by-title="emits('remove-error-by-title', $event)"
19
- />
20
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-secure
21
- v-if="firmware === 'uefi'"
22
- v-model:secure-boot="secureBoot"
23
- />
24
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-menu
25
- v-model:boot-menu="bootMenu"
26
- />
27
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-delay
28
- v-model:boot-delay="bootDelay"
29
- />
30
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options-order
31
- :hard-disks="props.hardDisks"
32
- :cd-dvd-drives="props.cdDvdDrives"
33
- :networks="props.networks"
34
- @change="onChangeBootOrder"
35
- />
36
- </template>
37
- </atoms-stack-block>
38
- </div>
39
- </template>
40
-
41
- <script setup lang="ts">
42
- import type { UI_I_SendDataBootOptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
43
- import type {
44
- UI_I_SendDataNewCdDvdDrive,
45
- UI_I_SendDataNewHardDisk,
46
- UI_I_SendDataNewNetwork,
47
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
48
- import type { UI_I_Localization } from '~/lib/models/interfaces'
49
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
50
- import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
51
-
52
- const emits = defineEmits<{
53
- (
54
- event: 'change-boot-order',
55
- value: [
56
- UI_I_SendDataNewHardDisk[],
57
- UI_I_SendDataNewCdDvdDrive[],
58
- UI_I_SendDataNewNetwork[]
59
- ]
60
- ): void
61
- (event: 'send-data', value: UI_I_SendDataBootOptions): void
62
- (event: 'remove-error-by-title', value: string): void
63
- }>()
64
-
65
- const localization = computed<UI_I_Localization>(() => useLocal())
66
-
67
- const props = defineProps<{
68
- errorValidationFields: UI_I_ErrorValidationField[]
69
- hardDisks: UI_I_SendDataNewHardDisk[] | null
70
- cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
71
- networks: UI_I_SendDataNewNetwork[] | null
72
- bootOptions?: UI_I_SendDataBootOptions
73
- isEdit: boolean
74
- }>()
75
-
76
- const firmware = ref<string>('efi')
77
-
78
- const secureBoot = ref<boolean>(true)
79
-
80
- const bootMenu = ref<boolean>(true)
81
-
82
- const bootDelay = ref<number>(1000)
83
-
84
- const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
85
- emits('change-boot-order', data)
86
- }
87
-
88
- watch(
89
- [firmware, secureBoot, bootMenu, bootDelay],
90
- () => {
91
- emits('send-data', {
92
- firmware: firmware.value,
93
- boot_delay_ms: bootDelay.value,
94
- boot_menu: bootMenu.value,
95
- })
96
- },
97
- { immediate: true }
98
- )
99
-
100
- // Добавляем данные для редактирования
101
- watch(
102
- () => props.bootOptions,
103
- (newValue) => {
104
- if (!newValue || !props.bootOptions) return
105
-
106
- firmware.value = props.bootOptions.firmware
107
- bootDelay.value = props.bootOptions.boot_delay_ms
108
- bootMenu.value = props.bootOptions.boot_menu
109
- },
110
- { immediate: true }
111
- )
112
- </script>
113
-
114
- <style scoped lang="scss"></style>