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.
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +1 -1
- package/components/common/vm/actions/editSettings/EditSettingsNew.vue +1 -1
- package/package.json +1 -1
- package/components/common/vm/actions/common/_customizeHardware/CustomizeHardware.vue +0 -274
- package/components/common/vm/actions/common/_customizeHardware/lib/config/navItems.ts +0 -21
- package/components/common/vm/actions/common/_customizeHardware/lib/models/interfaces.ts +0 -7
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/VirtualHardware.vue +0 -702
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/browseView/BrowseView.vue +0 -203
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/browseView/lib/models/interfaces.ts +0 -8
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/bus/Bus.vue +0 -156
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/bus/lib/config/options.ts +0 -20
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +0 -270
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/lib/config/fileTypes.ts +0 -9
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/lib/config/options.ts +0 -11
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/lib/models/types.ts +0 -1
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +0 -57
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +0 -110
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Cpu.vue +0 -403
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/CpuHotPlug.vue +0 -56
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/CpuModel.vue +0 -225
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Hv.vue +0 -99
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Iommu.vue +0 -55
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/MaxCpu.vue +0 -106
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Pc.vue +0 -55
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/Sa.vue +0 -106
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/lib/config/cpuOptions.ts +0 -21
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/shares/Shares.vue +0 -160
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +0 -28
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/cpu/tooltip/Tooltip.vue +0 -59
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/config/binaryOptions.ts +0 -12
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/config/dropdownItems.ts +0 -66
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/models/interfaces.ts +0 -118
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/lib/models/types.ts +0 -4
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/limit/Limit.vue +0 -236
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/limit/lib/config/options.ts +0 -28
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/memory/Memory.vue +0 -329
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/memory/MemoryHotPlug.vue +0 -54
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/memory/lib/config/memoryOptions.ts +0 -35
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/DiskFile.vue +0 -24
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/MaximumSize.vue +0 -27
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +0 -462
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/cache/Cache.vue +0 -81
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/cache/lib/config/options.ts +0 -7
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +0 -153
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/limitIops/lib/config/options.ts +0 -28
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/Location.vue +0 -172
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/StorageModalOld.vue +0 -52
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/StorageModalNew.vue +0 -175
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/lib/config/table.ts +0 -167
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/mode/Mode.vue +0 -88
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/mode/lib/config/options.ts +0 -18
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/provisioning/Provisioning.vue +0 -88
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/provisioning/lib/config/options.ts +0 -15
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/sharing/Sharing.vue +0 -86
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newHardDisk/sharing/lib/config/options.ts +0 -12
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/Location.vue +0 -145
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +0 -305
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/adapterType/AdapterType.vue +0 -87
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/adapterType/lib/config/options.ts +0 -9
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +0 -148
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newNetwork/macAddress/lib/config/options.ts +0 -11
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +0 -168
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +0 -48
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +0 -49
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/lib/config/options.ts +0 -10
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/lib/config/options.ts +0 -7
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/note/Note.vue +0 -27
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +0 -42
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelection.vue +0 -57
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +0 -82
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/newUsbController/lib/config/options.ts +0 -6
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/other/InputDevices.vue +0 -21
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/other/Other.vue +0 -32
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/reservation/Reservation.vue +0 -237
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/reservation/lib/config/options.ts +0 -33
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/Graphics.vue +0 -50
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/TotalVideoMemory.vue +0 -121
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/VideoCard.vue +0 -182
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/lib/config/options.ts +0 -11
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/model/Model.vue +0 -59
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/model/lib/config/options.ts +0 -10
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +0 -83
- package/components/common/vm/actions/common/_customizeHardware/virtualHardware/videoCard/numberDisplays/lib/config/options.ts +0 -14
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/Vmoptions.vue +0 -181
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/BootOptions.vue +0 -114
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/Menu.vue +0 -50
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/Secure.vue +0 -50
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/delay/Delay.vue +0 -54
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/delay/lib/config/config.ts +0 -14
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +0 -84
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/firmware/lib/config/config.ts +0 -11
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/order/Order.vue +0 -201
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/bootOptions/order/lib/models/interfaces.ts +0 -9
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +0 -192
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/lib/models/interfaces.ts +0 -34
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +0 -52
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/FileTransfer.vue +0 -52
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/FolderSharing.vue +0 -51
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/PlaybackCompression.vue +0 -52
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/PowerControl.vue +0 -50
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +0 -254
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/ImgCompression.vue +0 -85
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/lib/config/config.ts +0 -14
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/JpegCompression.vue +0 -85
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/lib/config/config.ts +0 -12
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +0 -56
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/keymap/lib/config/config.ts +0 -6
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/MouseMode.vue +0 -57
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/lib/config/config.ts +0 -11
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +0 -142
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces.ts +0 -5
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils.ts +0 -12
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/SharePolicy.vue +0 -56
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/lib/config/config.ts +0 -11
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +0 -85
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/lib/config/config.ts +0 -12
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/type/Type.vue +0 -85
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/type/lib/config/config.ts +0 -7
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +0 -57
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/lib/config/config.ts +0 -14
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/ZlibCompression.vue +0 -85
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/lib/config/config.ts +0 -12
- package/components/common/vm/actions/common/_customizeHardware/vmoptions/tools/Tools.vue +0 -72
|
@@ -1,28 +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 limitOptionsFunc = (
|
|
5
|
-
localization: UI_I_Localization,
|
|
6
|
-
binaryKeys: [string, string]
|
|
7
|
-
): UI_I_OptionItem[] => {
|
|
8
|
-
return [
|
|
9
|
-
{
|
|
10
|
-
text: `${localization.common.minimum}: 0 ${localization.common[binaryKeys[0]]}`,
|
|
11
|
-
value: { value: 0, type: binaryKeys[0] },
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
text: `${localization.common.maximum}: ${localization.common.unlimited}`,
|
|
15
|
-
value: { value: 'Unlimited', type: binaryKeys[0] },
|
|
16
|
-
},
|
|
17
|
-
]
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const limitTypeOptionsFunc = (
|
|
21
|
-
localization: UI_I_Localization,
|
|
22
|
-
binaryKeys: [string, string]
|
|
23
|
-
): UI_I_OptionItem[] => {
|
|
24
|
-
return [
|
|
25
|
-
{ text: localization.common[binaryKeys[0]], value: binaryKeys[0] },
|
|
26
|
-
{ text: localization.common[binaryKeys[1]], value: binaryKeys[1] },
|
|
27
|
-
]
|
|
28
|
-
}
|
package/components/common/vm/actions/common/_customizeHardware/virtualHardware/memory/Memory.vue
DELETED
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hardware-memory">
|
|
3
|
-
<atoms-stack-block :has-children="true" test-id="memory-stack-block">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
<div
|
|
6
|
-
id="vm-wizard-toggle-block-memory"
|
|
7
|
-
data-id="vm-wizard-toggle-block-memory"
|
|
8
|
-
class="flex-align-center"
|
|
9
|
-
>
|
|
10
|
-
<span>{{ localization.common.memory }}</span>
|
|
11
|
-
<atoms-the-icon
|
|
12
|
-
v-show="memoryInvalid"
|
|
13
|
-
width="24px"
|
|
14
|
-
height="24px"
|
|
15
|
-
class="is-error tooltip-trigger"
|
|
16
|
-
name="info"
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
<template #stackBlockContent>
|
|
21
|
-
<div class="flex-align-center">
|
|
22
|
-
<atoms-tooltip-error
|
|
23
|
-
:has-error="!!memorySizeLocalAndApiErrorsTexts"
|
|
24
|
-
selector="#vm-wizard-memory-field input"
|
|
25
|
-
@remove="onRemoveValidationError"
|
|
26
|
-
>
|
|
27
|
-
<template #elem>
|
|
28
|
-
<atoms-combobox
|
|
29
|
-
id="vm-wizard-memory-field"
|
|
30
|
-
v-model="selectedMemory"
|
|
31
|
-
:items="memoryOptions"
|
|
32
|
-
:disabled="isMemoryDisabled"
|
|
33
|
-
test-id="vm-wizard-memory-field"
|
|
34
|
-
class="input-text-color"
|
|
35
|
-
@click.stop
|
|
36
|
-
@select="onSelectMemory"
|
|
37
|
-
/>
|
|
38
|
-
</template>
|
|
39
|
-
<template #content>{{ memorySizeLocalAndApiErrorsTexts }}</template>
|
|
40
|
-
</atoms-tooltip-error>
|
|
41
|
-
|
|
42
|
-
<div class="select ml-1">
|
|
43
|
-
<select
|
|
44
|
-
id="vm-wizard-memory-type-select"
|
|
45
|
-
v-model="memoryType"
|
|
46
|
-
data-id="vm-wizard-memory-type-select"
|
|
47
|
-
class="input-text-color"
|
|
48
|
-
@click.stop
|
|
49
|
-
>
|
|
50
|
-
<option
|
|
51
|
-
v-for="(item, key) in memoryTypeOptions"
|
|
52
|
-
:key="key"
|
|
53
|
-
:value="item.value"
|
|
54
|
-
>
|
|
55
|
-
{{ item.text }}
|
|
56
|
-
</option>
|
|
57
|
-
</select>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</template>
|
|
61
|
-
<template #stackChildren>
|
|
62
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-reservation
|
|
63
|
-
v-model:reservation="reservation"
|
|
64
|
-
v-model:reservation-type="reservationType"
|
|
65
|
-
v-model:reserve-guest-memory="reserveGuestMemory"
|
|
66
|
-
:error-validation-fields="props.errorValidationFields"
|
|
67
|
-
:multiply="2"
|
|
68
|
-
:disabled="isDisabled"
|
|
69
|
-
component-type="memory"
|
|
70
|
-
type="mb"
|
|
71
|
-
class="memory-reservation"
|
|
72
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
73
|
-
@invalid="reservationInvalid = $event"
|
|
74
|
-
/>
|
|
75
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-limit
|
|
76
|
-
v-model:limit="limit"
|
|
77
|
-
v-model:limit-type="limitType"
|
|
78
|
-
:error-validation-fields="props.errorValidationFields"
|
|
79
|
-
:limit-options="limitOptions"
|
|
80
|
-
:multiply="2"
|
|
81
|
-
:disabled="isDisabled"
|
|
82
|
-
type="mb"
|
|
83
|
-
component-type="memory"
|
|
84
|
-
class="memory-limit"
|
|
85
|
-
@invalid="limitInvalid = $event"
|
|
86
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
87
|
-
/>
|
|
88
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-memory-hot-plug
|
|
89
|
-
v-model:memory-hot-plug="memoryHotPlug"
|
|
90
|
-
:disabled="isDisabledMemoryHotPlug"
|
|
91
|
-
/>
|
|
92
|
-
</template>
|
|
93
|
-
</atoms-stack-block>
|
|
94
|
-
</div>
|
|
95
|
-
</template>
|
|
96
|
-
|
|
97
|
-
<script setup lang="ts">
|
|
98
|
-
import type { API_UI_I_VmEditMemory } from '~/lib/models/store/vm/interfaces'
|
|
99
|
-
import type { UI_I_SendDataMemory } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
100
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
101
|
-
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
102
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
103
|
-
import {
|
|
104
|
-
memoryOptionsFunc,
|
|
105
|
-
memoryTypeOptionsFunc,
|
|
106
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/lib/config/memoryOptions'
|
|
107
|
-
|
|
108
|
-
const props = defineProps<{
|
|
109
|
-
maxMemory: number
|
|
110
|
-
isEdit: boolean
|
|
111
|
-
errorValidationFields: UI_I_ErrorValidationField[]
|
|
112
|
-
state?: string | number
|
|
113
|
-
memory?: API_UI_I_VmEditMemory
|
|
114
|
-
}>()
|
|
115
|
-
const emits = defineEmits<{
|
|
116
|
-
(event: 'send-data', value: UI_I_SendDataMemory): void
|
|
117
|
-
(event: 'invalid', value: boolean): void
|
|
118
|
-
(event: 'remove-error-by-title', value: string): void
|
|
119
|
-
}>()
|
|
120
|
-
|
|
121
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
122
|
-
const { $binary } = useNuxtApp()
|
|
123
|
-
|
|
124
|
-
const minMemoryInMb = 128
|
|
125
|
-
watch(
|
|
126
|
-
() => props.maxMemory,
|
|
127
|
-
(newValue) => {
|
|
128
|
-
memoryOptions.value = memoryOptionsFunc(
|
|
129
|
-
localization.value,
|
|
130
|
-
minMemoryInMb,
|
|
131
|
-
newValue
|
|
132
|
-
)
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
const isDisabled = computed<boolean>(() => {
|
|
137
|
-
return props.state === 2
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
const isMemoryDisabled = computed<boolean>(
|
|
141
|
-
() => isDisabled.value && !memoryHotPlug.value
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
const selectedMemory = ref<number>(4)
|
|
145
|
-
watch(selectedMemory, (newValue) => {
|
|
146
|
-
const valueInt = parseInt('' + newValue)
|
|
147
|
-
selectedMemory.value = isNaN(valueInt) ? 0 : valueInt
|
|
148
|
-
})
|
|
149
|
-
const memoryType = ref<string>('gb')
|
|
150
|
-
const memoryTypeOptions = ref<UI_I_OptionItem[]>(
|
|
151
|
-
memoryTypeOptionsFunc(localization.value)
|
|
152
|
-
)
|
|
153
|
-
const memoryInMb = computed<number>(() => {
|
|
154
|
-
if (memoryType.value === 'mb') {
|
|
155
|
-
return +selectedMemory.value
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return $binary.universalFromTo(+selectedMemory.value, memoryType.value, 'mb')
|
|
159
|
-
})
|
|
160
|
-
|
|
161
|
-
const memoryOptions = ref<UI_I_OptionItem[]>(
|
|
162
|
-
memoryOptionsFunc(localization.value, minMemoryInMb, props.maxMemory)
|
|
163
|
-
)
|
|
164
|
-
const onSelectMemory = ({
|
|
165
|
-
value,
|
|
166
|
-
type,
|
|
167
|
-
}: {
|
|
168
|
-
value: number
|
|
169
|
-
type: string
|
|
170
|
-
}): void => {
|
|
171
|
-
selectedMemory.value = value
|
|
172
|
-
if (memoryType.value !== type) {
|
|
173
|
-
memoryType.value = type
|
|
174
|
-
}
|
|
175
|
-
// if (memoryType.value === 'mb') {
|
|
176
|
-
// selectedMemory.value = mb
|
|
177
|
-
// return
|
|
178
|
-
// }
|
|
179
|
-
//
|
|
180
|
-
// selectedMemory.value = $binary.universalFromTo(mb, 'mb', memoryType.value, 12)
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const memoryErrorLocalText = computed<string>(() => {
|
|
184
|
-
const validValue = /^\d+(\.\d+)?$/.test(selectedMemory.value + '')
|
|
185
|
-
if (!validValue) {
|
|
186
|
-
return localization.value.common.inputContainsInvalidCharacters
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
const maxMemoryInGb = $binary.mbToGb(props.maxMemory)
|
|
190
|
-
if (memoryInMb.value < minMemoryInMb || memoryInMb.value > props.maxMemory) {
|
|
191
|
-
return localization.value.common.memoryMustBe
|
|
192
|
-
.replace('{0}', `${minMemoryInMb} ${localization.value.common.mb}`)
|
|
193
|
-
.replace('{1}', `${maxMemoryInGb} ${localization.value.common.gb}`)
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (memoryInMb.value % 2 !== 0) {
|
|
197
|
-
return localization.value.common.valueShouldMultiple.replace(
|
|
198
|
-
'{0}',
|
|
199
|
-
`${2} ${localization.value.common.mb}`
|
|
200
|
-
)
|
|
201
|
-
}
|
|
202
|
-
return ''
|
|
203
|
-
})
|
|
204
|
-
|
|
205
|
-
const apiErrorLocal = computed<string>(() => {
|
|
206
|
-
return (
|
|
207
|
-
props.errorValidationFields?.find(
|
|
208
|
-
(message) => message.field === 'memory.size_mb'
|
|
209
|
-
)?.error_message || ''
|
|
210
|
-
)
|
|
211
|
-
})
|
|
212
|
-
|
|
213
|
-
const memorySizeLocalAndApiErrorsTexts = computed<string>(() => {
|
|
214
|
-
const localError = memoryErrorLocalText.value
|
|
215
|
-
const apiError = apiErrorLocal.value
|
|
216
|
-
|
|
217
|
-
let result = ''
|
|
218
|
-
if (localError && !apiError) result = localError
|
|
219
|
-
if (apiError && !localError) result = apiError
|
|
220
|
-
if (localError && apiError) result = localError + ', ' + apiError
|
|
221
|
-
if (!localError && apiError) result = apiError
|
|
222
|
-
|
|
223
|
-
return result
|
|
224
|
-
})
|
|
225
|
-
|
|
226
|
-
const reservationInvalid = ref<boolean>(false)
|
|
227
|
-
const limitInvalid = ref<boolean>(false)
|
|
228
|
-
const memoryInvalid = computed<boolean>(
|
|
229
|
-
() =>
|
|
230
|
-
!!memorySizeLocalAndApiErrorsTexts.value ||
|
|
231
|
-
reservationInvalid.value ||
|
|
232
|
-
limitInvalid.value
|
|
233
|
-
)
|
|
234
|
-
watch(
|
|
235
|
-
memoryInvalid,
|
|
236
|
-
(newValue) => {
|
|
237
|
-
emits('invalid', newValue)
|
|
238
|
-
},
|
|
239
|
-
{ immediate: true }
|
|
240
|
-
)
|
|
241
|
-
|
|
242
|
-
const reservation = ref<string>('2')
|
|
243
|
-
watch(reservation, (newValue) => {
|
|
244
|
-
const valueInt = parseInt('' + newValue)
|
|
245
|
-
reservation.value = isNaN(valueInt) ? '0' : '' + valueInt
|
|
246
|
-
})
|
|
247
|
-
const reservationType = ref<string>('mb')
|
|
248
|
-
const reserveGuestMemory = ref<boolean>(false)
|
|
249
|
-
|
|
250
|
-
const limit = ref<string>('Unlimited')
|
|
251
|
-
watch(limit, (newValue) => {
|
|
252
|
-
const valueInt = parseInt('' + newValue)
|
|
253
|
-
limit.value !== 'Unlimited' &&
|
|
254
|
-
(limit.value = isNaN(valueInt) ? '0' : '' + valueInt)
|
|
255
|
-
})
|
|
256
|
-
const limitType = ref<string>('mb')
|
|
257
|
-
const limitOptions = computed<UI_I_OptionItem[] | undefined>(() => {
|
|
258
|
-
if (memoryHotPlug.value)
|
|
259
|
-
return memoryOptionsFunc(
|
|
260
|
-
localization.value,
|
|
261
|
-
memoryInMb.value,
|
|
262
|
-
props.maxMemory
|
|
263
|
-
)
|
|
264
|
-
})
|
|
265
|
-
|
|
266
|
-
const memoryHotPlug = ref<boolean>(false)
|
|
267
|
-
const isDisabledMemoryHotPlug = computed<boolean>(
|
|
268
|
-
() => memoryInMb.value >= props.maxMemory || isDisabled.value
|
|
269
|
-
)
|
|
270
|
-
watch(isDisabledMemoryHotPlug, (newValue) => {
|
|
271
|
-
if (newValue) memoryHotPlug.value = false
|
|
272
|
-
})
|
|
273
|
-
|
|
274
|
-
watch(
|
|
275
|
-
[memoryInMb, memoryHotPlug, reservation, reservationType, limit, limitType],
|
|
276
|
-
() => {
|
|
277
|
-
const reservationInMb =
|
|
278
|
-
reservationType.value === 'mb'
|
|
279
|
-
? reservation.value
|
|
280
|
-
: '' +
|
|
281
|
-
$binary.universalFromTo(
|
|
282
|
-
reservation.value,
|
|
283
|
-
reservationType.value,
|
|
284
|
-
'mb',
|
|
285
|
-
12
|
|
286
|
-
)
|
|
287
|
-
const limitInMb =
|
|
288
|
-
limit.value === 'Unlimited'
|
|
289
|
-
? limit.value
|
|
290
|
-
: limitType.value === 'gb'
|
|
291
|
-
? $binary.gbToMb(+limit.value)
|
|
292
|
-
: +limit.value
|
|
293
|
-
emits('send-data', {
|
|
294
|
-
memory: '' + memoryInMb.value,
|
|
295
|
-
hotplug: memoryHotPlug.value,
|
|
296
|
-
reservation_mb: reservationInMb,
|
|
297
|
-
limit_mb: limitInMb,
|
|
298
|
-
})
|
|
299
|
-
},
|
|
300
|
-
{ immediate: true }
|
|
301
|
-
)
|
|
302
|
-
|
|
303
|
-
// Добавляем данные для редактирования
|
|
304
|
-
watch(
|
|
305
|
-
() => props.memory,
|
|
306
|
-
(newValue) => {
|
|
307
|
-
if (!newValue) return
|
|
308
|
-
|
|
309
|
-
const sizeInGb = $binary.mbToGb(newValue.size_mb)
|
|
310
|
-
if (sizeInGb < 1) {
|
|
311
|
-
selectedMemory.value = newValue.size_mb
|
|
312
|
-
memoryType.value = 'mb'
|
|
313
|
-
} else {
|
|
314
|
-
selectedMemory.value = sizeInGb
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
reservation.value = '' + newValue.reservation_mb
|
|
318
|
-
limit.value = '' + newValue.limit_mb
|
|
319
|
-
memoryHotPlug.value = newValue.hotplug
|
|
320
|
-
},
|
|
321
|
-
{ immediate: true }
|
|
322
|
-
)
|
|
323
|
-
|
|
324
|
-
const onRemoveValidationError = (): void => {
|
|
325
|
-
emits('remove-error-by-title', 'memory.size_mb')
|
|
326
|
-
}
|
|
327
|
-
</script>
|
|
328
|
-
|
|
329
|
-
<style scoped lang="scss"></style>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.common.memoryHotPlug }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<div class="flex-align-center">
|
|
9
|
-
<input
|
|
10
|
-
id="memory-hot-plug"
|
|
11
|
-
v-model="memoryHotPlugLocal"
|
|
12
|
-
data-id="memory-hot-plug-input"
|
|
13
|
-
type="checkbox"
|
|
14
|
-
:disabled="props.disabled"
|
|
15
|
-
/>
|
|
16
|
-
<label
|
|
17
|
-
for="memory-hot-plug"
|
|
18
|
-
:class="['label-text-normal', props.disabled && 'div-disabled']"
|
|
19
|
-
>{{ localization.common.enable }}</label
|
|
20
|
-
>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
</atoms-stack-block>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script setup lang="ts">
|
|
28
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
29
|
-
|
|
30
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
31
|
-
|
|
32
|
-
const props = defineProps<{
|
|
33
|
-
memoryHotPlug: boolean
|
|
34
|
-
disabled: boolean
|
|
35
|
-
}>()
|
|
36
|
-
const emits = defineEmits<{
|
|
37
|
-
(event: 'update:memory-hot-plug', value: boolean): void
|
|
38
|
-
}>()
|
|
39
|
-
|
|
40
|
-
const memoryHotPlugLocal = computed<boolean>({
|
|
41
|
-
get() {
|
|
42
|
-
return props.memoryHotPlug
|
|
43
|
-
},
|
|
44
|
-
set(newValue) {
|
|
45
|
-
emits('update:memory-hot-plug', newValue)
|
|
46
|
-
},
|
|
47
|
-
})
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<style scoped>
|
|
51
|
-
#memory-hot-plug {
|
|
52
|
-
margin: 4px 4px 0 0;
|
|
53
|
-
}
|
|
54
|
-
</style>
|
|
@@ -1,35 +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 memoryOptionsFunc = (
|
|
5
|
-
localization: UI_I_Localization,
|
|
6
|
-
min: number,
|
|
7
|
-
max: number
|
|
8
|
-
): UI_I_OptionItem[] => {
|
|
9
|
-
const { $binary } = useNuxtApp()
|
|
10
|
-
const minValueText = $binary.round(min)
|
|
11
|
-
const [value, type] = minValueText.split(' ')
|
|
12
|
-
const maxValue = $binary.mbToGb(max, 0)
|
|
13
|
-
|
|
14
|
-
return [
|
|
15
|
-
{
|
|
16
|
-
text: `${localization.common.minimum}: ${minValueText}`,
|
|
17
|
-
value: { value: +value, type: type.toLowerCase() },
|
|
18
|
-
testId: 'option-minimum-memory',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
text: `${localization.common.maximum}: ${maxValue} ${localization.common.gb}`,
|
|
22
|
-
value: { value: maxValue, type: 'gb' },
|
|
23
|
-
testId: 'option-minimum-memory',
|
|
24
|
-
},
|
|
25
|
-
]
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export const memoryTypeOptionsFunc = (
|
|
29
|
-
localization: UI_I_Localization
|
|
30
|
-
): UI_I_OptionItem[] => {
|
|
31
|
-
return [
|
|
32
|
-
{ text: localization.common.mb, value: 'mb' },
|
|
33
|
-
{ text: localization.common.gb, value: 'gb' },
|
|
34
|
-
]
|
|
35
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.common.diskFile }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<span> {{ props.path }} </span>
|
|
9
|
-
</template>
|
|
10
|
-
</atoms-stack-block>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
16
|
-
|
|
17
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
18
|
-
|
|
19
|
-
const props = defineProps<{
|
|
20
|
-
path: string
|
|
21
|
-
}>()
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style scoped></style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.common.maximumSize }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<span> {{ freeGb }} </span>
|
|
9
|
-
</template>
|
|
10
|
-
</atoms-stack-block>
|
|
11
|
-
</div>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
16
|
-
|
|
17
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
18
|
-
const { $binary } = useNuxtApp()
|
|
19
|
-
|
|
20
|
-
const props = defineProps<{
|
|
21
|
-
freeMb: number
|
|
22
|
-
}>()
|
|
23
|
-
|
|
24
|
-
const freeGb = computed<number>(() => $binary.round(props.freeMb))
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style scoped></style>
|