bfg-common 1.4.591 → 1.4.592

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 (96) hide show
  1. package/assets/localization/local_be.json +2 -0
  2. package/assets/localization/local_en.json +3 -1
  3. package/assets/localization/local_hy.json +2 -0
  4. package/assets/localization/local_kk.json +3 -1
  5. package/assets/localization/local_ru.json +2 -0
  6. package/assets/localization/local_zh.json +2 -0
  7. package/components/atoms/TheIcon3.vue +50 -50
  8. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  9. package/components/atoms/stack/StackBlock.vue +185 -185
  10. package/components/atoms/table/dataGrid/DataGrid.vue +1633 -1633
  11. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +222 -222
  12. package/components/common/browse/BrowseNew.vue +237 -237
  13. package/components/common/browse/BrowseOld.vue +217 -217
  14. package/components/common/browse/blocks/contents/Files.vue +35 -35
  15. package/components/common/browse/blocks/contents/FilesOld.vue +70 -70
  16. package/components/common/browse/blocks/contents/filesNew/FilesNew.vue +92 -92
  17. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  18. package/components/common/context/lib/models/interfaces.ts +30 -30
  19. package/components/common/context/recursion/Recursion.vue +86 -86
  20. package/components/common/context/recursion/RecursionNew.vue +199 -199
  21. package/components/common/context/recursion/RecursionOld.vue +213 -213
  22. package/components/common/layout/theHeader/helpMenu/About.vue +85 -85
  23. package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +103 -103
  24. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +152 -152
  25. package/components/common/spiceConsole/Drawer.vue +370 -370
  26. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  27. package/components/common/split/horizontal/HorizontalNew.vue +358 -358
  28. package/components/common/split/vertical/Vertical.vue +160 -160
  29. package/components/common/vm/actions/add/Add.vue +617 -617
  30. package/components/common/vm/actions/clone/lib/config/steps.ts +129 -129
  31. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +267 -267
  32. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +264 -264
  33. package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +219 -219
  34. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +118 -118
  35. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +161 -161
  36. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +165 -165
  37. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
  38. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +55 -55
  39. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +147 -147
  40. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/mode/ModeOld.vue +55 -55
  41. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/SharingNew.vue +44 -44
  42. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetworkNew.vue +124 -124
  43. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/LocationOld.vue +134 -134
  44. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/New.vue +63 -63
  45. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/Table.vue +74 -74
  46. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +95 -95
  47. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  48. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressNew.vue +69 -69
  49. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressOld.vue +83 -83
  50. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +85 -85
  51. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +91 -91
  52. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +35 -35
  53. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoNew.vue +48 -48
  54. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
  55. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
  56. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
  57. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridNew.vue +30 -30
  58. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +46 -46
  59. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +56 -56
  60. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  61. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/OtherNew.vue +27 -27
  62. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemoryNew.vue +54 -54
  63. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
  64. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +102 -102
  65. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +75 -75
  66. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +26 -26
  67. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +57 -57
  68. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/FirmwareNew.vue +42 -42
  69. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/MenuNew.vue +25 -25
  70. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +171 -171
  71. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +50 -50
  72. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +141 -141
  73. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +140 -140
  74. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +30 -30
  75. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +30 -30
  76. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharingNew.vue +30 -30
  77. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  78. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/KeymapNew.vue +39 -39
  79. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +100 -100
  80. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionNew.vue +38 -38
  81. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
  82. package/components/common/vm/actions/common/select/storage/Storage.vue +130 -130
  83. package/components/common/vm/actions/common/select/storage/StorageOld.vue +129 -129
  84. package/components/common/vm/actions/common/select/storage/new/New.vue +159 -159
  85. package/components/common/vm/actions/editSettings/EditSettings.vue +214 -214
  86. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +182 -182
  87. package/components/common/vm/actions/editSettings/new/New.vue +176 -176
  88. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  89. package/composables/productNameLocal.ts +30 -30
  90. package/package.json +1 -1
  91. package/plugins/date.ts +233 -233
  92. package/plugins/recursion.ts +311 -311
  93. package/public/spice-console/lib/images/bitmap.js +203 -203
  94. package/public/spice-console/network/spicechannel.js +383 -383
  95. package/store/main/mutations.ts +7 -7
  96. package/store/main/state.ts +7 -7
