bfg-common 1.3.274 → 1.3.276

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 (40) hide show
  1. package/components/atoms/switch/Switch.vue +111 -111
  2. package/components/atoms/table/compact/Compact.vue +526 -526
  3. package/components/common/context/lib/models/interfaces.ts +2 -2
  4. package/components/common/diagramMain/Diagram.vue +0 -1
  5. package/components/common/diagramMain/DiagramMain.vue +0 -1
  6. package/components/common/diagramMain/Header.vue +6 -7
  7. package/components/common/diagramMain/adapter/Adapter.vue +0 -2
  8. package/components/common/diagramMain/adapter/AdapterItem.vue +6 -4
  9. package/components/common/diagramMain/adapter/AdapterItems.vue +1 -0
  10. package/components/common/diagramMain/adapter/Contents.vue +1 -1
  11. package/components/common/diagramMain/lib/models/interfaces.ts +0 -6
  12. package/components/common/diagramMain/modals/lib/config/adapterModal.ts +2 -2
  13. package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +4 -5
  14. package/components/common/diagramMain/modals/lib/config/networkModal.ts +6 -4
  15. package/components/common/diagramMain/modals/lib/config/portModal.ts +4 -4
  16. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +2 -2
  17. package/components/common/diagramMain/network/Contents.vue +4 -4
  18. package/components/common/diagramMain/port/Port.vue +4 -10
  19. package/components/common/mainNavigationPanel/MainNavigationPanel.vue +363 -363
  20. package/components/common/resource/progressBlock/ProgressBlock.vue +142 -142
  21. package/components/common/vm/actions/clone/Clone.vue +518 -518
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
  23. package/components/common/vm/actions/confirm/Confirm.vue +39 -39
  24. package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
  25. package/components/common/weekSelect/lib/config/options.ts +10 -10
  26. package/components/common/wizards/network/add/lib/models/interfaces.ts +0 -1
  27. package/composables/useAppVersion.ts +21 -21
  28. package/composables/useEnvLanguage.ts +20 -20
  29. package/lib/utils/sendTask.ts +72 -72
  30. package/minify.js +146 -146
  31. package/package.json +2 -2
  32. package/public/spice-console/application/codec.js +257 -257
  33. package/public/spice-console/lib/rasterEngine.js +907 -907
  34. package/public/spice-console/network/spicechannel.js +369 -369
  35. package/store/main/lib/interfaces.ts +9 -9
  36. package/store/tasks/actions.ts +133 -133
  37. package/store/tasks/getters.ts +25 -25
  38. package/store/tasks/lib/models/interfaces.ts +18 -18
  39. package/store/tasks/mutations.ts +58 -58
  40. package/store/tasks/state.ts +16 -16
