bfg-common 1.4.87 → 1.4.89
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 +4 -0
- package/assets/localization/local_en.json +4 -0
- package/assets/localization/local_hy.json +4 -0
- package/assets/localization/local_kk.json +4 -0
- package/assets/localization/local_ru.json +4 -0
- package/assets/localization/local_zh.json +4 -0
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/stack/StackBlock.vue +184 -184
- package/components/common/browse/blocks/Title.vue +91 -91
- package/components/common/browse/blocks/info/Date.vue +21 -21
- package/components/common/context/recursion/Recursion.vue +86 -86
- package/components/common/context/recursion/RecursionNew.vue +198 -198
- package/components/common/context/recursion/RecursionOld.vue +212 -212
- package/components/common/layout/theHeader/TheHeaderNew.vue +81 -36
- package/components/common/layout/theHeader/ThemeSwitch.vue +36 -9
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +35 -16
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +32 -13
- package/components/common/split/horizontal/HorizontalNew.vue +321 -321
- package/components/common/vm/actions/add/Add.vue +609 -609
- package/components/common/vm/actions/clone/Clone.vue +522 -522
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +151 -160
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
- package/components/common/vm/actions/common/lib/models/interfaces.ts +148 -148
- package/components/common/vm/actions/common/lib/utils/capabilities.ts +41 -41
- package/components/common/vm/actions/common/select/lib/models/interfaces.ts +33 -33
- package/components/common/vm/actions/common/select/os/os.vue +227 -227
- package/components/common/vm/actions/editSettings/EditSettings.vue +327 -327
- package/composables/productNameLocal.ts +30 -30
- package/package.json +1 -1
- package/plugins/recursion.ts +311 -311
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/store/tasks/mappers/recentTasks.ts +45 -45
|
@@ -1,160 +1,151 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.common.bus }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<div class="select-row">
|
|
9
|
-
<atoms-tooltip-error
|
|
10
|
-
:has-error="!!apiError"
|
|
11
|
-
:selector="`.vm-wizard-${props.componentType}-bus-field-${props.index}`"
|
|
12
|
-
@remove="onRemoveValidationError"
|
|
13
|
-
>
|
|
14
|
-
<template #elem>
|
|
15
|
-
<div class="select">
|
|
16
|
-
<select
|
|
17
|
-
:id="`vm-wizard-${props.componentType}-bus-field-${props.index}`"
|
|
18
|
-
v-model="busLocal"
|
|
19
|
-
:data-id="`${props.testId}-select`"
|
|
20
|
-
:class="`vm-wizard-${props.componentType}-bus-field-${props.index}`"
|
|
21
|
-
:disabled="props.disabled"
|
|
22
|
-
>
|
|
23
|
-
<option
|
|
24
|
-
v-for="(item, key) in busOptions"
|
|
25
|
-
:key="key"
|
|
26
|
-
:value="item.value"
|
|
27
|
-
>
|
|
28
|
-
{{ item.text }}
|
|
29
|
-
</option>
|
|
30
|
-
</select>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
<template #content>{{ apiError }}</template>
|
|
34
|
-
</atoms-tooltip-error>
|
|
35
|
-
<div
|
|
36
|
-
v-if="props.helpText"
|
|
37
|
-
:id="helpId"
|
|
38
|
-
class="content-signpost relative"
|
|
39
|
-
>
|
|
40
|
-
<atoms-the-icon
|
|
41
|
-
:data-id="`${props.testId}-show-help-icon`"
|
|
42
|
-
class="icon-show-help"
|
|
43
|
-
fill="#0072a3"
|
|
44
|
-
width="24px"
|
|
45
|
-
height="24px"
|
|
46
|
-
name="info-circle"
|
|
47
|
-
@click="isShowHelp = !isShowHelp"
|
|
48
|
-
/>
|
|
49
|
-
<Teleport to="body">
|
|
50
|
-
<atoms-tooltip-signpost
|
|
51
|
-
v-if="isShowHelp"
|
|
52
|
-
test-id="help-signpost"
|
|
53
|
-
:elem-id="helpId"
|
|
54
|
-
@hide="isShowHelp = false"
|
|
55
|
-
>
|
|
56
|
-
<p>
|
|
57
|
-
<!-- {{ localization.common.busVirtioHelpDesc }}-->
|
|
58
|
-
{{ props.helpText }}
|
|
59
|
-
</p>
|
|
60
|
-
</atoms-tooltip-signpost>
|
|
61
|
-
</Teleport>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
65
|
-
</atoms-stack-block>
|
|
66
|
-
</div>
|
|
67
|
-
</template>
|
|
68
|
-
|
|
69
|
-
<script setup lang="ts">
|
|
70
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
71
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
72
|
-
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
73
|
-
import { capabilities } from '~/components/common/vm/actions/common/lib/config/capabilities'
|
|
74
|
-
|
|
75
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
76
|
-
|
|
77
|
-
const props = defineProps<{
|
|
78
|
-
bus: string
|
|
79
|
-
index: number
|
|
80
|
-
componentType: string
|
|
81
|
-
testId: string
|
|
82
|
-
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
83
|
-
disabled?: boolean
|
|
84
|
-
shortOptions?: boolean
|
|
85
|
-
helpText?: string
|
|
86
|
-
guestMachineType?: UI_I_OptionItem | null
|
|
87
|
-
}>()
|
|
88
|
-
const emits = defineEmits<{
|
|
89
|
-
(event: 'update:bus', value: string): void
|
|
90
|
-
(event: 'remove-error-by-title', value: string): void
|
|
91
|
-
}>()
|
|
92
|
-
|
|
93
|
-
const helpId = ref<string>(`bus-field-help-icon${useUniqueId()}`)
|
|
94
|
-
|
|
95
|
-
const busLocal = computed<string>({
|
|
96
|
-
get() {
|
|
97
|
-
return props.bus
|
|
98
|
-
},
|
|
99
|
-
set(newValue) {
|
|
100
|
-
emits('update:bus', newValue)
|
|
101
|
-
},
|
|
102
|
-
})
|
|
103
|
-
const busOptions = ref<UI_I_OptionItem[]>([])
|
|
104
|
-
watch(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
)
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
cursor: pointer;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.signpost {
|
|
156
|
-
max-width: 360px;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="">
|
|
3
|
+
<atoms-stack-block :has-children="false">
|
|
4
|
+
<template #stackBlockKey>
|
|
5
|
+
{{ localization.common.bus }}
|
|
6
|
+
</template>
|
|
7
|
+
<template #stackBlockContent>
|
|
8
|
+
<div class="select-row">
|
|
9
|
+
<atoms-tooltip-error
|
|
10
|
+
:has-error="!!apiError"
|
|
11
|
+
:selector="`.vm-wizard-${props.componentType}-bus-field-${props.index}`"
|
|
12
|
+
@remove="onRemoveValidationError"
|
|
13
|
+
>
|
|
14
|
+
<template #elem>
|
|
15
|
+
<div class="select">
|
|
16
|
+
<select
|
|
17
|
+
:id="`vm-wizard-${props.componentType}-bus-field-${props.index}`"
|
|
18
|
+
v-model="busLocal"
|
|
19
|
+
:data-id="`${props.testId}-select`"
|
|
20
|
+
:class="`vm-wizard-${props.componentType}-bus-field-${props.index}`"
|
|
21
|
+
:disabled="props.disabled"
|
|
22
|
+
>
|
|
23
|
+
<option
|
|
24
|
+
v-for="(item, key) in busOptions"
|
|
25
|
+
:key="key"
|
|
26
|
+
:value="item.value"
|
|
27
|
+
>
|
|
28
|
+
{{ item.text }}
|
|
29
|
+
</option>
|
|
30
|
+
</select>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
<template #content>{{ apiError }}</template>
|
|
34
|
+
</atoms-tooltip-error>
|
|
35
|
+
<div
|
|
36
|
+
v-if="props.helpText"
|
|
37
|
+
:id="helpId"
|
|
38
|
+
class="content-signpost relative"
|
|
39
|
+
>
|
|
40
|
+
<atoms-the-icon
|
|
41
|
+
:data-id="`${props.testId}-show-help-icon`"
|
|
42
|
+
class="icon-show-help"
|
|
43
|
+
fill="#0072a3"
|
|
44
|
+
width="24px"
|
|
45
|
+
height="24px"
|
|
46
|
+
name="info-circle"
|
|
47
|
+
@click="isShowHelp = !isShowHelp"
|
|
48
|
+
/>
|
|
49
|
+
<Teleport to="body">
|
|
50
|
+
<atoms-tooltip-signpost
|
|
51
|
+
v-if="isShowHelp"
|
|
52
|
+
test-id="help-signpost"
|
|
53
|
+
:elem-id="helpId"
|
|
54
|
+
@hide="isShowHelp = false"
|
|
55
|
+
>
|
|
56
|
+
<p>
|
|
57
|
+
<!-- {{ localization.common.busVirtioHelpDesc }}-->
|
|
58
|
+
{{ props.helpText }}
|
|
59
|
+
</p>
|
|
60
|
+
</atoms-tooltip-signpost>
|
|
61
|
+
</Teleport>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
</atoms-stack-block>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
|
|
69
|
+
<script setup lang="ts">
|
|
70
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
71
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
72
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
73
|
+
import { capabilities } from '~/components/common/vm/actions/common/lib/config/capabilities'
|
|
74
|
+
|
|
75
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
76
|
+
|
|
77
|
+
const props = defineProps<{
|
|
78
|
+
bus: string
|
|
79
|
+
index: number
|
|
80
|
+
componentType: string
|
|
81
|
+
testId: string
|
|
82
|
+
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
83
|
+
disabled?: boolean
|
|
84
|
+
shortOptions?: boolean
|
|
85
|
+
helpText?: string
|
|
86
|
+
guestMachineType?: UI_I_OptionItem | null
|
|
87
|
+
}>()
|
|
88
|
+
const emits = defineEmits<{
|
|
89
|
+
(event: 'update:bus', value: string): void
|
|
90
|
+
(event: 'remove-error-by-title', value: string): void
|
|
91
|
+
}>()
|
|
92
|
+
|
|
93
|
+
const helpId = ref<string>(`bus-field-help-icon${useUniqueId()}`)
|
|
94
|
+
|
|
95
|
+
const busLocal = computed<string>({
|
|
96
|
+
get() {
|
|
97
|
+
return props.bus
|
|
98
|
+
},
|
|
99
|
+
set(newValue) {
|
|
100
|
+
emits('update:bus', newValue)
|
|
101
|
+
},
|
|
102
|
+
})
|
|
103
|
+
const busOptions = ref<UI_I_OptionItem[]>([])
|
|
104
|
+
watch(
|
|
105
|
+
() => props.guestMachineType,
|
|
106
|
+
() => {
|
|
107
|
+
if (props.guestMachineType) {
|
|
108
|
+
busOptions.value = capabilities.bus[props.guestMachineType.value]
|
|
109
|
+
|
|
110
|
+
const hasSelected = busOptions.value.some(option => option.value === busLocal.value)
|
|
111
|
+
if (!hasSelected) busLocal.value = busOptions.value[0].value
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{ immediate: true, deep: true }
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
const busValidationType = computed<string>(
|
|
118
|
+
() => `disk_devices[${props.index}].bus`
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
const apiError = computed<string>(() => {
|
|
122
|
+
return (
|
|
123
|
+
props.errorValidationFields?.find(
|
|
124
|
+
(message) => message.field === busValidationType.value
|
|
125
|
+
)?.error_message || ''
|
|
126
|
+
)
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
const onRemoveValidationError = (): void => {
|
|
130
|
+
emits('remove-error-by-title', busValidationType.value)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const isShowHelp = ref<boolean>(false)
|
|
134
|
+
</script>
|
|
135
|
+
|
|
136
|
+
<style scoped>
|
|
137
|
+
.select-row {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
|
|
141
|
+
.content-signpost {
|
|
142
|
+
.icon-show-help {
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.signpost {
|
|
147
|
+
max-width: 360px;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
// import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
// import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
-
//
|
|
4
|
-
// export const busOptionsFunc = (
|
|
5
|
-
// localization: UI_I_Localization,
|
|
6
|
-
// shortOptions?: boolean
|
|
7
|
-
// ): UI_I_OptionItem[] => {
|
|
8
|
-
// if (shortOptions) {
|
|
9
|
-
// return [
|
|
10
|
-
// { text: localization.common.ide, value: 'ide' },
|
|
11
|
-
// { text: localization.common.sata, value: 'sata' },
|
|
12
|
-
// ]
|
|
13
|
-
// }
|
|
14
|
-
// return [
|
|
15
|
-
// { text: localization.common.ide, value: 'ide' },
|
|
16
|
-
// { text: localization.common.scsi, value: 'scsi' },
|
|
17
|
-
// { text: localization.common.sata, value: 'sata' },
|
|
18
|
-
// { text: localization.common.virtio, value: 'virtio' },
|
|
19
|
-
// ]
|
|
20
|
-
// }
|
|
1
|
+
// import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
// import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
3
|
+
//
|
|
4
|
+
// export const busOptionsFunc = (
|
|
5
|
+
// localization: UI_I_Localization,
|
|
6
|
+
// shortOptions?: boolean
|
|
7
|
+
// ): UI_I_OptionItem[] => {
|
|
8
|
+
// if (shortOptions) {
|
|
9
|
+
// return [
|
|
10
|
+
// { text: localization.common.ide, value: 'ide' },
|
|
11
|
+
// { text: localization.common.sata, value: 'sata' },
|
|
12
|
+
// ]
|
|
13
|
+
// }
|
|
14
|
+
// return [
|
|
15
|
+
// { text: localization.common.ide, value: 'ide' },
|
|
16
|
+
// { text: localization.common.scsi, value: 'scsi' },
|
|
17
|
+
// { text: localization.common.sata, value: 'sata' },
|
|
18
|
+
// { text: localization.common.virtio, value: 'virtio' },
|
|
19
|
+
// ]
|
|
20
|
+
// }
|