bfg-common 1.3.373 → 1.3.374

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 (58) hide show
  1. package/components/atoms/loader/Loader.vue +30 -30
  2. package/components/atoms/loader/PreLoader.vue +38 -38
  3. package/components/atoms/switch/Switch.vue +111 -111
  4. package/components/atoms/table/compact/Compact.vue +526 -526
  5. package/components/common/adapterManager/ui/table/Header.vue +93 -93
  6. package/components/common/adapterManager/ui/table/Table.vue +162 -162
  7. package/components/common/context/Context.vue +99 -99
  8. package/components/common/lib/config/states.ts +126 -126
  9. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  10. package/components/common/shortcuts/lib/models/interfaces.ts +1 -1
  11. package/components/common/vm/actions/add/Add.vue +602 -602
  12. package/components/common/vm/actions/clone/Clone.vue +518 -518
  13. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +273 -273
  14. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +697 -697
  15. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +256 -256
  16. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +458 -458
  17. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +304 -304
  18. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +167 -167
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +82 -82
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +32 -32
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +182 -182
  22. package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +164 -164
  23. package/components/common/vm/actions/common/select/name/Name.vue +235 -235
  24. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -198
  25. package/components/common/vm/actions/editSettings/EditSettings.vue +316 -316
  26. package/components/common/weekSelect/lib/config/options.ts +10 -10
  27. package/components/common/wizards/datastore/add/Add.vue +436 -436
  28. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -191
  29. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -38
  30. package/components/common/wizards/datastore/add/lib/utils.ts +70 -70
  31. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +160 -160
  32. package/components/common/wizards/datastore/add/nfs/Nfs.vue +112 -112
  33. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +104 -104
  34. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -62
  35. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -53
  36. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -86
  37. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -184
  38. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +459 -459
  39. package/components/common/wizards/datastore/add/types/Types.vue +80 -80
  40. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +49 -49
  41. package/composables/useAppVersion.ts +21 -21
  42. package/composables/useEnvLanguage.ts +20 -20
  43. package/lib/utils/sendTask.ts +72 -72
  44. package/minify.js +146 -146
  45. package/package.json +1 -1
  46. package/plugins/spice-console/spice.console.ts +147 -18
  47. package/public/spice-console/application/codec.js +257 -257
  48. package/public/spice-console/application/inputmanager.js +1 -1
  49. package/public/spice-console/lib/rasterEngine.js +907 -907
  50. package/public/spice-console/network/spicechannel.js +375 -369
  51. package/public/spice-console/process/mainprocess.js +2 -2
  52. package/public/spice-console-minify/run.min.js +1 -1
  53. package/store/main/lib/interfaces.ts +9 -9
  54. package/store/tasks/actions.ts +133 -133
  55. package/store/tasks/getters.ts +25 -25
  56. package/store/tasks/lib/models/interfaces.ts +18 -18
  57. package/store/tasks/mutations.ts +58 -58
  58. package/store/tasks/state.ts +16 -16