@@ -1,27 +1,27 @@
1
- <template>
2
- <ui-stack-block :has-children="true" test-id="other-stack-block">
3
- <template #stackBlockKey>
4
- <div
5
- id="vm-wizard-toggle-block-other"
6
- data-id="vm-wizard-toggle-block-other"
7
- >
8
- <span>{{ localization.common.other }}</span>
9
- </div>
10
- </template>
11
- <template #stackBlockContent>
12
- <span>{{ localization.common.additionalHardware }} (2)</span>
13
- </template>
14
- <template #stackChildren>
15
- <common-vm-actions-common-customize-hardware-virtual-hardware-other-input-devices />
16
- </template>
17
- </ui-stack-block>
18
- </template>
19
-
20
- <script setup lang="ts">
21
- import type { UI_I_Localization } from '~/lib/models/interfaces'
22
-
23
- const localization = computed<UI_I_Localization>(() => useLocal())
24
- </script>
25
-
26
- <style scoped lang="scss">
27
- </style>
1
+ <template>
2
+ <ui-stack-block :has-children="true" test-id="other-stack-block">
3
+ <template #stackBlockKey>
4
+ <div
5
+ id="vm-wizard-toggle-block-other"
6
+ data-id="vm-wizard-toggle-block-other"
7
+ >
8
+ <span>{{ localization.common.other }}</span>
9
+ </div>
10
+ </template>
11
+ <template #stackBlockContent>
12
+ <span>{{ localization.common.additionalHardware }} (2)</span>
13
+ </template>
14
+ <template #stackChildren>
15
+ <common-vm-actions-common-customize-hardware-virtual-hardware-other-input-devices />
16
+ </template>
17
+ </ui-stack-block>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
22
+
23
+ const localization = computed<UI_I_Localization>(() => useLocal())
24
+ </script>
25
+
26
+ <style scoped lang="scss">
27
+ </style>
@@ -1,54 +1,54 @@
1
- <template>
2
- <ui-stack-block :has-children="false">
3
- <template #stackBlockKey>
4
- {{ localization.common.totalVideoMemory }}
5
- </template>
6
- <template #stackBlockContent>
7
- <div class="total-video-memory-content flex-align-center">
8
- <div v-show="props.disabled">
9
- {{ localization.common.automatic }}
10
- </div>
11
- <div v-show="!props.disabled">
12
- <ui-input-with-tooltip
13
- id="vm-wizard-video-card-memory-field"
14
- v-model="totalVideoMemory"
15
- test-id="vm-wizard-video-card-memory-input"
16
- type="text"
17
- size="sm"
18
- :error-text="props.errorText"
19
- />
20
- </div>
21
- <span class="unit-text">{{ localization.common.mb }}</span>
22
- </div>
23
- </template>
24
- </ui-stack-block>
25
- </template>
26
-
27
- <script setup lang="ts">
28
- import type { UI_I_Localization } from '~/lib/models/interfaces'
29
-
30
- const totalVideoMemory = defineModel<number>('totalVideoMemory', {
31
- required: true,
32
- })
33
-
34
- const props = defineProps<{
35
- disabled: boolean
36
- errorText: string
37
- totalVideoMemoryLocalErrorText: string
38
- }>()
39
- // const emits = defineEmits<{
40
- // (event: 'remove-error'): void
41
- // }>()
42
-
43
- const localization = computed<UI_I_Localization>(() => useLocal())
44
- </script>
45
-
46
- <style scoped lang="scss">
47
- .unit-text {
48
- margin-left: 10px;
49
- }
50
-
51
- :deep(.ui-main.ui-main-sm .ui-main-input) {
52
- height: 26px;
53
- }
54
- </style>
1
+ <template>
2
+ <ui-stack-block :has-children="false">
3
+ <template #stackBlockKey>
4
+ {{ localization.common.totalVideoMemory }}
5
+ </template>
6
+ <template #stackBlockContent>
7
+ <div class="total-video-memory-content flex-align-center">
8
+ <div v-show="props.disabled">
9
+ {{ localization.common.automatic }}
10
+ </div>
11
+ <div v-show="!props.disabled">
12
+ <ui-input-with-tooltip
13
+ id="vm-wizard-video-card-memory-field"
14
+ v-model="totalVideoMemory"
15
+ test-id="vm-wizard-video-card-memory-input"
16
+ type="text"
17
+ size="sm"
18
+ :error-text="props.errorText"
19
+ />
20
+ </div>
21
+ <span class="unit-text">{{ localization.common.mb }}</span>
22
+ </div>
23
+ </template>
24
+ </ui-stack-block>
25
+ </template>
26
+
27
+ <script setup lang="ts">
28
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
29
+
30
+ const totalVideoMemory = defineModel<number>('totalVideoMemory', {
31
+ required: true,
32
+ })
33
+
34
+ const props = defineProps<{
35
+ disabled: boolean
36
+ errorText: string
37
+ totalVideoMemoryLocalErrorText: string
38
+ }>()
39
+ // const emits = defineEmits<{
40
+ // (event: 'remove-error'): void
41
+ // }>()
42
+
43
+ const localization = computed<UI_I_Localization>(() => useLocal())
44
+ </script>
45
+
46
+ <style scoped lang="scss">
47
+ .unit-text {
48
+ margin-left: 10px;
49
+ }
50
+
51
+ :deep(.ui-main.ui-main-sm .ui-main-input) {
52
+ height: 26px;
53
+ }
54
+ </style>
@@ -1,145 +1,145 @@
1
- <template>
2
- <common-vm-actions-common-customize-hardware-vmoptions-new
3
- v-if="isNewView"
4
- v-model:vm-name="vmName"
5
- v-model:guest-machine-type="guestMachineType"
6
- v-model:guest-os-family="guestOsFamily"
7
- v-model:guest-os-version="guestOsVersion"
8
- v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
9
- :hard-disks="props.hardDisks"
10
- :cd-dvd-drives="props.cdDvdDrives"
11
- :networks="props.networks"
12
- :is-edit="props.isEdit"
13
- :is-clone="props.isClone"
14
- :error-validation-fields="props.errorValidationFields"
15
- :options="props.options"
16
- :state="props.state"
17
- @change-boot-order="emits('change-boot-order', $event)"
18
- @send-data-remote-console-options="sendDataRemoteConsoleOptionsMethod"
19
- @send-data-tools="sendDataToolsMethod"
20
- @send-data-boot-options="sendDataBootOptionsMethod"
21
- @remove-error-by-title="emits('remove-error-by-title', $event)"
22
- />
23
- <common-vm-actions-common-customize-hardware-vmoptions-old
24
- v-else
25
- v-model:vm-name="vmName"
26
- v-model:guest-machine-type="guestMachineType"
27
- v-model:guest-os-family="guestOsFamily"
28
- v-model:guest-os-version="guestOsVersion"
29
- v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
30
- :hard-disks="props.hardDisks"
31
- :cd-dvd-drives="props.cdDvdDrives"
32
- :networks="props.networks"
33
- :is-edit="props.isEdit"
34
- :is-clone="props.isClone"
35
- :error-validation-fields="props.errorValidationFields"
36
- :options="props.options"
37
- :state="props.state"
38
- @change-boot-order="emits('change-boot-order', $event)"
39
- @send-data-remote-console-options="sendDataRemoteConsoleOptionsMethod"
40
- @send-data-tools="sendDataToolsMethod"
41
- @send-data-boot-options="sendDataBootOptionsMethod"
42
- @remove-error-by-title="emits('remove-error-by-title', $event)"
43
- />
44
- </template>
45
-
46
- <script setup lang="ts">
47
- import type {
48
- UI_I_SendDataRemoteConsoleOptions,
49
- UI_I_SendDataTools,
50
- UI_I_SendDataBootOptions,
51
- UI_I_SendDataVmoptions,
52
- } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
53
- import type {
54
- UI_I_SendDataNewCdDvdDrive,
55
- UI_I_SendDataNewHardDisk,
56
- UI_I_SendDataNewNetwork,
57
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
58
- import type { UI_I_Localization } from '~/lib/models/interfaces'
59
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
60
-
61
- const vmName = defineModel<string>('vmName', { required: true })
62
- const guestMachineType = defineModel<string>('guestMachineType', {
63
- required: true,
64
- })
65
- const guestOsFamily = defineModel<string>('guestOsFamily', { required: true })
66
- const guestOsVersion = defineModel<string>('guestOsVersion', {
67
- required: true,
68
- })
69
- const remoteConsoleOptionsInvalid = defineModel<boolean>(
70
- 'remoteConsoleOptionsInvalid',
71
- { required: true }
72
- )
73
-
74
- const props = defineProps<{
75
- hardDisks: UI_I_SendDataNewHardDisk[] | null
76
- cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
77
- networks: UI_I_SendDataNewNetwork[] | null
78
- isEdit: boolean
79
- isClone: boolean
80
- errorValidationFields: UI_I_ErrorValidationField[]
81
- options?: UI_I_SendDataVmoptions
82
- state?: string | number
83
- }>()
84
- const emits = defineEmits<{
85
- (
86
- event: 'change-boot-order',
87
- value: [
88
- UI_I_SendDataNewHardDisk[],
89
- UI_I_SendDataNewCdDvdDrive[],
90
- UI_I_SendDataNewNetwork[]
91
- ]
92
- ): void
93
- (event: 'send-data', value: UI_I_SendDataVmoptions): void
94
- (event: 'invalid', value: string[]): void
95
- (event: 'remove-error-by-title', value: string): void
96
- }>()
97
-
98
- const { $store }: any = useNuxtApp()
99
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
100
-
101
- const localization = computed<UI_I_Localization>(() => useLocal())
102
-
103
- const sendDataRemoteConsoleOptions =
104
- ref<UI_I_SendDataRemoteConsoleOptions | null>(null)
105
- const sendDataRemoteConsoleOptionsMethod = (
106
- data: UI_I_SendDataRemoteConsoleOptions
107
- ): void => {
108
- sendDataRemoteConsoleOptions.value = data
109
- sendData()
110
- }
111
-
112
- const sendDataTools = ref<UI_I_SendDataTools | null>(null)
113
- const sendDataToolsMethod = (data: UI_I_SendDataTools): void => {
114
- sendDataTools.value = data
115
- sendData()
116
- }
117
-
118
- const sendDataBootOptions = ref<UI_I_SendDataBootOptions | null>(null)
119
- const sendDataBootOptionsMethod = (data: UI_I_SendDataBootOptions): void => {
120
- sendDataBootOptions.value = data
121
- sendData()
122
- }
123
-
124
- const sendData = (): void => {
125
- emits('send-data', {
126
- remote_console: sendDataRemoteConsoleOptions.value,
127
- guest_tools: sendDataTools.value,
128
- boot_options: sendDataBootOptions.value,
129
- })
130
- }
131
-
132
- watch(
133
- remoteConsoleOptionsInvalid,
134
- (newValue) => {
135
- const remoteConsoleOptions = newValue
136
- ? localization.value.common.remoteConsoleOptions
137
- : ''
138
- emits('invalid', [remoteConsoleOptions])
139
- },
140
- { immediate: true }
141
- )
142
- </script>
143
-
144
- <style scoped lang="scss">
145
- </style>
1
+ <template>
2
+ <common-vm-actions-common-customize-hardware-vmoptions-new
3
+ v-if="isNewView"
4
+ v-model:vm-name="vmName"
5
+ v-model:guest-machine-type="guestMachineType"
6
+ v-model:guest-os-family="guestOsFamily"
7
+ v-model:guest-os-version="guestOsVersion"
8
+ v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
9
+ :hard-disks="props.hardDisks"
10
+ :cd-dvd-drives="props.cdDvdDrives"
11
+ :networks="props.networks"
12
+ :is-edit="props.isEdit"
13
+ :is-clone="props.isClone"
14
+ :error-validation-fields="props.errorValidationFields"
15
+ :options="props.options"
16
+ :state="props.state"
17
+ @change-boot-order="emits('change-boot-order', $event)"
18
+ @send-data-remote-console-options="sendDataRemoteConsoleOptionsMethod"
19
+ @send-data-tools="sendDataToolsMethod"
20
+ @send-data-boot-options="sendDataBootOptionsMethod"
21
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
22
+ />
23
+ <common-vm-actions-common-customize-hardware-vmoptions-old
24
+ v-else
25
+ v-model:vm-name="vmName"
26
+ v-model:guest-machine-type="guestMachineType"
27
+ v-model:guest-os-family="guestOsFamily"
28
+ v-model:guest-os-version="guestOsVersion"
29
+ v-model:remote-console-options-invalid="remoteConsoleOptionsInvalid"
30
+ :hard-disks="props.hardDisks"
31
+ :cd-dvd-drives="props.cdDvdDrives"
32
+ :networks="props.networks"
33
+ :is-edit="props.isEdit"
34
+ :is-clone="props.isClone"
35
+ :error-validation-fields="props.errorValidationFields"
36
+ :options="props.options"
37
+ :state="props.state"
38
+ @change-boot-order="emits('change-boot-order', $event)"
39
+ @send-data-remote-console-options="sendDataRemoteConsoleOptionsMethod"
40
+ @send-data-tools="sendDataToolsMethod"
41
+ @send-data-boot-options="sendDataBootOptionsMethod"
42
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
43
+ />
44
+ </template>
45
+
46
+ <script setup lang="ts">
47
+ import type {
48
+ UI_I_SendDataRemoteConsoleOptions,
49
+ UI_I_SendDataTools,
50
+ UI_I_SendDataBootOptions,
51
+ UI_I_SendDataVmoptions,
52
+ } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
53
+ import type {
54
+ UI_I_SendDataNewCdDvdDrive,
55
+ UI_I_SendDataNewHardDisk,
56
+ UI_I_SendDataNewNetwork,
57
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
58
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
59
+ import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
60
+
61
+ const vmName = defineModel<string>('vmName', { required: true })
62
+ const guestMachineType = defineModel<string>('guestMachineType', {
63
+ required: true,
64
+ })
65
+ const guestOsFamily = defineModel<string>('guestOsFamily', { required: true })
66
+ const guestOsVersion = defineModel<string>('guestOsVersion', {
67
+ required: true,
68
+ })
69
+ const remoteConsoleOptionsInvalid = defineModel<boolean>(
70
+ 'remoteConsoleOptionsInvalid',
71
+ { required: true }
72
+ )
73
+
74
+ const props = defineProps<{
75
+ hardDisks: UI_I_SendDataNewHardDisk[] | null
76
+ cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
77
+ networks: UI_I_SendDataNewNetwork[] | null
78
+ isEdit: boolean
79
+ isClone: boolean
80
+ errorValidationFields: UI_I_ErrorValidationField[]
81
+ options?: UI_I_SendDataVmoptions
82
+ state?: string | number
83
+ }>()
84
+ const emits = defineEmits<{
85
+ (
86
+ event: 'change-boot-order',
87
+ value: [
88
+ UI_I_SendDataNewHardDisk[],
89
+ UI_I_SendDataNewCdDvdDrive[],
90
+ UI_I_SendDataNewNetwork[]
91
+ ]
92
+ ): void
93
+ (event: 'send-data', value: UI_I_SendDataVmoptions): void
94
+ (event: 'invalid', value: string[]): void
95
+ (event: 'remove-error-by-title', value: string): void
96
+ }>()
97
+
98
+ const { $store }: any = useNuxtApp()
99
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
100
+
101
+ const localization = computed<UI_I_Localization>(() => useLocal())
102
+
103
+ const sendDataRemoteConsoleOptions =
104
+ ref<UI_I_SendDataRemoteConsoleOptions | null>(null)
105
+ const sendDataRemoteConsoleOptionsMethod = (
106
+ data: UI_I_SendDataRemoteConsoleOptions
107
+ ): void => {
108
+ sendDataRemoteConsoleOptions.value = data
109
+ sendData()
110
+ }
111
+
112
+ const sendDataTools = ref<UI_I_SendDataTools | null>(null)
113
+ const sendDataToolsMethod = (data: UI_I_SendDataTools): void => {
114
+ sendDataTools.value = data
115
+ sendData()
116
+ }
117
+
118
+ const sendDataBootOptions = ref<UI_I_SendDataBootOptions | null>(null)
119
+ const sendDataBootOptionsMethod = (data: UI_I_SendDataBootOptions): void => {
120
+ sendDataBootOptions.value = data
121
+ sendData()
122
+ }
123
+
124
+ const sendData = (): void => {
125
+ emits('send-data', {
126
+ remote_console: sendDataRemoteConsoleOptions.value,
127
+ guest_tools: sendDataTools.value,
128
+ boot_options: sendDataBootOptions.value,
129
+ })
130
+ }
131
+
132
+ watch(
133
+ remoteConsoleOptionsInvalid,
134
+ (newValue) => {
135
+ const remoteConsoleOptions = newValue
136
+ ? localization.value.common.remoteConsoleOptions
137
+ : ''
138
+ emits('invalid', [remoteConsoleOptions])
139
+ },
140
+ { immediate: true }
141
+ )
142
+ </script>
143
+
144
+ <style scoped lang="scss">
145
+ </style>
@@ -1,102 +1,102 @@
1
- <template>
2
- <div class="vm-options">
3
- <common-vm-actions-common-customize-hardware-vmoptions-general-options
4
- v-model:vm-name="vmName"
5
- v-model:guest-machine-type="guestMachineType"
6
- v-model:guest-os-family="guestOsFamily"
7
- v-model:guest-os-version="guestOsVersion"
8
- :is-edit="props.isEdit"
9
- :is-clone="props.isClone"
10
- :state="props.state"
11
- />
12
- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
13
- :error-validation-fields="props.errorValidationFields"
14
- :remote-console-options="props.options?.remote_console"
15
- :is-edit="props.isEdit"
16
- :state="props.state"
17
- @send-data="emits('send-data-remote-console-options', $event)"
18
- @invalid="remoteConsoleOptionsInvalid = $event"
19
- @remove-error-by-title="emits('remove-error-by-title', $event)"
20
- />
21
- <common-vm-actions-common-customize-hardware-vmoptions-tools
22
- :tools="props.options?.guest_tools?.enabled"
23
- @send-data="emits('send-data-tools', $event)"
24
- />
25
- <common-vm-actions-common-customize-hardware-vmoptions-boot-options
26
- :error-validation-fields="props.errorValidationFields"
27
- :hard-disks="props.hardDisks"
28
- :cd-dvd-drives="props.cdDvdDrives"
29
- :networks="props.networks"
30
- :boot-options="props.options?.boot_options"
31
- :is-edit="props.isEdit"
32
- @change-boot-order="emits('change-boot-order', $event)"
33
- @send-data="emits('send-data-boot-options', $event)"
34
- @remove-error-by-title="emits('remove-error-by-title', $event)"
35
- />
36
- </div>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import type {
41
- UI_I_SendDataRemoteConsoleOptions,
42
- UI_I_SendDataTools,
43
- UI_I_SendDataBootOptions,
44
- UI_I_SendDataVmoptions,
45
- } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
46
- import type {
47
- UI_I_SendDataNewCdDvdDrive,
48
- UI_I_SendDataNewHardDisk,
49
- UI_I_SendDataNewNetwork,
50
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
51
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
52
-
53
- const vmName = defineModel<string>('vmName', { required: true })
54
- const guestMachineType = defineModel<string>('guestMachineType', {
55
- required: true,
56
- })
57
- const guestOsFamily = defineModel<string>('guestOsFamily', { required: true })
58
- const guestOsVersion = defineModel<string>('guestOsVersion', {
59
- required: true,
60
- })
61
- const remoteConsoleOptionsInvalid = defineModel<boolean>(
62
- 'remoteConsoleOptionsInvalid',
63
- { required: true }
64
- )
65
-
66
- const props = defineProps<{
67
- hardDisks: UI_I_SendDataNewHardDisk[] | null
68
- cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
69
- networks: UI_I_SendDataNewNetwork[] | null
70
- isEdit: boolean
71
- isClone: boolean
72
- errorValidationFields: UI_I_ErrorValidationField[]
73
- options?: UI_I_SendDataVmoptions
74
- state?: string | number
75
- }>()
76
- const emits = defineEmits<{
77
- (
78
- event: 'change-boot-order',
79
- value: [
80
- UI_I_SendDataNewHardDisk[],
81
- UI_I_SendDataNewCdDvdDrive[],
82
- UI_I_SendDataNewNetwork[]
83
- ]
84
- ): void
85
- (
86
- event: 'send-data-remote-console-options',
87
- value: UI_I_SendDataRemoteConsoleOptions
88
- ): void
89
- (event: 'send-data-tools', value: UI_I_SendDataTools): void
90
- (event: 'send-data-boot-options', value: UI_I_SendDataBootOptions): void
91
- (event: 'remove-error-by-title', value: string): void
92
- }>()
93
- </script>
94
-
95
- <style scoped lang="scss">
96
- .vm-options {
97
- display: flex;
98
- flex-direction: column;
99
- gap: 12px;
100
- padding-top: 12px;
101
- }
102
- </style>
1
+ <template>
2
+ <div class="vm-options">
3
+ <common-vm-actions-common-customize-hardware-vmoptions-general-options
4
+ v-model:vm-name="vmName"
5
+ v-model:guest-machine-type="guestMachineType"
6
+ v-model:guest-os-family="guestOsFamily"
7
+ v-model:guest-os-version="guestOsVersion"
8
+ :is-edit="props.isEdit"
9
+ :is-clone="props.isClone"
10
+ :state="props.state"
11
+ />
12
+ <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
13
+ :error-validation-fields="props.errorValidationFields"
14
+ :remote-console-options="props.options?.remote_console"
15
+ :is-edit="props.isEdit"
16
+ :state="props.state"
17
+ @send-data="emits('send-data-remote-console-options', $event)"
18
+ @invalid="remoteConsoleOptionsInvalid = $event"
19
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
20
+ />
21
+ <common-vm-actions-common-customize-hardware-vmoptions-tools
22
+ :tools="props.options?.guest_tools?.enabled"
23
+ @send-data="emits('send-data-tools', $event)"
24
+ />
25
+ <common-vm-actions-common-customize-hardware-vmoptions-boot-options
26
+ :error-validation-fields="props.errorValidationFields"
27
+ :hard-disks="props.hardDisks"
28
+ :cd-dvd-drives="props.cdDvdDrives"
29
+ :networks="props.networks"
30
+ :boot-options="props.options?.boot_options"
31
+ :is-edit="props.isEdit"
32
+ @change-boot-order="emits('change-boot-order', $event)"
33
+ @send-data="emits('send-data-boot-options', $event)"
34
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
35
+ />
36
+ </div>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import type {
41
+ UI_I_SendDataRemoteConsoleOptions,
42
+ UI_I_SendDataTools,
43
+ UI_I_SendDataBootOptions,
44
+ UI_I_SendDataVmoptions,
45
+ } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
46
+ import type {
47
+ UI_I_SendDataNewCdDvdDrive,
48
+ UI_I_SendDataNewHardDisk,
49
+ UI_I_SendDataNewNetwork,
50
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
51
+ import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
52
+
53
+ const vmName = defineModel<string>('vmName', { required: true })
54
+ const guestMachineType = defineModel<string>('guestMachineType', {
55
+ required: true,
56
+ })
57
+ const guestOsFamily = defineModel<string>('guestOsFamily', { required: true })
58
+ const guestOsVersion = defineModel<string>('guestOsVersion', {
59
+ required: true,
60
+ })
61
+ const remoteConsoleOptionsInvalid = defineModel<boolean>(
62
+ 'remoteConsoleOptionsInvalid',
63
+ { required: true }
64
+ )
65
+
66
+ const props = defineProps<{
67
+ hardDisks: UI_I_SendDataNewHardDisk[] | null
68
+ cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
69
+ networks: UI_I_SendDataNewNetwork[] | null
70
+ isEdit: boolean
71
+ isClone: boolean
72
+ errorValidationFields: UI_I_ErrorValidationField[]
73
+ options?: UI_I_SendDataVmoptions
74
+ state?: string | number
75
+ }>()
76
+ const emits = defineEmits<{
77
+ (
78
+ event: 'change-boot-order',
79
+ value: [
80
+ UI_I_SendDataNewHardDisk[],
81
+ UI_I_SendDataNewCdDvdDrive[],
82
+ UI_I_SendDataNewNetwork[]
83
+ ]
84
+ ): void
85
+ (
86
+ event: 'send-data-remote-console-options',
87
+ value: UI_I_SendDataRemoteConsoleOptions
88
+ ): void
89
+ (event: 'send-data-tools', value: UI_I_SendDataTools): void
90
+ (event: 'send-data-boot-options', value: UI_I_SendDataBootOptions): void
91
+ (event: 'remove-error-by-title', value: string): void
92
+ }>()
93
+ </script>
94
+
95
+ <style scoped lang="scss">
96
+ .vm-options {
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: 12px;
100
+ padding-top: 12px;
101
+ }
102
+ </style>