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,82 +0,0 @@
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.common.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 type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
41
- import type { 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,6 +0,0 @@
1
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
2
-
3
- export const usbControllerOptionsConfig: UI_I_OptionItem[] = [
4
- { text: 'USB 2.0', value: 'usb2' },
5
- { text: 'USB 3.1', value: 'usb31' },
6
- ]
@@ -1,21 +0,0 @@
1
- <template>
2
- <div>
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.inputDevices }}
6
- </template>
7
- <template #stackBlockContent>
8
- <p>{{ localization.common.keyboard }}</p>
9
- <p>{{ localization.common.pointingDevice }}</p>
10
- </template>
11
- </atoms-stack-block>
12
- </div>
13
- </template>
14
-
15
- <script setup lang="ts">
16
- import type { UI_I_Localization } from '~/lib/models/interfaces'
17
-
18
- const localization = computed<UI_I_Localization>(() => useLocal())
19
- </script>
20
-
21
- <style scoped lang="scss"></style>
@@ -1,32 +0,0 @@
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.common.other }}</span>
10
- </div>
11
- </template>
12
- <template #stackBlockContent>
13
- <span>{{ localization.common.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 type { 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,237 +0,0 @@
1
- <template>
2
- <div>
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.reservation }}
6
- </template>
7
- <template #stackBlockContent>
8
- <div class="flex-align-center">
9
- <div class="tooltip-top-left combobox-container flex-align-center">
10
- <atoms-tooltip-error
11
- :has-error="!!reservationLocalAndApiErrorsTexts"
12
- :selector="`#vm-wizard-${props.componentType}-reservation input`"
13
- @remove="onRemoveValidationError"
14
- >
15
- <template #elem>
16
- <atoms-combobox
17
- :id="`vm-wizard-${props.componentType}-reservation`"
18
- v-model="reservationLocal"
19
- :items="reservationOptions"
20
- :disabled="props.disabled"
21
- :test-id="`vm-wizard-${props.componentType}-reservation`"
22
- @click.stop
23
- @select="onSelectReservation"
24
- />
25
- </template>
26
- <template #content>{{
27
- reservationLocalAndApiErrorsTexts
28
- }}</template>
29
- </atoms-tooltip-error>
30
- </div>
31
- <div class="select">
32
- <select
33
- v-model="reservationTypeLocal"
34
- :disabled="props.disabled"
35
- :data-id="`reserve-type-select-${props.componentType}`"
36
- >
37
- <option
38
- v-for="(item, key) in reservationTypeOptions"
39
- :key="key"
40
- :value="item.value"
41
- >
42
- {{ item.text }}
43
- </option>
44
- </select>
45
- </div>
46
- </div>
47
- <div
48
- v-if="props.reserveGuestMemory !== undefined"
49
- class="flex-align-center"
50
- >
51
- <input
52
- id="reserve-guest-memory"
53
- :value="props.reserveGuestMemory"
54
- :data-id="`reserve-guest-memory-checkbox-${props.componentType}`"
55
- type="checkbox"
56
- disabled
57
- />
58
- <label
59
- for="reserve-guest-memory"
60
- :class="['label-text-normal all-memory', { 'div-disabled': true }]"
61
- >{{ localization.common.reserveGuestMemory }}</label
62
- >
63
- </div>
64
- </template>
65
- </atoms-stack-block>
66
- </div>
67
- </template>
68
-
69
- <script setup lang="ts">
70
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
71
- import type { UI_I_Localization } from '~/lib/models/interfaces'
72
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
73
- import {
74
- reservationOptionsFunc,
75
- reservationTypeOptionsFunc,
76
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/lib/config/options'
77
-
78
- const localization = computed<UI_I_Localization>(() => useLocal())
79
-
80
- const props = withDefaults(
81
- defineProps<{
82
- reservation: string
83
- reservationType: string
84
- type: 'mb' | 'mhz'
85
- componentType: string
86
- errorValidationFields: UI_I_ErrorValidationField[]
87
- disabled?: boolean
88
- reserveGuestMemory?: boolean
89
- multiply?: number
90
- }>(),
91
- {
92
- reserveGuestMemory: undefined,
93
- multiply: 1,
94
- }
95
- )
96
- const emits = defineEmits<{
97
- (event: 'update:reservation', value: string): void
98
- (event: 'update:reservation-type', value: string): void
99
- (event: 'invalid', value: boolean): void
100
- (event: 'remove-error-by-title', value: string): void
101
- }>()
102
-
103
- const { $binary } = useNuxtApp()
104
-
105
- const binaryKeys: [string, string] =
106
- props.type === 'mb' ? ['mb', 'gb'] : ['mhz', 'ghz']
107
-
108
- const minReservation = props.type === 'mb' ? 2 : 0
109
- const maxReservation = props.type === 'mb' ? 16384 : 4794
110
- const reservationOptions = computed<UI_I_OptionItem[]>(() => {
111
- const max = $binary.universalFromTo(
112
- maxReservation,
113
- binaryKeys[0],
114
- binaryKeys[1],
115
- 5
116
- )
117
- return reservationOptionsFunc(
118
- localization.value,
119
- minReservation,
120
- max,
121
- binaryKeys
122
- )
123
- })
124
- const onSelectReservation = ({
125
- value,
126
- type,
127
- }: {
128
- value: number
129
- type: string
130
- }): void => {
131
- reservationLocal.value = '' + value
132
- if (reservationTypeLocal.value !== type) {
133
- reservationTypeLocal.value = type
134
- }
135
- // if (reservationTypeLocal.value === type) {
136
- // reservationLocal.value = '' + value
137
- // return
138
- // }
139
- //
140
- // reservationLocal.value =
141
- // '' + $binary.universalFromTo(value, type, reservationTypeLocal.value, 12)
142
- }
143
-
144
- const reservationTypeOptions = ref<UI_I_OptionItem[]>(
145
- reservationTypeOptionsFunc(localization.value, binaryKeys)
146
- )
147
-
148
- const reservationLocal = computed<string>({
149
- get() {
150
- return props.reservation
151
- },
152
- set(newValue) {
153
- emits('update:reservation', '' + newValue)
154
- },
155
- })
156
- const reservationTypeLocal = computed<string>({
157
- get() {
158
- return props.reservationType
159
- },
160
- set(newValue) {
161
- emits('update:reservation-type', newValue)
162
- },
163
- })
164
-
165
- const reservationErrorLocalText = computed<string>(() => {
166
- const value =
167
- reservationTypeLocal.value === binaryKeys[0]
168
- ? +reservationLocal.value
169
- : $binary.universalFromTo(
170
- reservationLocal.value,
171
- binaryKeys[1],
172
- binaryKeys[0],
173
- 12
174
- )
175
- if (value < minReservation || value > maxReservation) {
176
- return localization.value.common.reservationMustBe
177
- .replace('{0}', `${minReservation} ${localization.value.common[binaryKeys[0]]}`)
178
- .replace('{1}', `${maxReservation} ${localization.value.common[binaryKeys[0]]}`)
179
- }
180
-
181
- const validValue = /^\d+(\.\d+)?$/.test(reservationLocal.value + '')
182
- if (!validValue) {
183
- return localization.value.common.inputContainsInvalidCharacters
184
- }
185
-
186
- if (value % props.multiply !== 0) {
187
- return localization.value.common.valueShouldMultiple.replace(
188
- '{0}',
189
- `${props.multiply} ${binaryKeys[0].toUpperCase()}`
190
- )
191
- }
192
-
193
- return ''
194
- })
195
-
196
- const typeError = computed<string>(
197
- () => `${props.componentType}.reservation_mb`
198
- )
199
-
200
- const apiError = computed<string>(() => {
201
- return (
202
- props.errorValidationFields?.find(
203
- (message) => message.field === typeError.value
204
- )?.error_message || ''
205
- )
206
- })
207
- const reservationLocalAndApiErrorsTexts = computed<string>(() => {
208
- const localError = reservationErrorLocalText.value
209
-
210
- let result = ''
211
- if (localError && !apiError.value) result = localError
212
- if (!localError && apiError.value) result = apiError.value
213
- if (localError && apiError.value) result = localError + ', ' + apiError.value
214
-
215
- return result
216
- })
217
- const reservationInvalid = computed<boolean>(
218
- () => !!reservationErrorLocalText.value
219
- )
220
- watch(
221
- reservationInvalid,
222
- (newValue) => {
223
- emits('invalid', newValue)
224
- },
225
- { immediate: true }
226
- )
227
-
228
- const onRemoveValidationError = (): void => {
229
- emits('remove-error-by-title', typeError.value)
230
- }
231
- </script>
232
-
233
- <style scoped>
234
- .all-memory {
235
- margin-left: 7px;
236
- }
237
- </style>
@@ -1,33 +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 reservationOptionsFunc = (
5
- localization: UI_I_Localization,
6
- minReservation: number,
7
- maxReservation: number,
8
- binaryKeys: [string, string]
9
- ): UI_I_OptionItem[] => {
10
- return [
11
- {
12
- text: `${localization.common.minimum}: ${minReservation} ${
13
- localization.common[binaryKeys[0]]
14
- }`,
15
- value: { value: minReservation, type: binaryKeys[0] },
16
- },
17
- {
18
- text: `${localization.common.maximum}: ${maxReservation} ${
19
- localization.common[binaryKeys[1]]
20
- }`,
21
- value: { value: maxReservation, type: binaryKeys[1] },
22
- },
23
- ]
24
- }
25
- export const reservationTypeOptionsFunc = (
26
- localization: UI_I_Localization,
27
- binaryKeys: [string, string]
28
- ): UI_I_OptionItem[] => {
29
- return [
30
- { text: localization.common[binaryKeys[0]], value: binaryKeys[0] },
31
- { text: localization.common[binaryKeys[1]], value: binaryKeys[1] },
32
- ]
33
- }
@@ -1,50 +0,0 @@
1
- <template>
2
- <div class="">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.threeDGraphics }}
6
- </template>
7
- <template #stackBlockContent>
8
- <div class="flex-align-center">
9
- <input
10
- id="graphics"
11
- v-model="graphicsLocal"
12
- data-id="graphics-checkbox"
13
- type="checkbox"
14
- />
15
- <label for="graphics" class="label-text-normal">{{
16
- localization.common.enable3dSupport
17
- }}</label>
18
- </div>
19
- </template>
20
- </atoms-stack-block>
21
- </div>
22
- </template>
23
-
24
- <script setup lang="ts">
25
- import type { UI_I_Localization } from '~/lib/models/interfaces'
26
-
27
- const localization = computed<UI_I_Localization>(() => useLocal())
28
-
29
- const props = defineProps<{
30
- graphics: boolean
31
- }>()
32
- const emits = defineEmits<{
33
- (event: 'update:graphics', value: boolean): void
34
- }>()
35
-
36
- const graphicsLocal = computed<boolean>({
37
- get() {
38
- return props.graphics
39
- },
40
- set(newValue) {
41
- emits('update:graphics', newValue)
42
- },
43
- })
44
- </script>
45
-
46
- <style scoped>
47
- #graphics {
48
- margin: 0 4px 4px 0;
49
- }
50
- </style>
@@ -1,121 +0,0 @@
1
- <template>
2
- <div class="">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.totalVideoMemory }}
6
- </template>
7
- <template #stackBlockContent>
8
- <div class="flex-align-center">
9
- <atoms-tooltip-error
10
- :has-error="!!totalVideoMemoryLocalAndApiErrorsTexts"
11
- selector="#vm-wizard-video-card-memory-field"
12
- @remove="onRemoveValidationError"
13
- >
14
- <template #elem>
15
- <div v-show="props.disabled">
16
- {{ localization.common.automatic }}
17
- </div>
18
- <div v-show="!props.disabled" class="flex-align-center">
19
- <input
20
- id="vm-wizard-video-card-memory-field"
21
- v-model="totalVideoMemoryLocal"
22
- data-id="vm-wizard-video-card-memory-input"
23
- type="text"
24
- :class="[{ 'has-error': totalVideoMemoryLocalErrorText }]"
25
- />
26
- </div>
27
- </template>
28
- <template #content>
29
- {{ totalVideoMemoryLocalAndApiErrorsTexts }}
30
- </template>
31
- </atoms-tooltip-error>
32
- <span>{{ localization.common.mb }}</span>
33
- </div>
34
- </template>
35
- </atoms-stack-block>
36
- </div>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import type { UI_I_Localization } from '~/lib/models/interfaces'
41
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
42
-
43
- const localization = computed<UI_I_Localization>(() => useLocal())
44
-
45
- const props = defineProps<{
46
- totalVideoMemory: number
47
- disabled: boolean
48
- isEdit: boolean
49
- errorValidationFields: UI_I_ErrorValidationField[]
50
- }>()
51
- const emits = defineEmits<{
52
- (event: 'update:total-video-memory', value: number): void
53
- (event: 'invalid', value: boolean): void
54
- (event: 'remove-error-by-title', value: string): void
55
- }>()
56
-
57
- const totalVideoMemoryLocal = computed<number>({
58
- get() {
59
- return props.totalVideoMemory
60
- },
61
- set(newValue) {
62
- // нужно для правильного отображения
63
- const totalVideoMemoryInput = document.getElementById(
64
- 'vm-wizard-video-card-memory-field'
65
- ) as HTMLInputElement
66
- totalVideoMemoryInput &&
67
- (totalVideoMemoryInput.value = '' + Math.floor(newValue))
68
- emits('update:total-video-memory', Math.floor(newValue))
69
- },
70
- })
71
-
72
- const totalVideoMemoryMin = 8
73
- const totalVideoMemoryMax = 128
74
- const totalVideoMemoryLocalErrorText = computed<string>(() => {
75
- const outOfRange =
76
- !props.totalVideoMemory ||
77
- props.totalVideoMemory < totalVideoMemoryMin ||
78
- props.totalVideoMemory > totalVideoMemoryMax
79
- if (outOfRange) {
80
- return localization.value.common.totalVideoMemoryMustBetween
81
- .replace('{0}', `${totalVideoMemoryMin} ${localization.value.common.mb}`)
82
- .replace('{1}', `${totalVideoMemoryMax} ${localization.value.common.mb}`)
83
- }
84
- return ''
85
- })
86
- watch(totalVideoMemoryLocalErrorText, (newValue: string) => {
87
- emits('invalid', !!newValue.length)
88
- })
89
-
90
- const typeError = 'video_card.memory_mb'
91
-
92
- const apiErrorLocal = computed<string>(() => {
93
- return (
94
- props.errorValidationFields?.find((message) => message.field === typeError)
95
- ?.error_message || ''
96
- )
97
- })
98
-
99
- const totalVideoMemoryLocalAndApiErrorsTexts = computed<string>(() => {
100
- const localError = totalVideoMemoryLocalErrorText.value
101
- const apiError = apiErrorLocal.value
102
-
103
- let result = ''
104
- if (localError && !apiError) result = localError
105
- if (apiError && !localError) result = apiError
106
- if (localError && apiError) result = localError + ', ' + apiError
107
- if (!localError && apiError) result = apiError
108
-
109
- return result
110
- })
111
-
112
- const onRemoveValidationError = (): void => {
113
- emits('remove-error-by-title', typeError)
114
- }
115
- </script>
116
-
117
- <style scoped lang="scss">
118
- .has-error {
119
- border: 1px solid #db2100;
120
- }
121
- </style>