bfg-common 1.5.577 → 1.5.578

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 (61) hide show
  1. package/components/common/vm/actions/add/Add.vue +886 -960
  2. package/components/common/vm/actions/add/New.vue +16 -54
  3. package/components/common/vm/actions/add/Old.vue +16 -55
  4. package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
  5. package/components/common/vm/actions/clone/Clone.vue +744 -816
  6. package/components/common/vm/actions/clone/new/New.vue +14 -50
  7. package/components/common/vm/actions/clone/old/Old.vue +16 -52
  8. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +14 -81
  9. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +7 -56
  10. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +8 -56
  11. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +211 -206
  12. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +225 -120
  13. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +220 -118
  14. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +66 -53
  15. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +139 -159
  16. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +8 -15
  17. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +8 -13
  18. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +62 -75
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +241 -149
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +3 -4
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +2 -3
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +62 -100
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +6 -17
  24. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +6 -3
  25. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +6 -3
  26. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +17 -39
  27. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +6 -5
  28. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +6 -5
  29. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
  30. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +6 -93
  31. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +8 -60
  32. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +8 -58
  33. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +5 -69
  34. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +12 -32
  35. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +12 -33
  36. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +114 -132
  37. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +41 -6
  38. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +44 -6
  39. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +8 -23
  40. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +21 -31
  41. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +26 -34
  42. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +28 -34
  43. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +24 -30
  44. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +8 -112
  45. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +3 -3
  46. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapNew.vue → New.vue} +6 -6
  47. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapOld.vue → Old.vue} +5 -5
  48. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +6 -7
  49. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +9 -27
  50. package/components/common/vm/actions/common/lib/models/interfaces.ts +58 -25
  51. package/components/common/vm/actions/common/select/options/New.vue +258 -258
  52. package/components/common/vm/actions/common/select/options/Old.vue +103 -103
  53. package/components/common/vm/actions/common/select/options/Options.vue +54 -54
  54. package/components/common/vm/actions/editSettings/EditSettings.vue +32 -90
  55. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +14 -41
  56. package/components/common/vm/actions/editSettings/new/New.vue +14 -41
  57. package/components/common/vm/actions/lib/models/interfaces.ts +4 -29
  58. package/components/common/vm/actions/lib/utils.ts +64 -36
  59. package/package.json +1 -1
  60. /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordNew.vue → New.vue} +0 -0
  61. /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordOld.vue → Old.vue} +0 -0
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div class="">
3
3
  <atoms-stack-block
4
- :has-children="false"
5
- test-id="remote-console-keymap-stack-block"
4
+ :has-children="false"
5
+ test-id="remote-console-keymap-stack-block"
6
6
  >
7
7
  <template #stackBlockKey>
8
8
  {{ localization.common.keymap }}
@@ -11,9 +11,9 @@
11
11
  <div class="select">
12
12
  <select
13
13
  id="keymap-select"
14
- v-model="keymap"
14
+ v-model="model"
15
15
  :disabled="props.disabled"
16
- :data-value="keymap"
16
+ :data-value="model"
17
17
  data-id="keymap-select"
18
18
  >
19
19
  <option
@@ -34,7 +34,7 @@
34
34
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
35
35
  import type { UI_I_Localization } from '~/lib/models/interfaces'
36
36
 
37
- const keymap = defineModel<string>('keymap', { required: true })
37
+ const model = defineModel<string>({ required: true })
38
38
 
