bfg-common 1.2.170 → 1.2.172
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.
- package/assets/localization/local_be.json +9 -1
- package/assets/localization/local_en.json +9 -1
- package/assets/localization/local_hy.json +9 -1
- package/assets/localization/local_kk.json +9 -1
- package/assets/localization/local_ru.json +9 -1
- package/assets/localization/local_zh.json +9 -1
- package/assets/scss/common/icons/icons-2.scss +222 -222
- package/components/atoms/switch/Switch.vue +107 -107
- package/components/common/BadBrowser.vue +114 -114
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
- package/components/common/browse/blocks/Title.vue +66 -66
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
- package/components/common/feedback/Feedback.vue +261 -261
- package/components/common/feedback/VisitPortal.vue +53 -53
- package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
- package/components/common/recursionTree/RecursionTree.vue +201 -201
- package/components/common/tools/Actions.vue +164 -164
- package/components/common/vm/actions/clone/Clone.vue +545 -545
- package/components/common/vm/actions/clone/select/options/Options.vue +65 -65
- package/components/common/vm/actions/clone/utils.ts +43 -43
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +109 -109
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +383 -383
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -447
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +12 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +177 -177
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +197 -197
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +181 -181
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +51 -51
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +253 -253
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +55 -55
- package/components/common/vm/actions/common/select/storage/config/config.ts +154 -154
- package/components/common/vm/utils/powerActions.ts +55 -55
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
- package/components/layout/theHeader/utils/localization.ts +32 -32
- package/composables/useLocal.ts +38 -38
- package/minify.js +146 -146
- package/models/composables/useMyFetch/interfaces.ts +25 -25
- package/models/interfaces.ts +49 -49
- package/models/store/interfaces.ts +37 -37
- package/models/store/storage/interfaces.ts +32 -32
- package/models/store/types.ts +43 -43
- package/modules/fixContentBuild/utils/methods.ts +114 -114
- package/package.json +1 -1
- package/public/spice-console/application/codec.js +257 -257
- package/public/spice-console/lib/rasterEngine.js +907 -907
- package/public/spice-console/network/spicechannel.js +369 -369
- package/utils/contentBuild.ts +34 -34
- package/utils/sendTask.ts +77 -77
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:id="id"
|
|
4
|
-
class="btn-group"
|
|
5
|
-
:style="{ 'padding-right': rightSpace + 'px' }"
|
|
6
|
-
>
|
|
7
|
-
<div v-for="(button, key) in props.actions" :key="button.type">
|
|
8
|
-
<label v-if="button.uploaded">
|
|
9
|
-
<span :class="[`btn btn-link ${props.size}`]">
|
|
10
|
-
{{ button.text }}
|
|
11
|
-
</span>
|
|
12
|
-
<input
|
|
13
|
-
:id="`select-file-button-${key}`"
|
|
14
|
-
type="file"
|
|
15
|
-
:disabled="button.disabled"
|
|
16
|
-
:multiple="false"
|
|
17
|
-
class="btn-group__file"
|
|
18
|
-
@change="(event) => onSelectFiles(event, button.type)"
|
|
19
|
-
/>
|
|
20
|
-
</label>
|
|
21
|
-
|
|
22
|
-
<button
|
|
23
|
-
v-else
|
|
24
|
-
:id="`actions-button-${key}`"
|
|
25
|
-
:class="[`btn btn-link ${props.size}`]"
|
|
26
|
-
:disabled="button.disabled"
|
|
27
|
-
@click="onClickButton(button.type)"
|
|
28
|
-
>
|
|
29
|
-
{{ button.text }}
|
|
30
|
-
</button>
|
|
31
|
-
</div>
|
|
32
|
-
<atoms-collapse-nav
|
|
33
|
-
v-show="collapsedItems.length"
|
|
34
|
-
:test-id="`${props.testId}-item`"
|
|
35
|
-
:items="collapsedItems"
|
|
36
|
-
close-after-click
|
|
37
|
-
@change="onClickButton"
|
|
38
|
-
@select-file="onSelectFiles"
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script lang="ts" setup>
|
|
44
|
-
import type { UI_I_Button } from '~/components/common/tools/models/interfaces'
|
|
45
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/models/interfaces'
|
|
46
|
-
|
|
47
|
-
const props = withDefaults(
|
|
48
|
-
defineProps<{
|
|
49
|
-
actions: UI_I_Button[]
|
|
50
|
-
testId: string
|
|
51
|
-
size?: 'btn-sm' | ''
|
|
52
|
-
}>(),
|
|
53
|
-
{
|
|
54
|
-
size: 'btn-sm',
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
const emits = defineEmits<{
|
|
58
|
-
(event: 'click', value1: string, value2?: Event | null): void
|
|
59
|
-
}>()
|
|
60
|
-
|
|
61
|
-
const onClickButton = (type: string): void => {
|
|
62
|
-
emits('click', type)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const onSelectFiles = (event: Event, type: string): void => {
|
|
66
|
-
emits('click', type, event)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const visibleCount = ref<number>(props.actions.length)
|
|
70
|
-
const collapsedItems = computed<UI_I_CollapseNavItem[]>(() => {
|
|
71
|
-
return props.actions
|
|
72
|
-
.filter((_, index) => {
|
|
73
|
-
return index >= visibleCount.value
|
|
74
|
-
})
|
|
75
|
-
.map((item) => {
|
|
76
|
-
return {
|
|
77
|
-
text: item.text,
|
|
78
|
-
value: item.type,
|
|
79
|
-
disabled: item.disabled,
|
|
80
|
-
uploaded: item.uploaded,
|
|
81
|
-
}
|
|
82
|
-
})
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
const rightSpace = ref<number>(0)
|
|
86
|
-
watch(
|
|
87
|
-
collapsedItems,
|
|
88
|
-
(newValue) => {
|
|
89
|
-
let space = 0
|
|
90
|
-
const element: any = document.getElementById(id.value)
|
|
91
|
-
if (!element || !newValue.length) space = 0
|
|
92
|
-
else if (element.lastChild?.className?.includes('tabs-overflow')) {
|
|
93
|
-
space =
|
|
94
|
-
element.getBoundingClientRect().right -
|
|
95
|
-
element.lastChild.getBoundingClientRect().left
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
rightSpace.value = space
|
|
99
|
-
},
|
|
100
|
-
{ deep: true }
|
|
101
|
-
)
|
|
102
|
-
|
|
103
|
-
const outputSize = (): void => {
|
|
104
|
-
const el = document.getElementById(id.value)
|
|
105
|
-
if (!el) return
|
|
106
|
-
|
|
107
|
-
const elWidth = el.clientWidth
|
|
108
|
-
const elItems = el.children
|
|
109
|
-
const elItemsMarginLeft = parseInt(getComputedStyle(elItems[0]).marginLeft)
|
|
110
|
-
const elItemsMarginRight = parseInt(getComputedStyle(elItems[0]).marginRight)
|
|
111
|
-
const childrenMarginY = elItemsMarginLeft + elItemsMarginRight
|
|
112
|
-
|
|
113
|
-
let childrenWidth = 0
|
|
114
|
-
let count = 0
|
|
115
|
-
for (let i = 0; i < elItems.length; i++) {
|
|
116
|
-
childrenWidth += elItems[i].clientWidth + childrenMarginY
|
|
117
|
-
const isWrap = elWidth - rightSpace.value < childrenWidth
|
|
118
|
-
|
|
119
|
-
if (isWrap) break
|
|
120
|
-
count++
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
visibleCount.value = count
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const setResizeObserve = (): void => {
|
|
127
|
-
const el = document.getElementById(id.value)
|
|
128
|
-
|
|
129
|
-
if (!el) {
|
|
130
|
-
setTimeout(setResizeObserve, 0)
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
new ResizeObserver(outputSize).observe(el)
|
|
135
|
-
}
|
|
136
|
-
const id = ref<string>('')
|
|
137
|
-
onMounted(() => {
|
|
138
|
-
id.value = `tool-actions-${useUniqueId()}`
|
|
139
|
-
setResizeObserve()
|
|
140
|
-
})
|
|
141
|
-
</script>
|
|
142
|
-
|
|
143
|
-
<style lang="scss" scoped>
|
|
144
|
-
.btn {
|
|
145
|
-
&:disabled {
|
|
146
|
-
color: var(--btn-link-disabled);
|
|
147
|
-
}
|
|
148
|
-
&-group {
|
|
149
|
-
margin-top: 10px;
|
|
150
|
-
box-shadow: none;
|
|
151
|
-
position: relative;
|
|
152
|
-
overflow: hidden;
|
|
153
|
-
display: flex;
|
|
154
|
-
flex-wrap: wrap;
|
|
155
|
-
min-height: 25px;
|
|
156
|
-
height: 25px;
|
|
157
|
-
box-sizing: content-box;
|
|
158
|
-
|
|
159
|
-
&__file {
|
|
160
|
-
display: none;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:id="id"
|
|
4
|
+
class="btn-group"
|
|
5
|
+
:style="{ 'padding-right': rightSpace + 'px' }"
|
|
6
|
+
>
|
|
7
|
+
<div v-for="(button, key) in props.actions" :key="button.type">
|
|
8
|
+
<label v-if="button.uploaded">
|
|
9
|
+
<span :class="[`btn btn-link ${props.size}`]">
|
|
10
|
+
{{ button.text }}
|
|
11
|
+
</span>
|
|
12
|
+
<input
|
|
13
|
+
:id="`select-file-button-${key}`"
|
|
14
|
+
type="file"
|
|
15
|
+
:disabled="button.disabled"
|
|
16
|
+
:multiple="false"
|
|
17
|
+
class="btn-group__file"
|
|
18
|
+
@change="(event) => onSelectFiles(event, button.type)"
|
|
19
|
+
/>
|
|
20
|
+
</label>
|
|
21
|
+
|
|
22
|
+
<button
|
|
23
|
+
v-else
|
|
24
|
+
:id="`actions-button-${key}`"
|
|
25
|
+
:class="[`btn btn-link ${props.size}`]"
|
|
26
|
+
:disabled="button.disabled"
|
|
27
|
+
@click="onClickButton(button.type)"
|
|
28
|
+
>
|
|
29
|
+
{{ button.text }}
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
32
|
+
<atoms-collapse-nav
|
|
33
|
+
v-show="collapsedItems.length"
|
|
34
|
+
:test-id="`${props.testId}-item`"
|
|
35
|
+
:items="collapsedItems"
|
|
36
|
+
close-after-click
|
|
37
|
+
@change="onClickButton"
|
|
38
|
+
@select-file="onSelectFiles"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts" setup>
|
|
44
|
+
import type { UI_I_Button } from '~/components/common/tools/models/interfaces'
|
|
45
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/models/interfaces'
|
|
46
|
+
|
|
47
|
+
const props = withDefaults(
|
|
48
|
+
defineProps<{
|
|
49
|
+
actions: UI_I_Button[]
|
|
50
|
+
testId: string
|
|
51
|
+
size?: 'btn-sm' | ''
|
|
52
|
+
}>(),
|
|
53
|
+
{
|
|
54
|
+
size: 'btn-sm',
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
const emits = defineEmits<{
|
|
58
|
+
(event: 'click', value1: string, value2?: Event | null): void
|
|
59
|
+
}>()
|
|
60
|
+
|
|
61
|
+
const onClickButton = (type: string): void => {
|
|
62
|
+
emits('click', type)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const onSelectFiles = (event: Event, type: string): void => {
|
|
66
|
+
emits('click', type, event)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const visibleCount = ref<number>(props.actions.length)
|
|
70
|
+
const collapsedItems = computed<UI_I_CollapseNavItem[]>(() => {
|
|
71
|
+
return props.actions
|
|
72
|
+
.filter((_, index) => {
|
|
73
|
+
return index >= visibleCount.value
|
|
74
|
+
})
|
|
75
|
+
.map((item) => {
|
|
76
|
+
return {
|
|
77
|
+
text: item.text,
|
|
78
|
+
value: item.type,
|
|
79
|
+
disabled: item.disabled,
|
|
80
|
+
uploaded: item.uploaded,
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
const rightSpace = ref<number>(0)
|
|
86
|
+
watch(
|
|
87
|
+
collapsedItems,
|
|
88
|
+
(newValue) => {
|
|
89
|
+
let space = 0
|
|
90
|
+
const element: any = document.getElementById(id.value)
|
|
91
|
+
if (!element || !newValue.length) space = 0
|
|
92
|
+
else if (element.lastChild?.className?.includes('tabs-overflow')) {
|
|
93
|
+
space =
|
|
94
|
+
element.getBoundingClientRect().right -
|
|
95
|
+
element.lastChild.getBoundingClientRect().left
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
rightSpace.value = space
|
|
99
|
+
},
|
|
100
|
+
{ deep: true }
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
const outputSize = (): void => {
|
|
104
|
+
const el = document.getElementById(id.value)
|
|
105
|
+
if (!el) return
|
|
106
|
+
|
|
107
|
+
const elWidth = el.clientWidth
|
|
108
|
+
const elItems = el.children
|
|
109
|
+
const elItemsMarginLeft = parseInt(getComputedStyle(elItems[0]).marginLeft)
|
|
110
|
+
const elItemsMarginRight = parseInt(getComputedStyle(elItems[0]).marginRight)
|
|
111
|
+
const childrenMarginY = elItemsMarginLeft + elItemsMarginRight
|
|
112
|
+
|
|
113
|
+
let childrenWidth = 0
|
|
114
|
+
let count = 0
|
|
115
|
+
for (let i = 0; i < elItems.length; i++) {
|
|
116
|
+
childrenWidth += elItems[i].clientWidth + childrenMarginY
|
|
117
|
+
const isWrap = elWidth - rightSpace.value < childrenWidth
|
|
118
|
+
|
|
119
|
+
if (isWrap) break
|
|
120
|
+
count++
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
visibleCount.value = count
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const setResizeObserve = (): void => {
|
|
127
|
+
const el = document.getElementById(id.value)
|
|
128
|
+
|
|
129
|
+
if (!el) {
|
|
130
|
+
setTimeout(setResizeObserve, 0)
|
|
131
|
+
return
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
new ResizeObserver(outputSize).observe(el)
|
|
135
|
+
}
|
|
136
|
+
const id = ref<string>('')
|
|
137
|
+
onMounted(() => {
|
|
138
|
+
id.value = `tool-actions-${useUniqueId()}`
|
|
139
|
+
setResizeObserve()
|
|
140
|
+
})
|
|
141
|
+
</script>
|
|
142
|
+
|
|
143
|
+
<style lang="scss" scoped>
|
|
144
|
+
.btn {
|
|
145
|
+
&:disabled {
|
|
146
|
+
color: var(--btn-link-disabled);
|
|
147
|
+
}
|
|
148
|
+
&-group {
|
|
149
|
+
margin-top: 10px;
|
|
150
|
+
box-shadow: none;
|
|
151
|
+
position: relative;
|
|
152
|
+
overflow: hidden;
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-wrap: wrap;
|
|
155
|
+
min-height: 25px;
|
|
156
|
+
height: 25px;
|
|
157
|
+
box-sizing: content-box;
|
|
158
|
+
|
|
159
|
+
&__file {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
</style>
|