bfg-common 1.5.556 → 1.5.558

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 (64) hide show
  1. package/assets/localization/local_be.json +4 -20
  2. package/assets/localization/local_en.json +4 -20
  3. package/assets/localization/local_hy.json +4 -20
  4. package/assets/localization/local_kk.json +4 -20
  5. package/assets/localization/local_ru.json +4 -20
  6. package/assets/localization/local_zh.json +5 -21
  7. package/components/common/modals/confirmByInput/ConfirmByInput.vue +1 -9
  8. package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +2 -7
  9. package/components/common/pages/backups/modals/createBackup/New.vue +2 -8
  10. package/components/common/pages/backups/modals/restore/Restore.vue +5 -9
  11. package/components/common/pages/backups/modals/restore/RestoreNew.vue +3 -13
  12. package/components/common/pages/backups/modals/restore/RestoreOld.vue +18 -6
  13. package/components/common/vm/actions/add/Add.vue +46 -119
  14. package/components/common/vm/actions/add/New.vue +16 -54
  15. package/components/common/vm/actions/add/Old.vue +16 -55
  16. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +14 -81
  17. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +7 -56
  18. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +8 -56
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +73 -142
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +60 -54
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +61 -55
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +139 -159
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +8 -15
  24. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +8 -13
  25. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +62 -75
  26. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +58 -74
  27. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +6 -17
  28. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +6 -3
  29. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +6 -3
  30. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +17 -39
  31. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +6 -5
  32. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +6 -5
  33. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
  34. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +6 -93
  35. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +8 -62
  36. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +8 -60
  37. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +5 -69
  38. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +12 -32
  39. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +12 -33
  40. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +114 -132
  41. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +41 -6
  42. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +44 -6
  43. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +8 -23
  44. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +21 -31
  45. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +26 -34
  46. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +28 -34
  47. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +24 -30
  48. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +8 -112
  49. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +3 -3
  50. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapNew.vue → New.vue} +6 -6
  51. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{KeymapOld.vue → Old.vue} +5 -5
  52. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +6 -7
  53. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +4 -38
  54. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +7 -26
  55. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsOld.vue +24 -50
  56. package/components/common/vm/actions/common/lib/models/interfaces.ts +57 -25
  57. package/components/common/vm/actions/editSettings/EditSettings.vue +21 -35
  58. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +14 -41
  59. package/components/common/vm/actions/editSettings/new/New.vue +14 -41
  60. package/components/common/vm/actions/lib/models/interfaces.ts +4 -29
  61. package/components/common/vm/actions/lib/utils.ts +37 -32
  62. package/package.json +1 -3
  63. /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordNew.vue → New.vue} +0 -0
  64. /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{PasswordOld.vue → Old.vue} +0 -0
@@ -21,87 +21,87 @@
21
21
  <!-- TODO возможно вернем, НЕ УДАЛЯТЬ-->
22
22
 
23
23
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-type-->
24
- <!-- v-models:remote-console-type="remoteConsoleType"-->
24
+ <!-- v-models:remote-console-type="model.type"-->
25
25
  <!-- :error-validation-fields="props.errorValidationFields"-->
26
26
  <!-- :disabled="props.isDisabled"-->
27
27
  <!-- @input="changeRemoteConsoleType"-->
28
28
  <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
29
29
  <!-- />-->
30
30
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-keymap
31
- v-model:keymap="keymap"
31
+ v-model="model.keymap"
32
32
  :disabled="props.isDisabled"
33
33
  />
34
34
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password
35
- v-model:password="password"
35
+ v-model="model.password"
36
36
  :disabled="props.isDisabled"
37
37
  @valid="passwordIsValid = $event"
38
38
  />
39
39
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-power-control-->
40
- <!-- v-if="remoteConsoleType === 'vnc'"-->
40
+ <!-- v-if="model.type === 'vnc'"-->
41
41
  <!-- v-models:power-control="powerControl"-->
42
42
  <!-- />-->
43
43
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-share-policy-->
44
- <!-- v-if="remoteConsoleType === 'vnc'"-->
44
+ <!-- v-if="model.type === 'vnc'"-->
45
45
  <!-- v-models:share-policy="sharePolicy"-->
46
46
  <!-- />-->
47
47
  <!-- TODO возможно вернем, НЕ УДАЛЯТЬ-->