39
39
  const props = defineProps<{
40
40
  disabled: boolean
@@ -26,7 +26,7 @@ import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/cus
26
26
  import type { UI_I_Localization } from '~/lib/models/interfaces'
27
27
  import { generatePassword } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils'
28
28
 
29
- const password = defineModel<string>('password', { required: true })
29
+ const model = defineModel<string>({ required: true })
30
30
 
31
31
  const props = defineProps<{
32
32
  disabled: boolean
@@ -43,7 +43,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
43
43
  const validation = $validation.call({})
44
44
  const defaultForm: UI_I_DefaultForm = {
45
45
  password: {
46
- value: password.value,
46
+ value: model.value,
47
47
  validations: [
48
48
  {
49
49
  value: 'password',
@@ -61,7 +61,6 @@ setForm()
61
61
 
62
62
  const showValidationErrors = (): void => {
63
63
  const valid = validation.touch()
64
- console.log(valid, 111)
65
64
  passwordErrorText.value = !valid.isValid ? valid.errors.password[0] : ''
66
65
  emits('valid', valid.isValid)
67
66
  }
@@ -77,24 +76,24 @@ const setPasswordDisable = (): void => {
77
76
 
78
77
  removeValidationErrors()
79
78
  setForm()
80
- password.value = ''
79
+ model.value = ''
81
80
  }
82
81
 
83
82
  const passwordErrorText = ref<string>('')
84
83
 
85
84
  const changePassword = (value: string): void => {
86
- password.value = value
85
+ model.value = value
87
86
 
88
87
  showValidationErrors()
89
88
  }
90
89
 
91
- const isEnabledPassword = ref<boolean>(!!password.value)
90
+ const isEnabledPassword = ref<boolean>(!!model.value)
92
91
 
93
92
  const onGeneratePassword = (): void => {
94
93
  const generatedPassword = generatePassword()
95
94
 
96
95
  form.value.password.value = generatedPassword
97
- password.value = generatedPassword
96
+ model.value = generatedPassword
98
97
 
99
98
  showValidationErrors()
100
99
  }
@@ -1,55 +1,37 @@
1
1
  <template>
2
2
  <common-vm-actions-common-customize-hardware-vmoptions-tools-new
3
3
  v-if="isNewView"
4
- v-model:balloon="balloonLocal"
4
+ v-model:balloon="model.balloon"
5
5
  :disabled="isDisabled"
6
6
  />
7
7
  <common-vm-actions-common-customize-hardware-vmoptions-tools-old
8
8
  v-else
9
- v-model:balloon="balloonLocal"
9
+ v-model:balloon="model.balloon"
10
10
  :disabled="isDisabled"
11
11
  />
12
12
  </template>
13
13
 
14
14
  <script setup lang="ts">
15
- import type { UI_I_SendDataTools } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
15
+ import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
16
+
17
+ const model = defineModel<UI_I_CreateVmData['options']['guest_tools']>({
18
+ required: true,
19
+ })
16
20
 
17
21
  const props = withDefaults(
18
22
  defineProps<{
19
- tools: boolean
20
- balloon: boolean
21
23
  isEdit: boolean
22
24
  state?: string | number
23
25
  }>(),
24
26
  {
25
- tools: true,
26
- balloon: false,
27
27
  state: undefined,
28
28
  }
29
29
  )
30
- const emits = defineEmits<{
31
- (event: 'send-data', value: UI_I_SendDataTools): void
32
- }>()
33
-
34
- const toolsLocal = ref<boolean>(props.tools)
35
- const balloonLocal = ref<boolean>(props.balloon)
36
-
37
- const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
38
-
39
- watch(
40
- balloonLocal,
41
- () => {
42
- emits('send-data', {
43
- enabled: toolsLocal.value,
44
- synchronized_time: toolsLocal.value,
45
- balloon: balloonLocal.value,
46
- })
47
- },
48
- { immediate: true }
49
- )
50
30
 
51
31
  const { $store }: any = useNuxtApp()
52
32
  const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
33
+
34
+ const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
53
35
  </script>
54
36
 
55
37
  <style scoped lang="scss">
@@ -5,7 +5,13 @@ import type {
5
5
  UI_I_SendDataNewPciDevice,
6
6
  UI_I_SendDataVideoCard,
7
7
  } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
8
- import type { UI_I_SendDataVmoptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
8
+ import type {
9
+ UI_I_SendDataBootOptions,
10
+ UI_I_SendDataRemoteConsoleOptions,
11
+ UI_I_SendDataRemoteConsoleOptionsSpice,
12
+ UI_I_SendDataTools,
13
+ UI_I_SendDataVmoptions,
14
+ } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
9
15
  import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
10
16
  import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
11
17
 
@@ -47,25 +53,6 @@ export interface UI_I_ErrorMessage {
47
53
  descriptions: string[]
48
54
  }
49
55
 
50
- interface UI_I_CreateVmDataStorage {
51
- id: string
52
- }
53
- interface UI_I_CreateVmDataCpu {
54
- vcpus: number
55
- max_vcpus: number
56
- core_per_socket: number
57
- model: string
58
- reservation_mhz: number
59
- limit_mhz: number
60
- shares: number
61
- hotplug: boolean
62
- }
63
- interface UI_I_CreateVmDataMemory {
64
- size_mb: number
65
- hotplug: boolean
66
- reservation_mb: number
67
- limit_mb: number
68
- }
69
56
  export interface UI_I_CreateVmDataUsbController {
70
57
  type: string
71
58
  }
@@ -148,10 +135,56 @@ export interface UI_I_CreateVmData {
148
135
  )[]
149
136
  network_devices: UI_I_SendDataNewNetwork[]
150
137
  passthrough_pci_devices: UI_I_SendDataNewPciDevice[]
151
- options: UI_I_SendDataVmoptions
152
- storage: UI_I_CreateVmDataStorage
153
- cpu: UI_I_CreateVmDataCpu
154
- memory: UI_I_CreateVmDataMemory
155
- usb_controllers: UI_I_CreateVmDataUsbController[]
138
+ usb_controllers: {
139
+ type: string
140
+ }[]
156
141
  input_devices: UI_I_CreateVmDataInputDevices[]
142
+ cpu: {
143
+ vcpus: number
144
+ max_vcpus: number
145
+ core_per_socket: number
146
+ model: string
147
+ reservation_mhz: number
148
+ limit_mhz: number
149
+ shares: number
150
+ hotplug: boolean
151
+ }
152
+ memory: {
153
+ size_mb: number
154
+ hotplug: boolean
155
+ reservation_mb: number
156
+ limit_mb: number
157
+ }
158
+ storage: {
159
+ id: string
160
+ } | null
161
+ options: {
162
+ remote_console: {
163
+ type: string
164
+ port: number
165
+ keymap: string
166
+ password: string
167
+ guest_os_lock: boolean
168
+ limit_sessions: number
169
+ spice: {
170
+ img_compression: string
171
+ jpeg_compression: string
172
+ zlib_glz_compression: string
173
+ streaming_mode: string
174
+ playback_compression: boolean
175
+ file_transfer: boolean
176
+ clipboard: boolean
177
+ }
178
+ }
179
+ guest_tools: {
180
+ enabled: boolean
181
+ synchronized_time: boolean
182
+ balloon: boolean
183
+ }
184
+ boot_options: {
185
+ firmware: string
186
+ boot_delay_ms: number
187
+ boot_menu: boolean
188
+ }
189
+ }
157
190
  }