@@ -1,165 +1,165 @@
1
- <template>
2
- <div class="hardware-pci-device">
3
- <atoms-stack-block
4
- :has-children="true"
5
- :removable="isRemovable"
6
- @remove="onRemovePciDevice"
7
- >
8
- <template #stackBlockKey>
9
- <div class="flex-align-center">
10
- <span>{{ label }}</span>
11
- </div>
12
- </template>
13
- <template #stackBlockContent>
14
- <span class="main-label">
15
- {{ selectedLabel }}
16
- </span>
17
- </template>
18
- <template #stackChildren>
19
- <template v-if="props.type === 'new'">
20
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
21
- v-model="selectedType"
22
- :options="pciDeviceTypeOptions"
23
- :pci-device-index="props.index"
24
- />
25
-
26
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
27
- v-show="selectedType.value === 'direct_path_io'"
28
- v-model="directPathIo"
29
- :pci-device-index="props.index"
30
- :passthrough-devices="props.passthroughDevices"
31
- />
32
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
33
- v-show="selectedType.value === 'dynamic_direct_path_io'"
34
- v-model="dynamicDirectPathIo"
35
- :pci-device-index="props.index"
36
- :passthrough-devices="props.passthroughDevices"
37
- />
38
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
39
- v-show="selectedType.value === 'nvidia_grid'"
40
- v-model="nvidiaGridProfile"
41
- :pci-device-index="props.index"
42
- />
43
- </template>
44
-
45
- <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
46
- </template>
47
- </atoms-stack-block>
48
- </div>
49
- </template>
50
-
51
- <script setup lang="ts">
52
- import type { UI_I_Localization } from '~/lib/models/interfaces'
53
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
54
- import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
55
- import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
56
- import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
57
- import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
58
-
59
- const props = defineProps<{
60
- index: number
61
- pciDevice: UI_I_SendDataNewPciDevice
62
- passthroughDevices: UI_I_PciDevice[]
63
- type: UI_T_PciDeviceType
64
- isEdit: boolean
65
- state?: string | number
66
- // errorValidationFields: UI_I_ErrorValidationField<string>[]
67
- }>()
68
- const emits = defineEmits<{
69
- (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
70
- (event: 'remove'): void
71
- }>()
72
-
73
- const localization = computed<UI_I_Localization>(() => useLocal())
74
-
75
- const isRunning = computed<boolean>(() => {
76
- return props.state === 2
77
- })
78
-
79
- const isRemovable = computed<boolean>(() => {
80
- return !props.isEdit || !isRunning.value
81
- })
82
-
83
- const label = computed<string>(() => {
84
- if (props.type === 'edit')
85
- return `${localization.value.newPciDevice} ${props.index + 1}`
86
-
87
- return `${localization.value.pciDevice} *`
88
- })
89
-
90
- const selectedLabel = computed<string>(() => {
91
- switch (selectedType.value.value) {
92
- case 'direct_path_io':
93
- return `${directPathIo.value.address}|${directPathIo.value.device_name}`
94
- case 'dynamic_direct_path_io':
95
- return dynamicDirectPathIo.value
96
- default:
97
- return nvidiaGridProfile.value
98
- }
99
- })
100
-
101
- const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
102
- const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
103
-
104
- const directPathIo = ref<UI_I_PciDevice>(
105
- props.passthroughDevices[0]
106
- )
107
- const dynamicDirectPathIo = ref<string>('')
108
- const nvidiaGridProfile = ref<string>('')
109
-
110
- watch(
111
- props.pciDevice,
112
- (newValue) => {
113
- // const passthroughDevice = props.passthroughDevices.find(
114
- // (item) => item.address === newValue.address
115
- // )
116
- // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
117
- newValue && (directPathIo.value = newValue)
118
- },
119
- { immediate: true }
120
- )
121
-
122
- const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
123
- switch (selectedType.value.value) {
124
- case 'direct_path_io':
125
- return {
126
- address: directPathIo.value.address,
127
- vendor_name: directPathIo.value.vendor_name,
128
- class_name: directPathIo.value.class_name,
129
- device_name: directPathIo.value.device_name,
130
- }
131
- case 'dynamic_direct_path_io':
132
- return {
133
- address: '',
134
- vendor_name: '',
135
- class_name: '',
136
- device_name: '',
137
- }
138
- default:
139
- return {
140
- address: '',
141
- vendor_name: '',
142
- class_name: '',
143
- device_name: '',
144
- }
145
- }
146
- })
147
-
148
- watch(
149
- sendData,
150
- (newValue) => {
151
- emits('send-data', newValue)
152
- },
153
- { immediate: true }
154
- )
155
-
156
- const onRemovePciDevice = (): void => {
157
- emits('remove')
158
- }
159
- </script>
160
-
161
- <style scoped lang="scss">
162
- #network-connect {
163
- margin-right: 4px;
164
- }
165
- </style>
1
+ <template>
2
+ <div class="hardware-pci-device">
3
+ <atoms-stack-block
4
+ :has-children="true"
5
+ :removable="isRemovable"
6
+ @remove="onRemovePciDevice"
7
+ >
8
+ <template #stackBlockKey>
9
+ <div class="flex-align-center">
10
+ <span>{{ label }}</span>
11
+ </div>
12
+ </template>
13
+ <template #stackBlockContent>
14
+ <span class="main-label">
15
+ {{ selectedLabel }}
16
+ </span>
17
+ </template>
18
+ <template #stackChildren>
19
+ <template v-if="props.type === 'new'">
20
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-type-selection
21
+ v-model="selectedType"
22
+ :options="pciDeviceTypeOptions"
23
+ :pci-device-index="props.index"
24
+ />
25
+
26
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-direct-path-io
27
+ v-show="selectedType.value === 'direct_path_io'"
28
+ v-model="directPathIo"
29
+ :pci-device-index="props.index"
30
+ :passthrough-devices="props.passthroughDevices"
31
+ />
32
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-dynamic-direct-path-io
33
+ v-show="selectedType.value === 'dynamic_direct_path_io'"
34
+ v-model="dynamicDirectPathIo"
35
+ :pci-device-index="props.index"
36
+ :passthrough-devices="props.passthroughDevices"
37
+ />
38
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-nvidia-grid
39
+ v-show="selectedType.value === 'nvidia_grid'"
40
+ v-model="nvidiaGridProfile"
41
+ :pci-device-index="props.index"
42
+ />
43
+ </template>
44
+
45
+ <common-vm-actions-common-customize-hardware-virtual-hardware-new-pci-device-note />
46
+ </template>
47
+ </atoms-stack-block>
48
+ </div>
49
+ </template>
50
+
51
+ <script setup lang="ts">
52
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
53
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
54
+ import type { UI_I_SendDataNewPciDevice } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
55
+ import type { UI_T_PciDeviceType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
56
+ import type { UI_I_PciDevice } from '~/lib/models/store/vm/interfaces'
57
+ import { pciDeviceTypeOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/lib/config/options'
58
+
59
+ const props = defineProps<{
60
+ index: number
61
+ pciDevice: UI_I_SendDataNewPciDevice
62
+ passthroughDevices: UI_I_PciDevice[]
63
+ type: UI_T_PciDeviceType
64
+ isEdit: boolean
65
+ state?: string | number
66
+ // errorValidationFields: UI_I_ErrorValidationField<string>[]
67
+ }>()
68
+ const emits = defineEmits<{
69
+ (event: 'send-data', value: UI_I_SendDataNewPciDevice): void
70
+ (event: 'remove'): void
71
+ }>()
72
+
73
+ const localization = computed<UI_I_Localization>(() => useLocal())
74
+
75
+ const isRunning = computed<boolean>(() => {
76
+ return props.state === 2
77
+ })
78
+
79
+ const isRemovable = computed<boolean>(() => {
80
+ return !props.isEdit || !isRunning.value
81
+ })
82
+
83
+ const label = computed<string>(() => {
84
+ if (props.type === 'edit')
85
+ return `${localization.value.newPciDevice} ${props.index + 1}`
86
+
87
+ return `${localization.value.pciDevice} *`
88
+ })
89
+
90
+ const selectedLabel = computed<string>(() => {
91
+ switch (selectedType.value.value) {
92
+ case 'direct_path_io':
93
+ return `${directPathIo.value.address}|${directPathIo.value.device_name}`
94
+ case 'dynamic_direct_path_io':
95
+ return dynamicDirectPathIo.value
96
+ default:
97
+ return nvidiaGridProfile.value
98
+ }
99
+ })
100
+
101
+ const pciDeviceTypeOptions = ref<UI_I_OptionItem[]>(pciDeviceTypeOptionsConfig)
102
+ const selectedType = ref<UI_I_OptionItem>(pciDeviceTypeOptionsConfig[0])
103
+
104
+ const directPathIo = ref<UI_I_PciDevice>(
105
+ props.passthroughDevices[0]
106
+ )
107
+ const dynamicDirectPathIo = ref<string>('')
108
+ const nvidiaGridProfile = ref<string>('')
109
+
110
+ watch(
111
+ props.pciDevice,
112
+ (newValue) => {
113
+ // const passthroughDevice = props.passthroughDevices.find(
114
+ // (item) => item.address === newValue.address
115
+ // )
116
+ // passthroughDevice && (directPathIo.value = passthroughDevice) // Todo change
117
+ newValue && (directPathIo.value = newValue)
118
+ },
119
+ { immediate: true }
120
+ )
121
+
122
+ const sendData = computed<UI_I_SendDataNewPciDevice>(() => {
123
+ switch (selectedType.value.value) {
124
+ case 'direct_path_io':
125
+ return {
126
+ address: directPathIo.value.address,
127
+ vendor_name: directPathIo.value.vendor_name,
128
+ class_name: directPathIo.value.class_name,
129
+ device_name: directPathIo.value.device_name,
130
+ }
131
+ case 'dynamic_direct_path_io':
132
+ return {
133
+ address: '',
134
+ vendor_name: '',
135
+ class_name: '',
136
+ device_name: '',
137
+ }
138
+ default:
139
+ return {
140
+ address: '',
141
+ vendor_name: '',
142
+ class_name: '',
143
+ device_name: '',
144
+ }
145
+ }
146
+ })
147
+
148
+ watch(
149
+ sendData,
150
+ (newValue) => {
151
+ emits('send-data', newValue)
152
+ },
153
+ { immediate: true }
154
+ )
155
+
156
+ const onRemovePciDevice = (): void => {
157
+ emits('remove')
158
+ }
159
+ </script>
160
+
161
+ <style scoped lang="scss">
162
+ #network-connect {
163
+ margin-right: 4px;
164
+ }
165
+ </style>
@@ -1,39 +1,39 @@
1
- <template>
2
- <common-modals-confirmation
3
- :headline="props.title"
4
- :sub-title="props.subTitle"
5
- @hide-modal="emits('hide')"
6
- @confirm="emits('confirm')"
7
- >
8
- <template #content>
9
- <div class="flex-align-center">
10
- <atoms-the-icon
11
- name="exclamation-triangle"
12
- class="confirm-modal__icon"
13
- />
14
- <slot />
15
- </div>
16
- </template>
17
- </common-modals-confirmation>
18
- </template>
19
-
20
- <script lang="ts" setup>
21
- const props = defineProps<{
22
- title: string
23
- subTitle: string
24
- }>()
25
-
26
- const emits = defineEmits<{
27
- (event: 'hide'): void
28
- (event: 'confirm'): void
29
- }>()
30
- </script>
31
-
32
- <style lang="scss" scoped>
33
- .confirm-modal__icon {
34
- min-width: 40px;
35
- height: 40px;
36
- margin-right: 20px;
37
- fill: #c27b00;
38
- }
39
- </style>
1
+ <template>
2
+ <common-modals-confirmation
3
+ :headline="props.title"
4
+ :sub-title="props.subTitle"
5
+ @hide-modal="emits('hide')"
6
+ @confirm="emits('confirm')"
7
+ >
8
+ <template #content>
9
+ <div class="flex-align-center">
10
+ <atoms-the-icon
11
+ name="exclamation-triangle"
12
+ class="confirm-modal__icon"
13
+ />
14
+ <slot />
15
+ </div>
16
+ </template>
17
+ </common-modals-confirmation>
18
+ </template>
19
+
20
+ <script lang="ts" setup>
21
+ const props = defineProps<{
22
+ title: string
23
+ subTitle: string
24
+ }>()
25
+
26
+ const emits = defineEmits<{
27
+ (event: 'hide'): void
28
+ (event: 'confirm'): void
29
+ }>()
30
+ </script>
31
+
32
+ <style lang="scss" scoped>
33
+ .confirm-modal__icon {
34
+ min-width: 40px;
35
+ height: 40px;
36
+ margin-right: 20px;
37
+ fill: #c27b00;
38
+ }
39
+ </style>