bfg-common 1.3.357 → 1.3.359

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