bfg-common 1.2.108 → 1.2.110

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 (89) hide show
  1. package/assets/localization/local_be.json +5 -1
  2. package/assets/localization/local_en.json +5 -1
  3. package/assets/localization/local_hy.json +5 -1
  4. package/assets/localization/local_kk.json +5 -1
  5. package/assets/localization/local_ru.json +5 -1
  6. package/assets/localization/local_zh.json +5 -1
  7. package/components/atoms/modal/Modal.vue +6 -0
  8. package/components/atoms/modal/bySteps/BySteps.vue +1 -1
  9. package/components/atoms/modal/byStepsSecond/ByStepsSecond.vue +2 -2
  10. package/components/atoms/step/VerticalStep.vue +1 -1
  11. package/components/atoms/switch/Switch.vue +107 -107
  12. package/components/atoms/tabs/VerticalTabs.vue +6 -0
  13. package/components/common/BadBrowser.vue +114 -114
  14. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  15. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  16. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  17. package/components/common/browse/blocks/Title.vue +66 -66
  18. package/components/common/diagramMain/DiagramMain.vue +3 -0
  19. package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +183 -72
  20. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +1 -1
  21. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  22. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  23. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  24. package/components/common/feedback/Feedback.vue +261 -261
  25. package/components/common/feedback/VisitPortal.vue +53 -53
  26. package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
  27. package/components/common/monitor/advanced/tools/Tools.vue +428 -428
  28. package/components/common/recursionTree/RecursionTree.vue +201 -201
  29. package/components/common/vm/actions/clone/Clone.vue +545 -545
  30. package/components/common/vm/actions/clone/select/options/Options.vue +65 -65
  31. package/components/common/vm/actions/clone/utils.ts +43 -43
  32. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +109 -109
  33. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +383 -383
  34. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
  35. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
  36. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
  37. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
  38. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +446 -446
  39. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
  40. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +177 -177
  41. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +197 -197
  42. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +181 -181
  43. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +51 -51
  44. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +253 -253
  45. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +55 -55
  46. package/components/common/vm/actions/common/select/storage/Storage.vue +194 -194
  47. package/components/common/vm/actions/common/select/storage/config/config.ts +154 -154
  48. package/components/common/wizards/datastore/add/config/stepItems.ts +3 -3
  49. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  50. package/components/common/wizards/vm/common/Tooltip.vue +74 -0
  51. package/components/common/wizards/vm/common/readyComplete/ReadyComplete.vue +15 -0
  52. package/components/common/wizards/vm/migrate/Migrate.vue +204 -0
  53. package/components/common/wizards/vm/migrate/config/constructDataReady.ts +82 -0
  54. package/components/common/wizards/vm/migrate/contentHeading/ContentHeading.vue +31 -0
  55. package/components/common/wizards/vm/migrate/models/enums.ts +6 -0
  56. package/components/common/wizards/vm/migrate/models/interfaces.ts +13 -0
  57. package/components/common/wizards/vm/migrate/models/types.ts +5 -0
  58. package/components/common/wizards/vm/migrate/select/storage/Storage.vue +136 -0
  59. package/components/common/wizards/vm/migrate/select/storage/config/tabsPannel.ts +18 -0
  60. package/components/common/wizards/vm/migrate/select/storage/configure/batch/Batch.vue +61 -0
  61. package/components/common/wizards/vm/migrate/select/storage/configure/disk/Disk.vue +73 -0
  62. package/components/common/wizards/vm/migrate/select/storage/diskFormat/DiskFormat.vue +68 -0
  63. package/components/common/wizards/vm/migrate/select/storage/diskFormat/config/formatOptions.ts +22 -0
  64. package/components/common/wizards/vm/migrate/select/storage/models/interfaces.ts +14 -0
  65. package/components/common/wizards/vm/migrate/select/storage/models/types.ts +3 -0
  66. package/components/common/wizards/vm/migrate/select/storage/policy/Policy.vue +83 -0
  67. package/components/common/wizards/vm/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +84 -0
  68. package/components/common/wizards/vm/migrate/select/storage/table/datastore/Datastore.vue +105 -0
  69. package/components/common/wizards/vm/migrate/select/storage/table/datastore/config/config.ts +154 -0
  70. package/components/common/wizards/vm/migrate/select/storage/table/datastore/models/types.ts +15 -0
  71. package/components/common/wizards/vm/migrate/select/storage/table/disk/Disk.vue +73 -0
  72. package/components/common/wizards/vm/migrate/select/storage/table/disk/config/config.ts +102 -0
  73. package/components/common/wizards/vm/migrate/select/storage/table/disk/models/interfaces.ts +9 -0
  74. package/components/common/wizards/vm/migrate/select/storage/table/disk/models/types.ts +9 -0
  75. package/components/common/wizards/vm/migrate/select/type/Type.vue +38 -0
  76. package/components/common/wizards/vm/migrate/select/type/config/typeOptions.ts +41 -0
  77. package/components/common/wizards/vm/migrate/select/type/models/interfaces.ts +5 -0
  78. package/components/common/wizards/vm/migrate/utils.ts +125 -0
  79. package/composables/useLocal.ts +38 -38
  80. package/minify.js +146 -146
  81. package/models/store/interfaces.ts +37 -37
  82. package/models/store/storage/interfaces.ts +32 -32
  83. package/models/store/types.ts +32 -32
  84. package/modules/fixContentBuild/utils/methods.ts +114 -114
  85. package/package.json +1 -1
  86. package/public/spice-console/application/codec.js +257 -257
  87. package/public/spice-console/lib/rasterEngine.js +907 -907
  88. package/public/spice-console/network/spicechannel.js +369 -369
  89. package/utils/contentBuild.ts +34 -34
