bfg-common 1.4.365 → 1.4.367

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 (42) hide show
  1. package/assets/img/icons/icons-sprite-dark-1.svg +407 -407
  2. package/assets/img/icons/icons-sprite-dark-2.svg +343 -343
  3. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  4. package/assets/img/icons/icons-sprite-dark-4.svg +255 -255
  5. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  6. package/assets/img/icons/icons-sprite-dark-6.svg +94 -94
  7. package/assets/img/icons/icons-sprite-light-1.svg +407 -407
  8. package/assets/img/icons/icons-sprite-light-2.svg +343 -343
  9. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  10. package/assets/img/icons/icons-sprite-light-4.svg +255 -255
  11. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  12. package/assets/img/icons/icons-sprite-light-6.svg +94 -94
  13. package/assets/localization/local_en.json +1 -1
  14. package/components/atoms/TheIcon3.vue +50 -50
  15. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  16. package/components/atoms/stack/StackBlock.vue +185 -185
  17. package/components/common/context/lib/models/interfaces.ts +30 -30
  18. package/components/common/context/recursion/Recursion.vue +86 -86
  19. package/components/common/context/recursion/RecursionNew.vue +199 -199
  20. package/components/common/context/recursion/RecursionOld.vue +213 -213
  21. package/components/common/modals/confirmation/Confirmation.vue +65 -65
  22. package/components/common/vm/actions/add/Add.vue +617 -617
  23. package/components/common/vm/actions/clone/lib/config/steps.ts +129 -129
  24. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +2 -2
  25. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
  26. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
  27. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
  28. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/{location/Location.vue → Location.vue} +173 -172
  29. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +2 -2
  30. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +201 -201
  31. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
  32. package/components/common/vm/actions/common/select/storage/Storage.vue +198 -202
  33. package/components/common/vm/actions/editSettings/EditSettings.vue +1 -1
  34. package/composables/productNameLocal.ts +30 -30
  35. package/package.json +1 -1
  36. package/plugins/date.ts +181 -181
  37. package/plugins/recursion.ts +311 -311
  38. package/public/spice-console/lib/images/bitmap.js +203 -203
  39. package/public/spice-console/network/spicechannel.js +383 -383
  40. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/StorageModalOld.vue +0 -52
  41. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/StorageModalNew.vue +0 -175
  42. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/lib/config/table.ts +0 -167
