bfg-common 1.0.16 → 1.0.18

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 (28) hide show
  1. package/components/common/adapterManager/AdapterManager.vue +9 -9
  2. package/components/common/adapterManager/ui/table/Table.vue +2 -2
  3. package/components/common/addNetworking/AddNetworking.vue +2 -2
  4. package/components/common/addNetworking/config/sendData.ts +1 -1
  5. package/components/common/addNetworking/mappers/mappers.ts +1 -1
  6. package/components/common/diagramMain/DiagramMain.vue +2 -2
  7. package/components/common/diagramMain/config/initial.ts +1 -1
  8. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +236 -236
  9. package/components/common/diagramMain/modals/config/initial.ts +31 -45
  10. package/components/common/diagramMain/modals/editSettings/EditSettings.vue +6 -5
  11. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +183 -178
  12. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +2 -1
  13. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +393 -392
  14. package/components/common/diagramMain/models/interfaces.ts +53 -74
  15. package/components/common/diagramMain/models/types.ts +1 -1
  16. package/components/common/monitor/models/interfaces.ts +1 -0
  17. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +371 -371
  18. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/MaxCpu.vue +105 -105
  19. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Sa.vue +102 -102
  20. package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/shares/Shares.vue +155 -155
  21. package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +214 -214
  22. package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +282 -282
  23. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +451 -451
  24. package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +151 -151
  25. package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +230 -230
  26. package/components/common/vm/actions/add/select/compatibility/Compatibility.vue +151 -151
  27. package/package.json +1 -1
  28. package/public/spice-console/network/spicechannel.js +1 -1