@@ -0,0 +1,102 @@
1
+ import type {
2
+ UI_I_ColumnKey,
3
+ UI_I_HeadItem,
4
+ UI_I_BodyItem,
5
+ } from '~/components/atoms/table/dataGrid/models/interfaces'
6
+ import type { UI_I_Localization } from '~/models/interfaces'
7
+ import {
8
+ constructColumnKey,
9
+ constructHeadItem,
10
+ } from '~/components/atoms/table/dataGrid/utils/constructDataTable'
11
+ import type { UI_T_StorageTableItemTuple } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/models/types'
12
+ import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/models/interfaces'
13
+
14
+ export const storageTableKeys: UI_T_StorageTableItemTuple = [
15
+ 'name',
16
+ 'disk_group',
17
+ 'file',
18
+ 'storage',
19
+ 'disk_format',
20
+ 'vm_storage_policy',
21
+ 'replication_group',
22
+ ]
23
+ const getItems = (
24
+ localization: UI_I_Localization
25
+ ): [string, boolean, string, string][] => {
26
+ return [
27
+ [localization.virtualMachine, true, '96px', storageTableKeys[0]],
28
+ [localization.diskGroup, false, '138px', storageTableKeys[1]],
29
+ [localization.file, true, '110px', storageTableKeys[2]],
30
+ [localization.storage, true, '96px', storageTableKeys[3]],
31
+ [localization.diskFormat, true, '110px', storageTableKeys[4]],
32
+ [localization.vmStoragePolicy, true, '110px', storageTableKeys[5]],
33
+ [localization.replicationGroup, true, '110px', storageTableKeys[6]],
34
+ ]
35
+ }
36
+
37
+ export const columnKeys = (
38
+ localization: UI_I_Localization
39
+ ): UI_I_ColumnKey[] => {
40
+ const result: UI_I_ColumnKey[] = []
41
+ getItems(localization).forEach((item, i) => {
42
+ const col = `col${i}`
43
+ result.push(constructColumnKey(col, item[0], item[1]))
44
+ })
45
+ return result
46
+ }
47
+
48
+ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
49
+ const result: UI_I_HeadItem[] = []
50
+ getItems(localization).forEach((item, i) => {
51
+ const col = `col${i}`
52
+ result.push(constructHeadItem(col, item[0], item[3], true, item[2]))
53
+ })
54
+ return result
55
+ }
56
+
57
+ export const bodyItems = (
58
+ data: UI_I_StorageConfigurePerDiskItem[]
59
+ ): UI_I_BodyItem[][] => {
60
+ const bodyItems: UI_I_BodyItem[][] = []
61
+
62
+ data.forEach((storage: UI_I_StorageConfigurePerDiskItem, key: number) => {
63
+ bodyItems.push([
64
+ {
65
+ key: 'col0',
66
+ text: storage[storageTableKeys[0]],
67
+ id: key,
68
+ },
69
+ {
70
+ key: 'col1',
71
+ text: storage[storageTableKeys[1]],
72
+ id: key,
73
+ },
74
+ {
75
+ key: 'col2',
76
+ text: storage[storageTableKeys[2]],
77
+ id: key,
78
+ },
79
+ {
80
+ key: 'col3',
81
+ text: storage[storageTableKeys[3]],
82
+ id: key,
83
+ },
84
+ {
85
+ key: 'col4',
86
+ text: storage[storageTableKeys[4]],
87
+ id: key,
88
+ },
89
+ {
90
+ key: 'col5',
91
+ text: storage[storageTableKeys[5]],
92
+ id: key,
93
+ },
94
+ {
95
+ key: 'col6',
96
+ text: storage[storageTableKeys[6]],
97
+ id: key,
98
+ },
99
+ ])
100
+ })
101
+ return bodyItems
102
+ }
@@ -0,0 +1,9 @@
1
+ export interface UI_I_StorageConfigurePerDiskItem {
2
+ name: string
3
+ disk_group: string
4
+ file: string
5
+ storage: string
6
+ disk_format: string
7
+ vm_storage_policy: string
8
+ replication_group: string
9
+ }
@@ -0,0 +1,9 @@
1
+ export type UI_T_StorageTableItemTuple = [
2
+ 'name',
3
+ 'disk_group',
4
+ 'file',
5
+ 'storage',
6
+ 'disk_format',
7
+ 'vm_storage_policy',
8
+ 'replication_group'
9
+ ]
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div>
3
+ <common-select-radio-group
4
+ v-model="selectedType"
5
+ :options="vmMigrationTypes"
6
+ />
7
+ </div>
8
+ </template>
9
+
10
+ <script lang="ts" setup>
11
+ import type { UI_T_Project } from '~/models/types'
12
+ import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/vm/migrate/select/type/models/interfaces'
13
+ import { vmMigrateTypesFunc } from '~/components/common/wizards/vm/migrate/select/type/config/typeOptions'
14
+
15
+ const props = defineProps<{
16
+ modelValue: string
17
+ project: UI_T_Project
18
+ }>()
19
+ const emits = defineEmits<{
20
+ (event: 'update:model-value', value: string | number): void
21
+ }>()
22
+ const localization = computed<any>(() => useLocal())
23
+
24
+ const vmMigrationTypes = ref<UI_I_VmMigrateTypeOption[]>(
25
+ vmMigrateTypesFunc(localization.value, props.project)
26
+ )
27
+
28
+ const selectedType = computed<string>({
29
+ get() {
30
+ return props.modelValue
31
+ },
32
+ set(newValue) {
33
+ emits('update:model-value', newValue)
34
+ },
35
+ })
36
+ </script>
37
+
38
+ <style lang="scss" scoped></style>
@@ -0,0 +1,41 @@
1
+ import { UI_I_Localization } from '~/models/interfaces'
2
+ import type { UI_T_Project } from '~/models/types'
3
+ import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/vm/migrate/select/type/models/interfaces'
4
+
5
+ export const vmMigrateTypesFunc = (
6
+ localization: UI_I_Localization,
7
+ project: UI_T_Project
8
+ ): UI_I_VmMigrateTypeOption[] => {
9
+ const options: UI_I_VmMigrateTypeOption[] = [
10
+ {
11
+ label: localization.changeComputeResourceOnly,
12
+ value: 'resource',
13
+ disabled: false,
14
+ description: localization.changeComputeResourceOnlyDesc,
15
+ permissions: ['sphere'],
16
+ },
17
+ {
18
+ label: localization.changeStorageOnly,
19
+ value: 'storage',
20
+ disabled: false,
21
+ description: localization.changeStorageOnlyDesc,
22
+ permissions: ['sphere', 'procurator'],
23
+ },
24
+ {
25
+ label: localization.changeBothComputeResourceStorage,
26
+ value: 'resource-storage',
27
+ disabled: false,
28
+ description: localization.changeBothComputeResourceStorageDesc,
29
+ permissions: ['sphere'],
30
+ },
31
+ {
32
+ label: localization.crossVCenterServerExport,
33
+ value: 'server',
34
+ disabled: true,
35
+ description: localization.crossVCenterServerExportDesc,
36
+ permissions: ['sphere'],
37
+ },
38
+ ]
39
+
40
+ return options.filter((option) => option.permissions.includes(project))
41
+ }
@@ -0,0 +1,5 @@
1
+ import type { UI_I_RadioOption } from '~/components/common/select/radio/models/interfaces'
2
+
3
+ export interface UI_I_VmMigrateTypeOption extends UI_I_RadioOption {
4
+ permissions: string[]
5
+ }
@@ -0,0 +1,125 @@
1
+ import type { UI_I_Localization } from '~/models/interfaces'
2
+ import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/models/types'
3
+ import type { UI_T_Project } from '~/models/types'
4
+ import { UI_I_MigrateVerticalStepItem } from '~/components/common/wizards/vm/migrate/models/interfaces'
5
+
6
+ export const stepItemsFunc = (
7
+ localization: UI_I_Localization,
8
+ type: UI_T_VmMigrateType,
9
+ project: UI_T_Project
10
+ ): UI_I_MigrateVerticalStepItem[] => {
11
+ const stepsType = {
12
+ sphere: stepForSphere,
13
+ procurator: stepForProcurator,
14
+ }
15
+
16
+ return stepsType[project](localization, type)
17
+ }
18
+
19
+ const stepForSphere = (
20
+ localization: UI_I_Localization
21
+ ): UI_I_MigrateVerticalStepItem[] => {
22
+ return [
23
+ {
24
+ text: localization.selectName,
25
+ disabled: false,
26
+ complete: false,
27
+ description: '',
28
+ id: '',
29
+ },
30
+ {
31
+ text: localization.selectStorage,
32
+ disabled: true,
33
+ complete: false,
34
+ description: '',
35
+ id: '',
36
+ },
37
+ {
38
+ text: localization.selectCloneOptions,
39
+ disabled: true,
40
+ complete: false,
41
+ description: '',
42
+ id: '',
43
+ },
44
+ {
45
+ text: localization.customizeHardware,
46
+ disabled: true,
47
+ complete: false,
48
+ description: '',
49
+ id: '',
50
+ },
51
+ {
52
+ text: localization.readyComplete,
53
+ disabled: true,
54
+ complete: false,
55
+ description: '',
56
+ id: '',
57
+ },
58
+ ]
59
+ }
60
+
61
+ const stepForProcurator = (
62
+ localization: UI_I_Localization,
63
+ type: UI_T_VmMigrateType
64
+ ): UI_I_MigrateVerticalStepItem[] => {
65
+ const stepItems: UI_I_MigrateVerticalStepItem[] = [
66
+ {
67
+ text: localization.selectMigrationType,
68
+ disabled: false,
69
+ complete: false,
70
+ description: localization.selectMigrationTypeDesc,
71
+ id: 'select-migration-type',
72
+ },
73
+ {
74
+ text: localization.selectTargetVCenterSer,
75
+ disabled: true,
76
+ complete: false,
77
+ description: localization.selectComputeResourceDesc,
78
+ permissions: ['server'],
79
+ id: 'select-target-center',
80
+ },
81
+ {
82
+ text: localization.selectComputeResource,
83
+ disabled: true,
84
+ complete: false,
85
+ description: localization.selectComputeResourceDesc,
86
+ permissions: ['resource', 'resource-storage', 'server'],
87
+ id: 'select-compute-resource',
88
+ },
89
+ {
90
+ text: localization.selectStorage,
91
+ disabled: true,
92
+ complete: false,
93
+ description: localization.selectStorageDesc,
94
+ permissions: ['storage', 'resource-storage', 'server'],
95
+ id: 'select-storage',
96
+ },
97
+ {
98
+ text: localization.selectNetworks,
99
+ disabled: true,
100
+ complete: false,
101
+ description: localization.selectNetworksDesc,
102
+ permissions: ['resource', 'resource-storage', 'server'],
103
+ id: 'select-networks',
104
+ },
105
+ {
106
+ text: localization.selectVMotionPriority,
107
+ disabled: true,
108
+ complete: false,
109
+ description: localization.selectVMotionPriorityDesc,
110
+ permissions: ['resource', 'resource-storage', 'server'],
111
+ id: 'select-motion-priority',
112
+ },
113
+ {
114
+ text: localization.readyComplete,
115
+ disabled: true,
116
+ complete: false,
117
+ id: 'ready-complete',
118
+ },
119
+ ]
120
+
121
+ return stepItems.filter((item) => {
122
+ // Если свойства permissions нет, возвращаем элемент
123
+ return !item.permissions || item.permissions.includes(type)
124
+ })
125
+ }
@@ -1,38 +1,38 @@
1
- import localRu from '~/assets/localization/local_ru.json'
2
- import localEn from '~/assets/localization/local_en.json'
3
- import localHy from '~/assets/localization/local_hy.json'
4
- import localZh from '~/assets/localization/local_zh.json'
5
- import localKk from '~/assets/localization/local_kk.json'
6
- import localBe from '~/assets/localization/local_be.json'
7
- const locals = {
8
- localRu,
9
- localEn,
10
- localHy,
11
- localZh,
12
- localKk,
13
- localBe,
14
- }
15
- export const useLocal = () => {
16
- const config = useRuntimeConfig()
17
-
18
- const code: string = config?.public?.LOCALIZATION_CODE?.toLowerCase() || 'ru'
19
-
20
- document.getElementsByTagName('html')[0].setAttribute('lang', code)
21
-
22
- switch (code) {
23
- case 'ru':
24
- return locals.localRu
25
- case 'en':
26
- return locals.localEn
27
- case 'hy':
28
- return locals.localHy
29
- case 'zh':
30
- return locals.localZh
31
- case 'kk':
32
- return locals.localKk
33
- case 'be':
34
- return locals.localBe
35
- default:
36
- return locals.localRu
37
- }
38
- }
1
+ import localRu from '~/assets/localization/local_ru.json'
2
+ import localEn from '~/assets/localization/local_en.json'
3
+ import localHy from '~/assets/localization/local_hy.json'
4
+ import localZh from '~/assets/localization/local_zh.json'
5
+ import localKk from '~/assets/localization/local_kk.json'
6
+ import localBe from '~/assets/localization/local_be.json'
7
+ const locals = {
8
+ localRu,
9
+ localEn,
10
+ localHy,
11
+ localZh,
12
+ localKk,
13
+ localBe,
14
+ }
15
+ export const useLocal = () => {
16
+ const config = useRuntimeConfig()
17
+
18
+ const code: string = config?.public?.LOCALIZATION_CODE?.toLowerCase() || 'ru'
19
+
20
+ document.getElementsByTagName('html')[0].setAttribute('lang', code)
21
+
22
+ switch (code) {
23
+ case 'ru':
24
+ return locals.localRu
25
+ case 'en':
26
+ return locals.localEn
27
+ case 'hy':
28
+ return locals.localHy
29
+ case 'zh':
30
+ return locals.localZh
31
+ case 'kk':
32
+ return locals.localKk
33
+ case 'be':
34
+ return locals.localBe
35
+ default:
36
+ return locals.localRu
37
+ }
38
+ }