48
48
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-img-compression-->
49
- <!-- v-if="remoteConsoleType === 'spice'"-->
49
+ <!-- v-if="model.type === 'spice'"-->
50
50
  <!-- v-models:img-compression="imgCompression"-->
51
51
  <!-- :error-validation-fields="props.errorValidationFields"-->
52
52
  <!-- :disabled="props.isDisabled"-->
53
53
  <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
54
54
  <!-- />-->
55
55
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-jpeg-compression-->
56
- <!-- v-if="remoteConsoleType === 'spice'"-->
56
+ <!-- v-if="model.type === 'spice'"-->
57
57
  <!-- v-models:jpeg-compression="jpegCompression"-->
58
58
  <!-- :error-validation-fields="props.errorValidationFields"-->
59
59
  <!-- :disabled="props.isDisabled"-->
60
60
  <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
61
61
  <!-- />-->
62
62
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-zlib-compression-->
63
- <!-- v-if="remoteConsoleType === 'spice'"-->
63
+ <!-- v-if="model.type === 'spice'"-->
64
64
  <!-- v-models:zlib-compression="zlibCompression"-->
65
65
  <!-- :error-validation-fields="props.errorValidationFields"-->
66
66
  <!-- :disabled="props.isDisabled"-->
67
67
  <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
68
68
  <!-- />-->
69
69
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-playback-compression-->
70
- <!-- v-if="remoteConsoleType === 'spice'"-->
70
+ <!-- v-if="model.type === 'spice'"-->
71
71
  <!-- :disabled="props.isDisabled"-->
72
72
  <!-- v-models:playback-compression="playbackCompression"-->
73
73
  <!-- />-->
74
74
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-streaming-mode-->
75
- <!-- v-if="remoteConsoleType === 'spice'"-->
75
+ <!-- v-if="model.type === 'spice'"-->
76
76
  <!-- v-models:streaming-mode="streamingMode"-->
77
77
  <!-- :error-validation-fields="props.errorValidationFields"-->
78
78
  <!-- :disabled="props.isDisabled"-->
79
79
  <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
80
80
  <!-- />-->
81
81
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-copy-paste
82
- v-if="remoteConsoleType === 'spice'"
83
- v-model:copy-paste="copyPaste"
82
+ v-if="model.type === 'spice'"
83
+ v-model:copy-paste="model.spice.clipboard"
84
84
  :disabled="props.isDisabled"
85
85
  />
86
86
  <!-- TODO возможно вернем, НЕ УДАЛЯТЬ-->
87
87
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-mouse-mode-->
88
- <!-- v-if="remoteConsoleType === 'spice'"-->
88
+ <!-- v-if="model.type === 'spice'"-->
89
89
  <!-- v-models:mouse-mode="mouseMode"-->
90
90
  <!-- />-->
91
91
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-file-transfer
92
- v-if="remoteConsoleType === 'spice'"
93
- v-model:file-transfer="fileTransfer"
92
+ v-if="model.type === 'spice'"
93
+ v-model:file-transfer="model.spice.file_transfer"
94
94
  :disabled="props.isDisabled"
95
95
  />
96
96
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection
97
- v-if="remoteConsoleType === 'spice'"
97
+ v-if="model.type === 'spice'"
98
98
  v-model:usb-redirection="usbRedirection"
99
99
  :disabled="props.isDisabled"
100
100
  />
101
101
  <!-- TODO 700-->
102
102
  <!-- <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-folder-sharing-->
103
- <!-- v-if="remoteConsoleType === 'spice'"-->
104
- <!-- v-model:folder-sharing="folderSharing"-->
103
+ <!-- v-if="model.type === 'spice'"-->
104
+ <!-- v-model:folder-sharing="model.spice.folder_sharing"-->
105
105
  <!-- :disabled="props.isDisabled"-->
106
106
  <!-- />-->
107
107
  </template>
@@ -111,22 +111,16 @@
111
111
 
112
112
  <script setup lang="ts">
113
113
  import type { UI_I_Localization } from '~/lib/models/interfaces'
114
+ import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
115
+
116
+ const model = defineModel<UI_I_CreateVmData['options']['remote_console']>({ required: true })
114
117
 
115
- const keymap = defineModel<string>('keymap', { required: true })
116
- const password = defineModel<string>('password', { required: true })
117
118
  const passwordIsValid = defineModel<boolean>('passwordIsValid', {
118
119
  required: true,
119
120
  })