@@ -1,230 +1,230 @@
1
- <template>
2
- <div class="hardware-cpu">
3
- <atoms-stack-block :has-children="true">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-remote-console"
7
- class="flex-align-center"
8
- >
9
- <span>{{ localization.remoteConsoleOptions }}</span>
10
- <atoms-the-icon
11
- v-show="remoteConsoleOptionsInvalid"
12
- width="24px"
13
- height="24px"
14
- class="is-error tooltip-trigger"
15
- name="info"
16
- />
17
- </div>
18
- </template>
19
- <template #stackChildren>
20
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-type
21
- v-model:remote-console-type="remoteConsoleType"
22
- :error-validation-fields="props.errorValidationFields"
23
- @input="changeRemoteConsoleType"
24
- @remove-error-by-title="emits('remove-error-by-title', $event)"
25
- />
26
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-keymap
27
- v-model:keymap="keymap"
28
- />
29
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-password
30
- v-model:password="password"
31
- @valid="passwordIsValid = $event"
32
- />
33
- <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-power-control-->
34
- <!-- v-if="remoteConsoleType === 'vnc'"-->
35
- <!-- v-model:power-control="powerControl"-->
36
- <!-- />-->
37
- <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-share-policy-->
38
- <!-- v-if="remoteConsoleType === 'vnc'"-->
39
- <!-- v-model:share-policy="sharePolicy"-->
40
- <!-- />-->
41
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-img-compression
42
- v-if="remoteConsoleType === 'spice'"
43
- v-model:img-compression="imgCompression"
44
- :error-validation-fields="props.errorValidationFields"
45
- @remove-error-by-title="emits('remove-error-by-title', $event)"
46
- />
47
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-jpeg-compression
48
- v-if="remoteConsoleType === 'spice'"
49
- v-model:jpeg-compression="jpegCompression"
50
- :error-validation-fields="props.errorValidationFields"
51
- @remove-error-by-title="emits('remove-error-by-title', $event)"
52
- />
53
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-zlib-compression
54
- v-if="remoteConsoleType === 'spice'"
55
- v-model:zlib-compression="zlibCompression"
56
- :error-validation-fields="props.errorValidationFields"
57
- @remove-error-by-title="emits('remove-error-by-title', $event)"
58
- />
59
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-playback-compression
60
- v-if="remoteConsoleType === 'spice'"
61
- v-model:playback-compression="playbackCompression"
62
- />
63
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-streaming-mode
64
- v-if="remoteConsoleType === 'spice'"
65
- v-model:streaming-mode="streamingMode"
66
- :error-validation-fields="props.errorValidationFields"
67
- @remove-error-by-title="emits('remove-error-by-title', $event)"
68
- />
69
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-copy-paste
70
- v-if="remoteConsoleType === 'spice'"
71
- v-model:copy-paste="copyPaste"
72
- />
73
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-mouse-mode
74
- v-if="remoteConsoleType === 'spice'"
75
- v-model:mouse-mode="mouseMode"
76
- />
77
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-file-transfer
78
- v-if="remoteConsoleType === 'spice'"
79
- v-model:file-transfer="fileTransfer"
80
- />
81
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-usb-redirection
82
- v-if="remoteConsoleType === 'spice'"
83
- v-model:usb-redirection="usbRedirection"
84
- />
85
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-folder-sharing
86
- v-if="remoteConsoleType === 'spice'"
87
- v-model:folder-sharing="folderSharing"
88
- />
89
- </template>
90
- </atoms-stack-block>
91
- </div>
92
- </template>
93
-
94
- <script setup lang="ts">
95
- import { UI_I_SendDataRemoteConsoleOptions } from '~/components/common/vm/actions/add/customizeHardware/vmoptions/models/interfaces'
96
- import { UI_I_Localization } from '~/models/interfaces'
97
- import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
98
-
99
- const props = defineProps<{
100
- remoteConsoleOptions?: UI_I_SendDataRemoteConsoleOptions
101
- errorValidationFields: UI_I_ErrorValidationField<string>[]
102
- }>()
103
- const emits = defineEmits<{
104
- (event: 'send-data', value: UI_I_SendDataRemoteConsoleOptions): void
105
- (event: 'invalid', value: boolean): void
106
- (event: 'remove-error-by-title', value: string): void
107
- }>()
108
-
109
- const localization = computed<UI_I_Localization>(() => useLocal())
110
-
111
- const remoteConsoleType = ref<string>('spice')
112
- const changeRemoteConsoleType = (): void => {
113
- // powerControl.value = false
114
- // sharePolicy.value = 'allow-exclusive'
115
- imgCompression.value = 'auto_glz'
116
- jpegCompression.value = 'auto'
117
- zlibCompression.value = 'auto'
118
- playbackCompression.value = true
119
- streamingMode.value = 'all'
120
- copyPaste.value = true
121
- mouseMode.value = 'client'
122
- fileTransfer.value = true
123
- usbRedirection.value = 3
124
- folderSharing.value = true
125
- }
126
-
127
- const keymap = ref<string>('en_US')
128
-
129
- const password = ref<string>('')
130
- const passwordIsValid = ref<boolean>(true)
131
-
132
- // const powerControl = ref<boolean>(false)
133
-
134
- // const sharePolicy = ref<string>('allow-exclusive')
135
-
136
- const imgCompression = ref<string>('auto_glz')
137
-
138
- const jpegCompression = ref<string>('auto')
139
-
140
- const zlibCompression = ref<string>('auto')
141
-
142
- const playbackCompression = ref<boolean>(true)
143
-
144
- const streamingMode = ref<string>('all')
145
-
146
- const copyPaste = ref<boolean>(true)
147
-
148
- const mouseMode = ref<string>('client')
149
-
150
- const fileTransfer = ref<boolean>(true)
151
-
152
- const usbRedirection = ref<number>(3)
153
-
154
- const folderSharing = ref<boolean>(true)
155
-
156
- watch(
157
- [
158
- remoteConsoleType,
159
- keymap,
160
- password,
161
- // powerControl,
162
- // sharePolicy,
163
- imgCompression,
164
- jpegCompression,
165
- zlibCompression,
166
- playbackCompression,
167
- streamingMode,
168
- copyPaste,
169
- mouseMode,
170
- fileTransfer,
171
- usbRedirection,
172
- folderSharing,
173
- ],
174
- () => {
175
- emits('send-data', {
176
- type: remoteConsoleType.value,
177
- port: 0,
178
- keymap: keymap.value,
179
- password: password.value,
180
- guest_os_lock: false,
181
- limit_sessions: 0,
182
- spice: {
183
- img_compression: imgCompression.value,
184
- jpeg_compression: jpegCompression.value,
185
- zlib_glz_compression: zlibCompression.value,
186
- streaming_mode: streamingMode.value,
187
- playback_compression: playbackCompression.value,
188
- file_transfer: fileTransfer.value,
189
- clipboard: copyPaste.value,
190
- },
191
- })
192
- },
193
- { immediate: true }
194
- )
195
-
196
- // Добавляем данные для редактирования
197
- watch(
198
- () => props.remoteConsoleOptions,
199
- (newValue) => {
200
- if (!newValue || !props.remoteConsoleOptions) return
201
-
202
- remoteConsoleType.value = props.remoteConsoleOptions.type
203
- keymap.value = props.remoteConsoleOptions.keymap
204
- password.value = props.remoteConsoleOptions.password
205
- imgCompression.value = props.remoteConsoleOptions.spice.img_compression
206
- jpegCompression.value = props.remoteConsoleOptions.spice.jpeg_compression
207
- zlibCompression.value =
208
- props.remoteConsoleOptions.spice.zlib_glz_compression
209
- streamingMode.value = props.remoteConsoleOptions.spice.streaming_mode
210
- playbackCompression.value =
211
- props.remoteConsoleOptions.spice.playback_compression
212
- fileTransfer.value = props.remoteConsoleOptions.spice.file_transfer
213
- copyPaste.value = props.remoteConsoleOptions.spice.clipboard
214
- },
215
- { immediate: true }
216
- )
217
-
218
- const remoteConsoleOptionsInvalid = computed<boolean>(
219
- () => !passwordIsValid.value
220
- )
221
- watch(
222
- remoteConsoleOptionsInvalid,
223
- (newValue) => {
224
- emits('invalid', newValue)
225
- },
226
- { immediate: true }
227
- )
228
- </script>
229
-
230
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <div class="hardware-cpu">
3
+ <atoms-stack-block :has-children="true">
4
+ <template #stackBlockKey>
5
+ <div
6
+ id="vm-wizard-toggle-block-remote-console"
7
+ class="flex-align-center"
8
+ >
9
+ <span>{{ localization.remoteConsoleOptions }}</span>
10
+ <atoms-the-icon
11
+ v-show="remoteConsoleOptionsInvalid"
12
+ width="24px"
13
+ height="24px"
14
+ class="is-error tooltip-trigger"
15
+ name="info"
16
+ />
17
+ </div>
18
+ </template>
19
+ <template #stackChildren>
20
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-type
21
+ v-model:remote-console-type="remoteConsoleType"
22
+ :error-validation-fields="props.errorValidationFields"
23
+ @input="changeRemoteConsoleType"
24
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
25
+ />
26
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-keymap
27
+ v-model:keymap="keymap"
28
+ />
29
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-password
30
+ v-model:password="password"
31
+ @valid="passwordIsValid = $event"
32
+ />
33
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-power-control-->
34
+ <!-- v-if="remoteConsoleType === 'vnc'"-->
35
+ <!-- v-model:power-control="powerControl"-->
36
+ <!-- />-->
37
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-share-policy-->
38
+ <!-- v-if="remoteConsoleType === 'vnc'"-->
39
+ <!-- v-model:share-policy="sharePolicy"-->
40
+ <!-- />-->
41
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-img-compression
42
+ v-if="remoteConsoleType === 'spice'"
43
+ v-model:img-compression="imgCompression"
44
+ :error-validation-fields="props.errorValidationFields"
45
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
46
+ />
47
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-jpeg-compression
48
+ v-if="remoteConsoleType === 'spice'"
49
+ v-model:jpeg-compression="jpegCompression"
50
+ :error-validation-fields="props.errorValidationFields"
51
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
52
+ />
53
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-zlib-compression
54
+ v-if="remoteConsoleType === 'spice'"
55
+ v-model:zlib-compression="zlibCompression"
56
+ :error-validation-fields="props.errorValidationFields"
57
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
58
+ />
59
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-playback-compression
60
+ v-if="remoteConsoleType === 'spice'"
61
+ v-model:playback-compression="playbackCompression"
62
+ />
63
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-streaming-mode
64
+ v-if="remoteConsoleType === 'spice'"
65
+ v-model:streaming-mode="streamingMode"
66
+ :error-validation-fields="props.errorValidationFields"
67
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
68
+ />
69
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-copy-paste
70
+ v-if="remoteConsoleType === 'spice'"
71
+ v-model:copy-paste="copyPaste"
72
+ />
73
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-mouse-mode
74
+ v-if="remoteConsoleType === 'spice'"
75
+ v-model:mouse-mode="mouseMode"
76
+ />
77
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-file-transfer
78
+ v-if="remoteConsoleType === 'spice'"
79
+ v-model:file-transfer="fileTransfer"
80
+ />
81
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-usb-redirection
82
+ v-if="remoteConsoleType === 'spice'"
83
+ v-model:usb-redirection="usbRedirection"
84
+ />
85
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-folder-sharing
86
+ v-if="remoteConsoleType === 'spice'"
87
+ v-model:folder-sharing="folderSharing"
88
+ />
89
+ </template>
90
+ </atoms-stack-block>
91
+ </div>
92
+ </template>
93
+
94
+ <script setup lang="ts">
95
+ import { UI_I_SendDataRemoteConsoleOptions } from '~/components/common/vm/actions/add/customizeHardware/vmoptions/models/interfaces'
96
+ import { UI_I_Localization } from '~/models/interfaces'
97
+ import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
98
+
99
+ const props = defineProps<{
100
+ remoteConsoleOptions?: UI_I_SendDataRemoteConsoleOptions
101
+ errorValidationFields: UI_I_ErrorValidationField<string>[]
102
+ }>()
103
+ const emits = defineEmits<{
104
+ (event: 'send-data', value: UI_I_SendDataRemoteConsoleOptions): void
105
+ (event: 'invalid', value: boolean): void
106
+ (event: 'remove-error-by-title', value: string): void
107
+ }>()
108
+
109
+ const localization = computed<UI_I_Localization>(() => useLocal())
110
+
111
+ const remoteConsoleType = ref<string>('spice')
112
+ const changeRemoteConsoleType = (): void => {
113
+ // powerControl.value = false
114
+ // sharePolicy.value = 'allow-exclusive'
115
+ imgCompression.value = 'auto_glz'
116
+ jpegCompression.value = 'auto'
117
+ zlibCompression.value = 'auto'
118
+ playbackCompression.value = true
119
+ streamingMode.value = 'all'
120
+ copyPaste.value = true
121
+ mouseMode.value = 'client'
122
+ fileTransfer.value = true
123
+ usbRedirection.value = 3
124
+ folderSharing.value = true
125
+ }
126
+
127
+ const keymap = ref<string>('en_US')
128
+
129
+ const password = ref<string>('')
130
+ const passwordIsValid = ref<boolean>(true)
131
+
132
+ // const powerControl = ref<boolean>(false)
133
+
134
+ // const sharePolicy = ref<string>('allow-exclusive')
135
+
136
+ const imgCompression = ref<string>('auto_glz')
137
+
138
+ const jpegCompression = ref<string>('auto')
139
+
140
+ const zlibCompression = ref<string>('auto')
141
+
142
+ const playbackCompression = ref<boolean>(true)
143
+
144
+ const streamingMode = ref<string>('all')
145
+
146
+ const copyPaste = ref<boolean>(true)
147
+
148
+ const mouseMode = ref<string>('client')
149
+
150
+ const fileTransfer = ref<boolean>(true)
151
+
152
+ const usbRedirection = ref<number>(3)
153
+
154
+ const folderSharing = ref<boolean>(true)
155
+
156
+ watch(
157
+ [
158
+ remoteConsoleType,
159
+ keymap,
160
+ password,
161
+ // powerControl,
162
+ // sharePolicy,
163
+ imgCompression,
164
+ jpegCompression,
165
+ zlibCompression,
166
+ playbackCompression,
167
+ streamingMode,
168
+ copyPaste,
169
+ mouseMode,
170
+ fileTransfer,
171
+ usbRedirection,
172
+ folderSharing,
173
+ ],
174
+ () => {
175
+ emits('send-data', {
176
+ type: remoteConsoleType.value,
177
+ port: 0,
178
+ keymap: keymap.value,
179
+ password: password.value,
180
+ guest_os_lock: false,
181
+ limit_sessions: 0,
182
+ spice: {
183
+ img_compression: imgCompression.value,
184
+ jpeg_compression: jpegCompression.value,
185
+ zlib_glz_compression: zlibCompression.value,
186
+ streaming_mode: streamingMode.value,
187
+ playback_compression: playbackCompression.value,
188
+ file_transfer: fileTransfer.value,
189
+ clipboard: copyPaste.value,
190
+ },
191
+ })
192
+ },
193
+ { immediate: true }
194
+ )
195
+
196
+ // Добавляем данные для редактирования
197
+ watch(
198
+ () => props.remoteConsoleOptions,
199
+ (newValue) => {
200
+ if (!newValue || !props.remoteConsoleOptions) return
201
+
202
+ remoteConsoleType.value = props.remoteConsoleOptions.type
203
+ keymap.value = props.remoteConsoleOptions.keymap
204
+ password.value = props.remoteConsoleOptions.password
205
+ imgCompression.value = props.remoteConsoleOptions.spice.img_compression
206
+ jpegCompression.value = props.remoteConsoleOptions.spice.jpeg_compression
207
+ zlibCompression.value =
208
+ props.remoteConsoleOptions.spice.zlib_glz_compression
209
+ streamingMode.value = props.remoteConsoleOptions.spice.streaming_mode
210
+ playbackCompression.value =
211
+ props.remoteConsoleOptions.spice.playback_compression
212
+ fileTransfer.value = props.remoteConsoleOptions.spice.file_transfer
213
+ copyPaste.value = props.remoteConsoleOptions.spice.clipboard
214
+ },
215
+ { immediate: true }
216
+ )
217
+
218
+ const remoteConsoleOptionsInvalid = computed<boolean>(
219
+ () => !passwordIsValid.value
220
+ )
221
+ watch(
222
+ remoteConsoleOptionsInvalid,
223
+ (newValue) => {
224
+ emits('invalid', newValue)
225
+ },
226
+ { immediate: true }
227
+ )
228
+ </script>
229
+
230
+ <style scoped lang="scss"></style>