@@ -1,201 +1,201 @@
1
- <template>
2
- <div class="boot-orders">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.bootOrder }}
6
- </template>
7
- <template #stackBlockContent>
8
- <atoms-list-drag-drop-list
9
- :items="bootList"
10
- grab-item-key="text"
11
- @drop="onChangeOrder"
12
- >
13
- <template
14
- v-for="(item, index) in bootList"
15
- :key="index"
16
- #[`leftSide${index}`]
17
- >
18
- <input
19
- :id="`boot-order-${index}`"
20
- v-model="item.isChecked"
21
- :data-id="item.testId"
22
- type="checkbox"
23
- />
24
- </template>
25
- <template
26
- v-for="(item, index) in bootList"
27
- :key="bootList.length + index"
28
- #[`rightSide${index}`]
29
- >
30
- <div :class="['device-icon', item.iconClassName]" />
31
- <span>{{ item.text }}</span>
32
- </template>
33
- </atoms-list-drag-drop-list>
34
- </template>
35
- </atoms-stack-block>
36
- </div>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import type { UI_I_BootItem } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/lib/models/interfaces'
41
- import type {
42
- UI_I_SendDataNewCdDvdDrive,
43
- UI_I_SendDataNewHardDisk,
44
- UI_I_SendDataNewNetwork,
45
- } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
46
- import type { UI_I_Localization } from '~/lib/models/interfaces'
47
- import type { UI_I_DropEvent } from '~/components/atoms/list/dragDropList/lib/config/events'
48
-
49
- const localization = computed<UI_I_Localization>(() => useLocal())
50
-
51
- const props = defineProps<{
52
- hardDisks: UI_I_SendDataNewHardDisk[] | null
53
- cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
54
- networks: UI_I_SendDataNewNetwork[] | null
55
- }>()
56
- const emits = defineEmits<{
57
- (
58
- event: 'change',
59
- value: [
60
- UI_I_SendDataNewHardDisk[],
61
- UI_I_SendDataNewCdDvdDrive[],
62
- UI_I_SendDataNewNetwork[]
63
- ]
64
- ): void
65
- }>()
66
-
67
- const bootList = ref<UI_I_BootItem[]>([])
68
-
69
- const hardDisksAndNetworks = computed<
70
- [
71
- UI_I_SendDataNewHardDisk[] | null,
72
- UI_I_SendDataNewCdDvdDrive[] | null,
73
- UI_I_SendDataNewNetwork[] | null
74
- ]
75
- >(() => [props.hardDisks, props.cdDvdDrives, props.networks])
76
- watch(
77
- hardDisksAndNetworks,
78
- (
79
- newValue: [
80
- UI_I_SendDataNewHardDisk[] | null,
81
- UI_I_SendDataNewCdDvdDrive[] | null,
82
- UI_I_SendDataNewNetwork[] | null
83
- ]
84
- ) => {
85
- const hardDisks: UI_I_BootItem[] =
86
- newValue[0]?.map((item, index) => {
87
- const order = item.boot_order || 0
88
- return {
89
- order,
90
- isChecked: !!order,
91
- text: `disk${index}`,
92
- iconClassName: 'icon-disk',
93
- type: 'disk',
94
- name: item.source + index,
95
- testId: `select-disk-value-${index + 1}`,
96
- }
97
- }) || []
98
- const cdDvdDrives: UI_I_BootItem[] =
99
- newValue[1]?.map((item, index) => {
100
- const order = item.boot_order || 0
101
- return {
102
- order,
103
- isChecked: !!order,
104
- text: `cdrom${index}`,
105
- iconClassName: 'icon-disk',
106
- type: 'cdDvd',
107
- name: item.source + index,
108
- testId: `select-cd-dvd-value-${index + 1}`,
109
- }
110
- }) || []
111
- const networks: UI_I_BootItem[] =
112
- newValue[2]?.map((item, index) => {
113
- const order = item.boot_order || 0
114
- return {
115
- order,
116
- isChecked: !!order,
117
- text: item.mac || 'undefined',
118
- iconClassName: 'vsphere-icon-network',
119
- type: 'nic',
120
- name: item.network + index,
121
- testId: `select-nic-value-${index + 1}`,
122
- }
123
- }) || []
124
-
125
- bootList.value = [...hardDisks, ...cdDvdDrives, ...networks].sort(
126
- (a, b) => a.order - b.order
127
- )
128
- },
129
- { deep: true, immediate: true }
130
- )
131
-
132
- const onChangeOrder = (event: UI_I_DropEvent): void => {
133
- let order = -1
134
- bootList.value = bootList.value
135
- .map((item) => {
136
- if (item === event.target) {
137
- item.order = event.toPosition
138
- return item
139
- }
140
-
141
- item.order = order + 1 === event.toPosition ? (order += 2) : order++
142
-
143
- return item
144
- })
145
- .sort((a, b) => a.order - b.order)
146
- }
147
-
148
- watch(
149
- bootList,
150
- (newValue) => {
151
- const networks: UI_I_SendDataNewNetwork[] = []
152
- const hardDisks: UI_I_SendDataNewHardDisk[] = []
153
- const cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] = []
154
- let index = 0
155
- newValue.forEach((boot) => {
156
- if (boot.type === 'nic') {
157
- const network = props.networks?.find(
158
- (network, index2) => network.network + index2 === boot.name
159
- )
160
- if (network) {
161
- networks.push({
162
- ...network,
163
- boot_order: boot.isChecked ? ++index : 0,
164
- })
165
- }
166
- } else if (boot.type === 'disk') {
167
- const hardDisk = props.hardDisks?.find(
168
- (hardDisk, index2) => hardDisk.source + index2 === boot.name
169
- )
170
- if (hardDisk) {
171
- hardDisks.push({
172
- ...hardDisk,
173
- boot_order: boot.isChecked ? ++index : 0,
174
- })
175
- }
176
- } else {
177
- const cdDvdDrive = props.cdDvdDrives?.find(
178
- (cdDvdDrive, index2) => cdDvdDrive.source + index2 === boot.name
179
- )
180
- if (cdDvdDrive) {
181
- cdDvdDrives.push({
182
- ...cdDvdDrive,
183
- boot_order: boot.isChecked ? ++index : 0,
184
- })
185
- }
186
- }
187
- })
188
-
189
- emits('change', [hardDisks, cdDvdDrives, networks])
190
- },
191
- { deep: true, immediate: true }
192
- )
193
- </script>
194
-
195
- <style scoped lang="scss">
196
- .boot-orders {
197
- .device-icon {
198
- margin-right: 6px;
199
- }
200
- }
201
- </style>
1
+ <template>
2
+ <div class="boot-orders">
3
+ <atoms-stack-block :has-children="false">
4
+ <template #stackBlockKey>
5
+ {{ localization.common.bootOrder }}
6
+ </template>
7
+ <template #stackBlockContent>
8
+ <atoms-list-drag-drop-list
9
+ :items="bootList"
10
+ grab-item-key="text"
11
+ @drop="onChangeOrder"
12
+ >
13
+ <template
14
+ v-for="(item, index) in bootList"
15
+ :key="index"
16
+ #[`leftSide${index}`]
17
+ >
18
+ <input
19
+ :id="`boot-order-${index}`"
20
+ v-model="item.isChecked"
21
+ :data-id="item.testId"
22
+ type="checkbox"
23
+ />
24
+ </template>
25
+ <template
26
+ v-for="(item, index) in bootList"
27
+ :key="bootList.length + index"
28
+ #[`rightSide${index}`]
29
+ >
30
+ <div :class="['device-icon', item.iconClassName]" />
31
+ <span>{{ item.text }}</span>
32
+ </template>
33
+ </atoms-list-drag-drop-list>
34
+ </template>
35
+ </atoms-stack-block>
36
+ </div>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import type { UI_I_BootItem } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/lib/models/interfaces'
41
+ import type {
42
+ UI_I_SendDataNewCdDvdDrive,
43
+ UI_I_SendDataNewHardDisk,
44
+ UI_I_SendDataNewNetwork,
45
+ } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
46
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
47
+ import type { UI_I_DropEvent } from '~/components/atoms/list/dragDropList/lib/config/events'
48
+
49
+ const localization = computed<UI_I_Localization>(() => useLocal())
50
+
51
+ const props = defineProps<{
52
+ hardDisks: UI_I_SendDataNewHardDisk[] | null
53
+ cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
54
+ networks: UI_I_SendDataNewNetwork[] | null
55
+ }>()
56
+ const emits = defineEmits<{
57
+ (
58
+ event: 'change',
59
+ value: [
60
+ UI_I_SendDataNewHardDisk[],
61
+ UI_I_SendDataNewCdDvdDrive[],
62
+ UI_I_SendDataNewNetwork[]
63
+ ]
64
+ ): void
65
+ }>()
66
+
67
+ const bootList = ref<UI_I_BootItem[]>([])
68
+
69
+ const hardDisksAndNetworks = computed<
70
+ [
71
+ UI_I_SendDataNewHardDisk[] | null,
72
+ UI_I_SendDataNewCdDvdDrive[] | null,
73
+ UI_I_SendDataNewNetwork[] | null
74
+ ]
75
+ >(() => [props.hardDisks, props.cdDvdDrives, props.networks])
76
+ watch(
77
+ hardDisksAndNetworks,
78
+ (
79
+ newValue: [
80
+ UI_I_SendDataNewHardDisk[] | null,
81
+ UI_I_SendDataNewCdDvdDrive[] | null,
82
+ UI_I_SendDataNewNetwork[] | null
83
+ ]
84
+ ) => {
85
+ const hardDisks: UI_I_BootItem[] =
86
+ newValue[0]?.map((item, index) => {
87
+ const order = item.boot_order || 0
88
+ return {
89
+ order,
90
+ isChecked: !!order,
91
+ text: `disk${index}`,
92
+ iconClassName: 'icon-disk',
93
+ type: 'disk',
94
+ name: item.source + index,
95
+ testId: `select-disk-value-${index + 1}`,
96
+ }
97
+ }) || []
98
+ const cdDvdDrives: UI_I_BootItem[] =
99
+ newValue[1]?.map((item, index) => {
100
+ const order = item.boot_order || 0
101
+ return {
102
+ order,
103
+ isChecked: !!order,
104
+ text: `cdrom${index}`,
105
+ iconClassName: 'icon-disk',
106
+ type: 'cdDvd',
107
+ name: item.source + index,
108
+ testId: `select-cd-dvd-value-${index + 1}`,
109
+ }
110
+ }) || []
111
+ const networks: UI_I_BootItem[] =
112
+ newValue[2]?.map((item, index) => {
113
+ const order = item.boot_order || 0
114
+ return {
115
+ order,
116
+ isChecked: !!order,
117
+ text: item.mac || 'undefined',
118
+ iconClassName: 'vsphere-icon-network',
119
+ type: 'nic',
120
+ name: item.network + index,
121
+ testId: `select-nic-value-${index + 1}`,
122
+ }
123
+ }) || []
124
+
125
+ bootList.value = [...hardDisks, ...cdDvdDrives, ...networks].sort(
126
+ (a, b) => a.order - b.order
127
+ )
128
+ },
129
+ { deep: true, immediate: true }
130
+ )
131
+
132
+ const onChangeOrder = (event: UI_I_DropEvent): void => {
133
+ let order = -1
134
+ bootList.value = bootList.value
135
+ .map((item) => {
136
+ if (item === event.target) {
137
+ item.order = event.toPosition
138
+ return item
139
+ }
140
+
141
+ item.order = order + 1 === event.toPosition ? (order += 2) : order++
142
+
143
+ return item
144
+ })
145
+ .sort((a, b) => a.order - b.order)
146
+ }
147
+
148
+ watch(
149
+ bootList,
150
+ (newValue) => {
151
+ const networks: UI_I_SendDataNewNetwork[] = []
152
+ const hardDisks: UI_I_SendDataNewHardDisk[] = []
153
+ const cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] = []
154
+ let index = 0
155
+ newValue.forEach((boot) => {
156
+ if (boot.type === 'nic') {
157
+ const network = props.networks?.find(
158
+ (network, index2) => network.network + index2 === boot.name
159
+ )
160
+ if (network) {
161
+ networks.push({
162
+ ...network,
163
+ boot_order: boot.isChecked ? ++index : 0,
164
+ })
165
+ }
166
+ } else if (boot.type === 'disk') {
167
+ const hardDisk = props.hardDisks?.find(
168
+ (hardDisk, index2) => hardDisk.source + index2 === boot.name
169
+ )
170
+ if (hardDisk) {
171
+ hardDisks.push({
172
+ ...hardDisk,
173
+ boot_order: boot.isChecked ? ++index : 0,
174
+ })
175
+ }
176
+ } else {
177
+ const cdDvdDrive = props.cdDvdDrives?.find(
178
+ (cdDvdDrive, index2) => cdDvdDrive.source + index2 === boot.name
179
+ )
180
+ if (cdDvdDrive) {
181
+ cdDvdDrives.push({
182
+ ...cdDvdDrive,
183
+ boot_order: boot.isChecked ? ++index : 0,
184
+ })
185
+ }
186
+ }
187
+ })
188
+
189
+ emits('change', [hardDisks, cdDvdDrives, networks])
190
+ },
191
+ { deep: true, immediate: true }
192
+ )
193
+ </script>
194
+
195
+ <style scoped lang="scss">
196
+ .boot-orders {
197
+ .device-icon {
198
+ margin-right: 6px;
199
+ }
200
+ }
201
+ </style>
@@ -1,85 +1,85 @@
1
- <template>
2
- <div class="">
3
- <atoms-stack-block :has-children="false">
4
- <template #stackBlockKey>
5
- {{ localization.common.streamingMode }}
6
- </template>
7
- <template #stackBlockContent>
8
- <atoms-tooltip-error
9
- :has-error="!!apiError"
10
- selector="#vm-wizard-streaming-mode-field"
11
- @remove="onRemoveValidationError"
12
- >
13
- <template #elem>
14
- <div class="select">
15
- <select
16
- id="vm-wizard-streaming-mode-field"
17
- v-model="streamingModeLocal"
18
- data-id="vm-wizard-streaming-mode-select"
19
- :disabled="props.disabled"
20
- >
21
- <option
22
- v-for="(item, key) in streamingModeOptions"
23
- :key="key"
24
- :value="item.value"
25
- >
26
- {{ item.text }}
27
- </option>
28
- </select>
29
- </div>
30
- </template>
31
- <template #content>
32
- {{ apiError }}
33
- </template>
34
- </atoms-tooltip-error>
35
- </template>
36
- </atoms-stack-block>
37
- </div>
38
- </template>
39
-
40
- <script setup lang="ts">
41
- import type { UI_I_Localization } from '~/lib/models/interfaces'
42
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
43
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
44
- import { streamingModeOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/lib/config/config'
45
-
46
- const localization = computed<UI_I_Localization>(() => useLocal())
47
-
48
- const props = defineProps<{
49
- streamingMode: string
50
- errorValidationFields: UI_I_ErrorValidationField[]
51
- disabled: boolean
52
- }>()
53
- const emits = defineEmits<{
54
- (event: 'update:streaming-mode', value: string): void
55
- (event: 'remove-error-by-title', value: string): void
56
- }>()
57
-
58
- const streamingModeOptions = ref<UI_I_OptionItem[]>(
59
- streamingModeOptionsFunc(localization.value)
60
- )
61
-
62
- const streamingModeLocal = computed<string>({
63
- get() {
64
- return props.streamingMode
65
- },
66
- set(newValue) {
67
- emits('update:streaming-mode', newValue)
68
- },
69
- })
70
-
71
- const typeError = 'options.remote_console.spice.streaming_mode'
72
-
73
- const apiError = computed<string>(() => {
74
- return (
75
- props.errorValidationFields?.find((message) => message.field === typeError)
76
- ?.error_message || ''
77
- )
78
- })
79
-
80
- const onRemoveValidationError = (): void => {
81
- emits('remove-error-by-title', typeError)
82
- }
83
- </script>
84
-
85
- <style scoped></style>
1
+ <template>
2
+ <div class="">
3
+ <atoms-stack-block :has-children="false">
4
+ <template #stackBlockKey>
5
+ {{ localization.common.streamingMode }}
6
+ </template>
7
+ <template #stackBlockContent>
8
+ <atoms-tooltip-error
9
+ :has-error="!!apiError"
10
+ selector="#vm-wizard-streaming-mode-field"
11
+ @remove="onRemoveValidationError"
12
+ >
13
+ <template #elem>
14
+ <div class="select">
15
+ <select
16
+ id="vm-wizard-streaming-mode-field"
17
+ v-model="streamingModeLocal"
18
+ data-id="vm-wizard-streaming-mode-select"
19
+ :disabled="props.disabled"
20
+ >
21
+ <option
22
+ v-for="(item, key) in streamingModeOptions"
23
+ :key="key"
24
+ :value="item.value"
25
+ >
26
+ {{ item.text }}
27
+ </option>
28
+ </select>
29
+ </div>
30
+ </template>
31
+ <template #content>
32
+ {{ apiError }}
33
+ </template>
34
+ </atoms-tooltip-error>
35
+ </template>
36
+ </atoms-stack-block>
37
+ </div>
38
+ </template>
39
+
40
+ <script setup lang="ts">
41
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
42
+ import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
43
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
44
+ import { streamingModeOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/lib/config/config'
45
+
46
+ const localization = computed<UI_I_Localization>(() => useLocal())
47
+
48
+ const props = defineProps<{
49
+ streamingMode: string
50
+ errorValidationFields: UI_I_ErrorValidationField[]
51
+ disabled: boolean
52
+ }>()
53
+ const emits = defineEmits<{
54
+ (event: 'update:streaming-mode', value: string): void
55
+ (event: 'remove-error-by-title', value: string): void
56
+ }>()
57
+
58
+ const streamingModeOptions = ref<UI_I_OptionItem[]>(
59
+ streamingModeOptionsFunc(localization.value)
60
+ )
61
+
62
+ const streamingModeLocal = computed<string>({
63
+ get() {
64
+ return props.streamingMode
65
+ },
66
+ set(newValue) {
67
+ emits('update:streaming-mode', newValue)
68
+ },
69
+ })
70
+
71
+ const typeError = 'options.remote_console.spice.streaming_mode'
72
+
73
+ const apiError = computed<string>(() => {
74
+ return (
75
+ props.errorValidationFields?.find((message) => message.field === typeError)
76
+ ?.error_message || ''
77
+ )
78
+ })
79
+
80
+ const onRemoveValidationError = (): void => {
81
+ emits('remove-error-by-title', typeError)
82
+ }
83
+ </script>
84
+
85
+ <style scoped></style>