120
- const remoteConsoleType = defineModel<string>('remoteConsoleType', {
121
- required: true,
122
- })
123
- const copyPaste = defineModel<boolean>('copyPaste', { required: true })
124
- const fileTransfer = defineModel<boolean>('fileTransfer', { required: true })
125
- const usbRedirection = defineModel<number>('usbRedirection', {
126
- required: true,
127
- })
128
- // TODO 700
129
- // const folderSharing = defineModel<boolean>('folderSharing', { required: true })
121
+
122
+ // TODO use from model
123
+ const usbRedirection = ref<number>(3)
130
124
 
131
125
  const props = defineProps<{
132
126
  // TODO возможно вернем, НЕ УДАЛЯТЬ
@@ -1,50 +1,37 @@
1
1
  <template>
2
2
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-new
3
3
  v-if="isNewView"
4
- v-model:keymap="keymap"
5
- v-model:password="password"
4
+ v-model="model"
6
5
  v-model:password-is-valid="passwordIsValid"
7
- v-model:remote-console-type="remoteConsoleType"
8
- v-model:copy-paste="copyPaste"
9
- v-model:file-transfer="fileTransfer"
10
- v-model:usb-redirection="usbRedirection"
11
- v-model:folder-sharing="folderSharing"
12
6
  :remote-console-options-invalid="remoteConsoleOptionsInvalid"
13
7
  :is-disabled="isDisabled"
14
8
  />
15
9
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-old
16
10
  v-else
17
- v-model:keymap="keymap"
18
- v-model:password="password"
11
+ v-model="model"
19
12
  v-model:password-is-valid="passwordIsValid"
20
- v-model:remote-console-type="remoteConsoleType"
21
- v-model:copy-paste="copyPaste"
22
- v-model:file-transfer="fileTransfer"
23
- v-model:usb-redirection="usbRedirection"
24
- v-model:folder-sharing="folderSharing"
25
13
  :remote-console-options-invalid="remoteConsoleOptionsInvalid"
26
14
  :is-disabled="isDisabled"
27
15
  />
28
16
  </template>
29
17
 
30
18
  <script setup lang="ts">
31
- import type { UI_I_SendDataRemoteConsoleOptions } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
19
+ import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
20
+
21
+ const model = defineModel<UI_I_CreateVmData['options']['remote_console']>({ required: true })
32
22
 
33
23
  const props = withDefaults(
34
24
  defineProps<{
35
25
  isEdit: boolean
36
- remoteConsoleOptions?: UI_I_SendDataRemoteConsoleOptions
37
26
  // TODO возможно вернем, НЕ УДАЛЯТЬ
38
27
  // errorValidationFields: UI_I_ErrorValidationField<string>[]
39
28
  state?: string | number
40
29
  }>(),
41
30
  {
42
- remoteConsoleOptions: undefined,
43
31
  state: undefined,
44
32
  }
45
33
  )
46
34
  const emits = defineEmits<{
47
- (event: 'send-data', value: UI_I_SendDataRemoteConsoleOptions): void
48
35
  (event: 'invalid', value: boolean): void
49
36
  // TODO возможно вернем, НЕ УДАЛЯТЬ
50
37
  // (event: 'remove-error-by-title', value: string): void
@@ -55,7 +42,6 @@ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
55
42
 
56
43
  const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
57
44
 
58
- const remoteConsoleType = ref<string>('spice')
59
45
  // TODO возможно вернем, НЕ УДАЛЯТЬ
60
46
  // const changeRemoteConsoleType = (): void => {
61
47
  // // powerControl.value = false
@@ -65,104 +51,14 @@ const remoteConsoleType = ref<string>('spice')
65
51
  // zlibCompression.value = 'auto'
66
52
  // playbackCompression.value = true
67
53
  // streamingMode.value = 'all'
68
- // copyPaste.value = true
54
+ // model.spice.clipboard = true
69
55
  // mouseMode.value = 'client'
70
- // fileTransfer.value = true
71
- // usbRedirection.value = 3
72
- // folderSharing.value = true
56
+ // model.spice.file_transfer = true
57
+ // model.spice.folder_sharing = true
73
58
  // }
74
59
 
75
- const keymap = ref<string>('en_US')
76
-
77
- const password = ref<string>('')
78
60
  const passwordIsValid = ref<boolean>(true)
79
61
 
80
- // const powerControl = ref<boolean>(false)
81
-
82
- // const sharePolicy = ref<string>('allow-exclusive')
83
-
84
- const imgCompression = ref<string>('auto_glz')
85
-
86
- const jpegCompression = ref<string>('auto')
87
-
88
- const zlibCompression = ref<string>('auto')
89
-
90
- const playbackCompression = ref<boolean>(true)
91
-
92
- const streamingMode = ref<string>('all')
93
-
94
- const copyPaste = ref<boolean>(true)
95
-
96
- const mouseMode = ref<string>('client')
97
-
98
- const fileTransfer = ref<boolean>(true)
99
-
100
- const usbRedirection = ref<number>(3)
101
-
102
- const folderSharing = ref<boolean>(true)
103
-
104
- watch(
105
- [
106
- remoteConsoleType,
107
- keymap,
108
- password,
109
- // powerControl,
110
- // sharePolicy,
111
- imgCompression,
112
- jpegCompression,
113
- zlibCompression,
114
- playbackCompression,
115
- streamingMode,
116
- copyPaste,
117
- mouseMode,
118
- fileTransfer,
119
- usbRedirection,
120
- folderSharing,
121
- ],
122
- () => {
123
- emits('send-data', {
124
- type: remoteConsoleType.value,
125
- port: 0,
126
- keymap: keymap.value,
127
- password: password.value,
128
- guest_os_lock: false,
129
- limit_sessions: 0,
130
- spice: {
131
- img_compression: imgCompression.value,
132
- jpeg_compression: jpegCompression.value,
133
- zlib_glz_compression: zlibCompression.value,
134
- streaming_mode: streamingMode.value,
135
- playback_compression: playbackCompression.value,
136
- file_transfer: fileTransfer.value,
137
- clipboard: copyPaste.value,
138
- },
139
- })
140
- },
141
- { immediate: true }
142
- )
143
-
144
- // Добавляем данные для редактирования
145
- watch(
146
- () => props.remoteConsoleOptions,
147
- (newValue) => {
148
- if (!newValue || !props.remoteConsoleOptions) return
149
-
150
- remoteConsoleType.value = props.remoteConsoleOptions.type
151
- keymap.value = props.remoteConsoleOptions.keymap
152
- password.value = props.remoteConsoleOptions.password
153
- imgCompression.value = props.remoteConsoleOptions.spice.img_compression
154
- jpegCompression.value = props.remoteConsoleOptions.spice.jpeg_compression
155
- zlibCompression.value =
156
- props.remoteConsoleOptions.spice.zlib_glz_compression
157
- streamingMode.value = props.remoteConsoleOptions.spice.streaming_mode
158
- playbackCompression.value =
159
- props.remoteConsoleOptions.spice.playback_compression
160
- fileTransfer.value = props.remoteConsoleOptions.spice.file_transfer
161
- copyPaste.value = props.remoteConsoleOptions.spice.clipboard
162
- },
163
- { immediate: true }
164
- )
165
-
166
62
  const remoteConsoleOptionsInvalid = computed<boolean>(
167
63
  () => !passwordIsValid.value
168
64
  )
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-keymap-new
3
3
  v-if="isNewView"
4
- v-model:keymap="keymap"
4
+ v-model="model"
5
5
  :disabled="props.disabled"
6
6
  :keymap-options="keymapOptions"
7
7
  />
8
8
  <common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-keymap-old
9
9
  v-else
10
- v-model:keymap="keymap"
10
+ v-model="model"
11
11
  :disabled="props.disabled"
12
12
  :keymap-options="keymapOptions"
13
13
  />
@@ -17,7 +17,7 @@
17
17
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
18
18
  import { keymapOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/lib/config/config'
19
19
 
20
- const keymap = defineModel<string>('keymap', { required: true })
20
+ const model = defineModel<string>({ required: true })
21
21
 
22
22
  const props = defineProps<{
23
23
  disabled: boolean
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <ui-stack-block
3
- :has-children="false"
4
- test-id="remote-console-keymap-stack-block"
3
+ :has-children="false"
4
+ test-id="remote-console-keymap-stack-block"
5
5
  >
6
6
  <template #stackBlockKey>
7
7
  <span class="mt-2">{{ localization.common.keymap }}</span>
@@ -9,7 +9,7 @@
9
9
  <template #stackBlockContent>
10
10
  <ui-select
11
11
  id="keymap-select"
12
- v-model="keymap"
12
+ v-model="model"
13
13
  :items="props.keymapOptions"
14
14
  :disabled="props.disabled"
15
15
  width="auto"
@@ -25,7 +25,7 @@
25
25
  import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
26
26
  import type { UI_I_Localization } from '~/lib/models/interfaces'
27
27
 
28
- const keymap = defineModel<string>('keymap', { required: true })
28
+ const model = defineModel<string>({ required: true })
29
29
 
30
30
  const props = defineProps<{
31
31
  disabled: boolean
@@ -40,6 +40,6 @@ const localization = computed<UI_I_Localization>(() => useLocal())
40
40
  width: 108px;
41
41
  }
42
42
  :deep(.stack-block-label .stack-block-content) {
43
- flex: unset !important;
44
- }
43
+ flex: unset !important;
44
+ }
45
45
  </style>
@@ -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,52 +1,18 @@
1
1
  <template>
2
2
  <common-vm-actions-common-customize-hardware-vmoptions-tools-new
3
3
  v-if="isNewView"
4
- v-model:balloon="balloonLocal"
5
- :disabled="isDisabled"
4
+ v-model:tools="model.enabled"
6
5
  />
7
6
  <common-vm-actions-common-customize-hardware-vmoptions-tools-old
8
7
  v-else
9
- v-model:balloon="balloonLocal"
10
- :disabled="isDisabled"
8
+ v-model:tools="model.enabled"
11
9
  />
12
10
  </template>
13
11
 
14
12
  <script setup lang="ts">
15
- import type { UI_I_SendDataTools } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/lib/models/interfaces'
13
+ import type { UI_I_CreateVmData } from '~/components/common/vm/actions/common/lib/models/interfaces'
16
14
 
17
- const props = withDefaults(
18
- defineProps<{
19
- tools: boolean
20
- balloon: boolean
21
- isEdit: boolean
22
- state?: string | number
23
- }>(),
24
- {
25
- tools: true,
26
- balloon: false,
27
- state: undefined,
28
- }
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
- )
15
+ const model = defineModel<UI_I_CreateVmData['options']['guest_tools']>({ required: true })
50
16
 
51
17
  const { $store }: any = useNuxtApp()
52
18
  const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
@@ -1,5 +1,7 @@
1
1
  <template>
2
+ <!-- TODO 700-->
2
3
  <ui-stack-block
4
+ v-show="false"
3
5
  test-id="tools-stack-block"
4
6
  has-children
5
7
  is-toggle-on-stack-view-key
@@ -14,32 +16,16 @@
14
16
  </div>
15
17
  </template>
16
18
  <template #stackChildren>
17
- <!-- TODO 700-->
18
- <!-- <ui-stack-block :has-children="false">-->
19
- <!-- <template #stackBlockKey>-->
20
- <!-- <span class="mt-2">{{ localization.common.toolsEnable }}</span>-->
21
- <!-- </template>-->
22
- <!-- <template #stackBlockContent>-->
23
- <!-- <ui-checkbox-->
24
- <!-- id="tools-2"-->
25
- <!-- v-model="tools"-->
26
- <!-- :label-text="localization.common.enable"-->
27
- <!-- test-id="tools-2-checkbox"-->
28
- <!-- size="md"-->
29
- <!-- />-->
30
- <!-- </template>-->
31
- <!-- </ui-stack-block>-->
32
19
  <ui-stack-block :has-children="false">
33
20
  <template #stackBlockKey>
34
- <span class="mt-2">{{ localization.common.balloon }}</span>
21
+ <span class="mt-2">{{ localization.common.toolsEnable }}</span>
35
22
  </template>
36
23
  <template #stackBlockContent>
37
24
  <ui-checkbox
38
- id="balloon"
39
- v-model="balloon"
25
+ id="tools-2"
26
+ v-model="tools"
40
27
  :label-text="localization.common.enable"
41
- :disabled="props.disabled"
42
- test-id="balloon-checkbox"
28
+ test-id="tools-2-checkbox"
43
29
  size="md"
44
30
  />
45
31
  </template>
@@ -51,12 +37,7 @@
51
37
  <script setup lang="ts">
52
38
  import type { UI_I_Localization } from '~/lib/models/interfaces'
53
39
 
54
- // const tools = defineModel<boolean>('tools', { required: true })
55
- const balloon = defineModel<boolean>('balloon', { required: true })
56
-
57
- const props = defineProps<{
58
- disabled: boolean
59
- }>()
40
+ const tools = defineModel<boolean>('tools', { required: true })
60
41
 
61
42
  const localization = computed<UI_I_Localization>(() => useLocal())
62
43
  </script>