@@ -1,182 +1,182 @@
1
- <template>
2
- <div class="hardware-video-card">
3
- <atoms-stack-block :has-children="true">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-video-card"
7
- data-id="vm-wizard-toggle-block-video-card"
8
- class="flex-align-center"
9
- >
10
- <span>{{ localization.videoCard }}: {{ videoCardModelName }}</span>
11
- <atoms-the-icon
12
- v-show="invalid"
13
- width="24px"
14
- height="24px"
15
- class="is-error tooltip-trigger"
16
- name="info"
17
- />
18
- </div>
19
- </template>
20
- <template #stackBlockContent>
21
- <atoms-tooltip-error
22
- :has-error="!!apiError"
23
- selector=".vm-wizard-video-card"
24
- @remove="onRemoveValidationError"
25
- >
26
- <template #elem>
27
- <div class="select">
28
- <select
29
- id="vm-wizard-video-card"
30
- v-model="selectedVideoCard"
31
- data-id="vm-wizard-video-card-select"
32
- class="vm-wizard-video-card input-text-color"
33
- :disabled="props.isEdit && props.state !== 1"
34
- @click.stop
35
- >
36
- <option
37
- v-for="(item, key) in videoCardOptions"
38
- :key="key"
39
- :value="item.value"
40
- >
41
- {{ item.text }}
42
- </option>
43
- </select>
44
- </div>
45
- </template>
46
- <template #content>{{ apiError }}</template>
47
- </atoms-tooltip-error>
48
- </template>
49
- <template #stackChildren>
50
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
51
- v-model:number-displays="numberDisplays"
52
- :disabled="isDisabled"
53
- :error-validation-fields="props.errorValidationFields"
54
- @remove-error-by-title="emits('remove-error-by-title', $event)"
55
- />
56
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-total-video-memory
57
- v-model:total-video-memory="totalVideoMemory"
58
- :disabled="isDisabled"
59
- :is-edit="props.isEdit"
60
- :error-validation-fields="props.errorValidationFields"
61
- @invalid="invalid = $event"
62
- @remove-error-by-title="emits('remove-error-by-title', $event)"
63
- />
64
- <!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
65
- <!-- v-models:graphics="graphics"-->
66
- <!-- />-->
67
- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model
68
- v-model:video-card-model="videoCardModel"
69
- :disabled="isDisabled"
70
- />
71
- </template>
72
- </atoms-stack-block>
73
- </div>
74
- </template>
75
-
76
- <script setup lang="ts">
77
- import { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
78
- import { UI_I_Localization } from '~/lib/models/interfaces'
79
- import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
80
- import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
81
- import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
82
- import { videoCardOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
83
-
84
- const props = defineProps<{
85
- isEdit: boolean
86
- errorValidationFields: UI_I_ErrorValidationField[]
87
- videoCard?: UI_I_SendDataVideoCard
88
- state?: string | number
89
- }>()
90
- const emits = defineEmits<{
91
- (event: 'send-data', value: UI_I_SendDataVideoCard): void
92
- (event: 'invalid', value: boolean): void
93
- (event: 'remove-error-by-title', value: string): void
94
- }>()
95
-
96
- const localization = computed<UI_I_Localization>(() => useLocal())
97
-
98
- const selectedVideoCard = ref<number>(1)
99
- const videoCardOptions = ref<UI_I_OptionItem[]>(
100
- videoCardOptionsFunc(localization.value)
101
- )
102
-
103
- const isDisabled = computed<boolean>(
104
- () => selectedVideoCard.value === 0 || (props.isEdit && props.state !== 1)
105
- )
106
- watch(isDisabled, (val) => {
107
- if (!val) {
108
- return
109
- }
110
-
111
- numberDisplays.value = '1'
112
- })
113
- const numberDisplays = ref<string>('1')
114
-
115
- const totalVideoMemory = ref<number>(8)
116
- const invalid = ref<boolean>(false)
117
- watch(
118
- invalid,
119
- (newValue) => {
120
- emits('invalid', newValue)
121
- },
122
- { immediate: true }
123
- )
124
-
125
- // const graphics = ref(false)
126
-
127
- const videoCardModel = ref<string>('qxl')
128
- const videoCardModelOptions = ref<UI_I_OptionItem[]>(
129
- videoCardModelOptionsConfig
130
- )
131
- const videoCardModelName = computed<string>(
132
- () =>
133
- videoCardModelOptions.value.find(
134
- (videoCard) => videoCard.value === videoCardModel.value
135
- )?.text || ''
136
- )
137
-
138
- watch(
139
- [numberDisplays, totalVideoMemory, videoCardModel],
140
- () => {
141
- emits('send-data', {
142
- adapter: videoCardModel.value,
143
- displays: +numberDisplays.value,
144
- memory_mb: totalVideoMemory.value,
145
- })
146
- },
147
- { immediate: true }
148
- )
149
-
150
- // Добавляем данные для редактирования
151
- watch(
152
- () => props.videoCard,
153
- (newValue) => {
154
- if (!newValue) return
155
-
156
- selectedVideoCard.value = 1
157
- videoCardModel.value = newValue.adapter
158
- numberDisplays.value = '' + newValue.displays
159
- totalVideoMemory.value = newValue.memory_mb
160
- },
161
- { immediate: true }
162
- )
163
-
164
- const typeError = 'video_card.adapter'
165
-
166
- const apiError = computed<string>(() => {
167
- return (
168
- props.errorValidationFields?.find((message) => message.field === typeError)
169
- ?.error_message || ''
170
- )
171
- })
172
-
173
- const onRemoveValidationError = (): void => {
174
- emits('remove-error-by-title', typeError)
175
- }
176
- </script>
177
-
178
- <style scoped lang="scss">
179
- #network-connect {
180
- margin-right: 4px;
181
- }
182
- </style>
1
+ <template>
2
+ <div class="hardware-video-card">
3
+ <atoms-stack-block :has-children="true">
4
+ <template #stackBlockKey>
5
+ <div
6
+ id="vm-wizard-toggle-block-video-card"
7
+ data-id="vm-wizard-toggle-block-video-card"
8
+ class="flex-align-center"
9
+ >
10
+ <span>{{ localization.videoCard }}: {{ videoCardModelName }}</span>
11
+ <atoms-the-icon
12
+ v-show="invalid"
13
+ width="24px"
14
+ height="24px"
15
+ class="is-error tooltip-trigger"
16
+ name="info"
17
+ />
18
+ </div>
19
+ </template>
20
+ <template #stackBlockContent>
21
+ <atoms-tooltip-error
22
+ :has-error="!!apiError"
23
+ selector=".vm-wizard-video-card"
24
+ @remove="onRemoveValidationError"
25
+ >
26
+ <template #elem>
27
+ <div class="select">
28
+ <select
29
+ id="vm-wizard-video-card"
30
+ v-model="selectedVideoCard"
31
+ data-id="vm-wizard-video-card-select"
32
+ class="vm-wizard-video-card input-text-color"
33
+ :disabled="props.isEdit && props.state !== 1"
34
+ @click.stop
35
+ >
36
+ <option
37
+ v-for="(item, key) in videoCardOptions"
38
+ :key="key"
39
+ :value="item.value"
40
+ >
41
+ {{ item.text }}
42
+ </option>
43
+ </select>
44
+ </div>
45
+ </template>
46
+ <template #content>{{ apiError }}</template>
47
+ </atoms-tooltip-error>
48
+ </template>
49
+ <template #stackChildren>
50
+ <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
51
+ v-model:number-displays="numberDisplays"
52
+ :disabled="isDisabled"
53
+ :error-validation-fields="props.errorValidationFields"
54
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
55
+ />
56
+ <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-total-video-memory
57
+ v-model:total-video-memory="totalVideoMemory"
58
+ :disabled="isDisabled"
59
+ :is-edit="props.isEdit"
60
+ :error-validation-fields="props.errorValidationFields"
61
+ @invalid="invalid = $event"
62
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
63
+ />
64
+ <!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
65
+ <!-- v-models:graphics="graphics"-->
66
+ <!-- />-->
67
+ <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model
68
+ v-model:video-card-model="videoCardModel"
69
+ :disabled="isDisabled"
70
+ />
71
+ </template>
72
+ </atoms-stack-block>
73
+ </div>
74
+ </template>
75
+
76
+ <script setup lang="ts">
77
+ import { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
78
+ import { UI_I_Localization } from '~/lib/models/interfaces'
79
+ import { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
80
+ import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
81
+ import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
82
+ import { videoCardOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
83
+
84
+ const props = defineProps<{
85
+ isEdit: boolean
86
+ errorValidationFields: UI_I_ErrorValidationField[]
87
+ videoCard?: UI_I_SendDataVideoCard
88
+ state?: string | number
89
+ }>()
90
+ const emits = defineEmits<{
91
+ (event: 'send-data', value: UI_I_SendDataVideoCard): void
92
+ (event: 'invalid', value: boolean): void
93
+ (event: 'remove-error-by-title', value: string): void
94
+ }>()
95
+
96
+ const localization = computed<UI_I_Localization>(() => useLocal())
97
+
98
+ const selectedVideoCard = ref<number>(1)
99
+ const videoCardOptions = ref<UI_I_OptionItem[]>(
100
+ videoCardOptionsFunc(localization.value)
101
+ )
102
+
103
+ const isDisabled = computed<boolean>(
104
+ () => selectedVideoCard.value === 0 || (props.isEdit && props.state !== 1)
105
+ )
106
+ watch(isDisabled, (val) => {
107
+ if (!val) {
108
+ return
109
+ }
110
+
111
+ numberDisplays.value = '1'
112
+ })
113
+ const numberDisplays = ref<string>('1')
114
+
115
+ const totalVideoMemory = ref<number>(8)
116
+ const invalid = ref<boolean>(false)
117
+ watch(
118
+ invalid,
119
+ (newValue) => {
120
+ emits('invalid', newValue)
121
+ },
122
+ { immediate: true }
123
+ )
124
+
125
+ // const graphics = ref(false)
126
+
127
+ const videoCardModel = ref<string>('qxl')
128
+ const videoCardModelOptions = ref<UI_I_OptionItem[]>(
129
+ videoCardModelOptionsConfig
130
+ )
131
+ const videoCardModelName = computed<string>(
132
+ () =>
133
+ videoCardModelOptions.value.find(
134
+ (videoCard) => videoCard.value === videoCardModel.value
135
+ )?.text || ''
136
+ )
137
+
138
+ watch(
139
+ [numberDisplays, totalVideoMemory, videoCardModel],
140
+ () => {
141
+ emits('send-data', {
142
+ adapter: videoCardModel.value,
143
+ displays: +numberDisplays.value,
144
+ memory_mb: totalVideoMemory.value,
145
+ })
146
+ },
147
+ { immediate: true }
148
+ )
149
+
150
+ // Добавляем данные для редактирования
151
+ watch(
152
+ () => props.videoCard,
153
+ (newValue) => {
154
+ if (!newValue) return
155
+
156
+ selectedVideoCard.value = 1
157
+ videoCardModel.value = newValue.adapter
158
+ numberDisplays.value = '' + newValue.displays
159
+ totalVideoMemory.value = newValue.memory_mb
160
+ },
161
+ { immediate: true }
162
+ )
163
+
164
+ const typeError = 'video_card.adapter'
165
+
166
+ const apiError = computed<string>(() => {
167
+ return (
168
+ props.errorValidationFields?.find((message) => message.field === typeError)
169
+ ?.error_message || ''
170
+ )
171
+ })
172
+
173
+ const onRemoveValidationError = (): void => {
174
+ emits('remove-error-by-title', typeError)
175
+ }
176
+ </script>
177
+
178
+ <style scoped lang="scss">
179
+ #network-connect {
180
+ margin-right: 4px;
181
+ }
182
+ </style>