bfg-common 1.5.64 → 1.5.66
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 +11 -2
- package/assets/localization/local_en.json +11 -2
- package/assets/localization/local_hy.json +11 -2
- package/assets/localization/local_kk.json +11 -2
- package/assets/localization/local_ru.json +11 -2
- package/assets/localization/local_zh.json +11 -2
- package/components/common/accordion/Recursion.vue +6 -6
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/lib/utils/optionsActions.ts +5 -1
- package/components/common/monitor/advanced/tools/lib/config/advancedToolbar.ts +21 -5
- package/components/common/vm/actions/add/Add.vue +205 -194
- package/components/common/vm/actions/add/New.vue +485 -0
- package/components/common/vm/actions/add/Old.vue +371 -0
- package/components/common/vm/actions/add/{FolderTreeView.vue → folderTreeView/FolderTreeView.vue} +16 -27
- package/components/common/vm/actions/add/folderTreeView/New.vue +40 -0
- package/components/common/vm/actions/add/folderTreeView/Old.vue +50 -0
- package/components/common/vm/actions/add/lib/config/steps.ts +19 -3
- package/components/common/vm/actions/clone/toTemplate/ToTemplate.vue +29 -37
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +5 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +3 -3
- package/components/common/vm/actions/common/select/compatibility/Compatibility.vue +21 -83
- package/components/common/vm/actions/common/select/compatibility/New.vue +165 -0
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -0
- package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +45 -75
- package/components/common/vm/actions/common/select/computeResource/New.vue +141 -0
- package/components/common/vm/actions/common/select/computeResource/Old.vue +99 -0
- package/components/common/vm/actions/common/select/computeResource/treeView/New.vue +44 -0
- package/components/common/vm/actions/common/select/computeResource/treeView/Old.vue +48 -0
- package/components/common/vm/actions/common/select/computeResource/{TreeView.vue → treeView/TreeView.vue} +28 -34
- package/components/common/vm/actions/common/select/createType/CreateType.vue +15 -51
- package/components/common/vm/actions/common/select/createType/New.vue +84 -0
- package/components/common/vm/actions/common/select/createType/Old.vue +70 -0
- package/components/common/vm/actions/common/select/createType/lib/config/items.ts +24 -4
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -0
- package/components/common/vm/actions/common/select/name/Name.vue +24 -93
- package/components/common/vm/actions/common/select/name/New.vue +246 -0
- package/components/common/vm/actions/common/select/name/Old.vue +119 -0
- package/components/common/vm/actions/common/select/storage/new/New.vue +116 -86
- package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +156 -3
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +6 -0
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -0
- package/components/common/vm/actions/common/select/template/Template.vue +2 -3
- package/components/common/vm/actions/common/select/template/TemplateTreeView.vue +1 -1
- package/package.json +1 -1
- /package/components/common/vm/actions/common/select/storage/{StorageOld.vue → Old.vue} +0 -0
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
@submit="onFinish"
|
|
12
12
|
>
|
|
13
13
|
<template #modalBody="{ selectedStep }">
|
|
14
|
-
<atoms-loader v-show="!
|
|
15
|
-
<div v-if="
|
|
14
|
+
<atoms-loader v-show="!vmSettingsLocal" id="loader" />
|
|
15
|
+
<div v-if="vmSettingsLocal" class="vm-context">
|
|
16
16
|
<common-pages-scheduled-tasks-modals-common-new-task-form
|
|
17
17
|
v-show="selectedStep.id === dynamicSteps.scheduledTasks"
|
|
18
18
|
v-model="newTaskForm"
|
|
@@ -31,35 +31,35 @@
|
|
|
31
31
|
v-show="selectedStep.id === dynamicSteps.selectStorage"
|
|
32
32
|
:storage-submit="storageSubmit"
|
|
33
33
|
:datastore="props.datastore"
|
|
34
|
-
:storage="
|
|
34
|
+
:storage="vmSettingsLocal.storage"
|
|
35
35
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
36
36
|
@submit="onChangeStorage"
|
|
37
37
|
/>
|
|
38
38
|
<common-vm-actions-common-customize-hardware
|
|
39
39
|
v-show="selectedStep.id === dynamicSteps.customizeHardware"
|
|
40
40
|
v-model:vm-name="vmName"
|
|
41
|
-
v-model:guest-machine-type="
|
|
42
|
-
v-model:guest-os-family="
|
|
43
|
-
v-model:guest-os-version="
|
|
44
|
-
:storage="
|
|
41
|
+
v-model:guest-machine-type="vmSettingsLocal.guestMachineType"
|
|
42
|
+
v-model:guest-os-family="vmSettingsLocal.guestOsFamily"
|
|
43
|
+
v-model:guest-os-version="vmSettingsLocal.guestOsVersion"
|
|
44
|
+
:storage="vmSettingsLocal.storage"
|
|
45
45
|
:hard-disks-for-boot-options="virtualHardwareHardDisksLocal"
|
|
46
46
|
:cd-dvd-drives-for-boot-options="virtualHardwareCdDvdDrivesLocal"
|
|
47
47
|
:networks-for-boot-options="virtualHardwareNetworksLocal"
|
|
48
|
-
:cd-dvd-drives="
|
|
49
|
-
:hard-disks="
|
|
50
|
-
:networks="
|
|
48
|
+
:cd-dvd-drives="vmSettingsLocal.cdDvdDrives"
|
|
49
|
+
:hard-disks="vmSettingsLocal.hardDisks"
|
|
50
|
+
:networks="vmSettingsLocal.networks"
|
|
51
51
|
:customize-hardware-submit="customizeHardwareSubmit"
|
|
52
|
-
:max-cpus="
|
|
53
|
-
:max-memory="
|
|
54
|
-
:cpu-models="
|
|
55
|
-
:cpu="
|
|
56
|
-
:memory="
|
|
57
|
-
:video-card="
|
|
58
|
-
:usb-controller="
|
|
59
|
-
:pci-devices="
|
|
52
|
+
:max-cpus="vmSettingsLocal.maxCpus"
|
|
53
|
+
:max-memory="vmSettingsLocal.maxMemory"
|
|
54
|
+
:cpu-models="vmSettingsLocal.cpuModels"
|
|
55
|
+
:cpu="vmSettingsLocal.cpu"
|
|
56
|
+
:memory="vmSettingsLocal.memory"
|
|
57
|
+
:video-card="vmSettingsLocal.videoCard"
|
|
58
|
+
:usb-controller="vmSettingsLocal.usbController"
|
|
59
|
+
:pci-devices="vmSettingsLocal.pciDevices"
|
|
60
60
|
:selected-nav-item="selectedNavItem"
|
|
61
|
-
:hard-disks-for-edit="
|
|
62
|
-
:options="
|
|
61
|
+
:hard-disks-for-edit="vmSettingsLocal.hardDisks"
|
|
62
|
+
:options="vmSettingsLocal.options"
|
|
63
63
|
:nodes="props.nodes"
|
|
64
64
|
:files="props.files"
|
|
65
65
|
:networks-table="props.networksTable"
|
|
@@ -120,7 +120,7 @@ import type {
|
|
|
120
120
|
} from '~/lib/models/store/vm/interfaces'
|
|
121
121
|
import type {
|
|
122
122
|
I_DynamicSteps,
|
|
123
|
-
UI_I_VmForm,
|
|
123
|
+
// UI_I_VmForm,
|
|
124
124
|
} from '~/components/common/vm/actions/clone/toTemplate/lib/models/interfaces'
|
|
125
125
|
import type {
|
|
126
126
|
UI_I_ValidationReturn,
|
|
@@ -396,23 +396,15 @@ const checkCustomizeHardware = async (
|
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
const storageIdCash = ref<string | null>(null)
|
|
399
|
-
const vmForm = ref<UI_I_VmForm>({
|
|
400
|
-
name: '',
|
|
401
|
-
storage: null,
|
|
402
|
-
options: [],
|
|
403
|
-
})
|
|
404
399
|
const onChangeName = (name: string): void => {
|
|
405
|
-
|
|
400
|
+
vmSettingsLocal.value && (vmSettingsLocal.value.name = name)
|
|
406
401
|
}
|
|
407
402
|
const onChangeStorage = (storage: UI_I_DatastoreTableItem | null): void => {
|
|
408
403
|
if (!storage) return
|
|
409
404
|
|
|
410
|
-
|
|
405
|
+
vmSettingsLocal.value && (vmSettingsLocal.value.storage = storage)
|
|
411
406
|
storageIdCash.value = storage.id
|
|
412
407
|
}
|
|
413
|
-
const onChangeSelectOptions = (options: string[]): void => {
|
|
414
|
-
vmForm.value.options = options
|
|
415
|
-
}
|
|
416
408
|
const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
|
|
417
409
|
const onChangeCustomizeHardware = (
|
|
418
410
|
data: UI_I_SendDataCustomizeHardware
|
|
@@ -452,7 +444,7 @@ const isPowerOnByDefault = ref<boolean>(true)
|
|
|
452
444
|
watch(
|
|
453
445
|
() => props.vmNameInWizard,
|
|
454
446
|
(newValue) => {
|
|
455
|
-
|
|
447
|
+
vmSettingsLocal.value && (vmSettingsLocal.value.name = newValue)
|
|
456
448
|
}
|
|
457
449
|
)
|
|
458
450
|
|
|
@@ -463,7 +455,7 @@ const validateSendData = async (
|
|
|
463
455
|
let stepHasError = false
|
|
464
456
|
|
|
465
457
|
const data = await props.validateSendDataFunc(
|
|
466
|
-
|
|
458
|
+
vmSettingsLocal.value,
|
|
467
459
|
virtualHardwareCpu.value,
|
|
468
460
|
virtualHardwareMemory.value,
|
|
469
461
|
customizeHardware.value,
|
|
@@ -489,7 +481,7 @@ const onFinish = (): void => {
|
|
|
489
481
|
wizard.setLoader(false)
|
|
490
482
|
props
|
|
491
483
|
.finishFunc(
|
|
492
|
-
|
|
484
|
+
vmSettingsLocal.value,
|
|
493
485
|
virtualHardwareCpu.value,
|
|
494
486
|
virtualHardwareMemory.value,
|
|
495
487
|
customizeHardware.value,
|
|
@@ -515,9 +507,9 @@ const storageSubmit = ref<null | Function>(null)
|
|
|
515
507
|
const selectOptionsSubmit = ref<number>(0)
|
|
516
508
|
const customizeHardwareSubmit = ref<null | Function>(null)
|
|
517
509
|
|
|
518
|
-
const
|
|
519
|
-
const vmName = ref<string>(
|
|
520
|
-
watch(
|
|
510
|
+
const vmSettingsLocal = computed<UI_I_VmSettings | null>(() => props.vmSettings)
|
|
511
|
+
const vmName = ref<string>(vmSettingsLocal.value?.name || '')
|
|
512
|
+
watch(vmSettingsLocal, (newValue) => {
|
|
521
513
|
vmName.value = newValue?.name || ''
|
|
522
514
|
})
|
|
523
515
|
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue
CHANGED
|
@@ -63,7 +63,7 @@ const apiErrorLocal = computed<string>(() => {
|
|
|
63
63
|
)
|
|
64
64
|
})
|
|
65
65
|
|
|
66
|
-
const maxShares =
|
|
66
|
+
const maxShares = 262_144
|
|
67
67
|
const sharesOptions = computed<UI_I_OptionItem[]>(() => {
|
|
68
68
|
return sharesOptionsFunc(localization.value, maxShares)
|
|
69
69
|
})
|
|
@@ -73,7 +73,7 @@ const sharesTypeOptions = ref<UI_I_OptionItem[]>(
|
|
|
73
73
|
)
|
|
74
74
|
|
|
75
75
|
const isDisabledShares = computed<boolean>(
|
|
76
|
-
() => sharesTypeLocal.value !== '
|
|
76
|
+
() => sharesTypeLocal.value !== '2' || props.disabled
|
|
77
77
|
)
|
|
78
78
|
const sharesLocal = computed<string>({
|
|
79
79
|
get() {
|
|
@@ -93,14 +93,14 @@ const sharesTypeLocal = computed<string>({
|
|
|
93
93
|
})
|
|
94
94
|
const onChangeSharesType = (event: UI_I_HTMLSelectElement): void => {
|
|
95
95
|
const value = event.target.value
|
|
96
|
-
if (value === '
|
|
96
|
+
if (value === '2') return
|
|
97
97
|
sharesLocal.value = event.target.value
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
const sharesErrorLocalText = computed<string>(() => {
|
|
101
|
-
if (+sharesLocal.value <
|
|
101
|
+
if (+sharesLocal.value < 2 || +sharesLocal.value > maxShares) {
|
|
102
102
|
return localization.value.common.sharesMustBe
|
|
103
|
-
.replace('{0}', '
|
|
103
|
+
.replace('{0}', '2')
|
|
104
104
|
.replace('{1}', maxShares + '')
|
|
105
105
|
}
|
|
106
106
|
|
|
@@ -7,8 +7,8 @@ export const sharesOptionsFunc = (
|
|
|
7
7
|
): UI_I_OptionItem[] => {
|
|
8
8
|
return [
|
|
9
9
|
{
|
|
10
|
-
text: `${localization.common.minimum}
|
|
11
|
-
value:
|
|
10
|
+
text: `${localization.common.minimum} 2`,
|
|
11
|
+
value: 2,
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
text: `${localization.common.maximum} ${maxShares}`,
|
|
@@ -23,6 +23,6 @@ export const sharesTypeOptionsFunc = (
|
|
|
23
23
|
{ text: localization.common.low, value: '1000' },
|
|
24
24
|
{ text: localization.common.normal, value: '2000' },
|
|
25
25
|
{ text: localization.common.high, value: '4000' },
|
|
26
|
-
{ text: localization.common.custom, value: '
|
|
26
|
+
{ text: localization.common.custom, value: '2' },
|
|
27
27
|
]
|
|
28
28
|
}
|
|
@@ -1,62 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
v-model="selectedVersion"
|
|
20
|
-
data-id="vm-wizard-version-select"
|
|
21
|
-
>
|
|
22
|
-
<option v-for="(item, key) in versions" :key="key" :value="item">
|
|
23
|
-
{{ item.text }}
|
|
24
|
-
</option>
|
|
25
|
-
</select>
|
|
26
|
-
</template>
|
|
27
|
-
<template #content>{{ apiError }}</template>
|
|
28
|
-
</atoms-tooltip-error>
|
|
29
|
-
<!-- <div id="version-select-help-icon" class="flex-align-center relative">-->
|
|
30
|
-
<!-- <atoms-the-icon-->
|
|
31
|
-
<!-- fill="#0072a3"-->
|
|
32
|
-
<!-- width="24px"-->
|
|
33
|
-
<!-- height="24px"-->
|
|
34
|
-
<!-- name="info-circle"-->
|
|
35
|
-
<!-- @click="isShowHelp = !isShowHelp"-->
|
|
36
|
-
<!-- />-->
|
|
37
|
-
<!-- <atoms-tooltip-signpost-->
|
|
38
|
-
<!-- v-if="isShowHelp"-->
|
|
39
|
-
<!-- elem-id="version-select-help-icon"-->
|
|
40
|
-
<!-- @hide="isShowHelp = false"-->
|
|
41
|
-
<!-- >-->
|
|
42
|
-
<!-- <h3 class="help-title">{{ localization.common.help }}</h3>-->
|
|
43
|
-
|
|
44
|
-
<!-- <p>-->
|
|
45
|
-
<!-- {{-->
|
|
46
|
-
<!-- localization.common.eachVirtualMachineCompatibilitySettingIncludesHardwareAvailableVirtualMachine-->
|
|
47
|
-
<!-- }}-->
|
|
48
|
-
<!-- </p>-->
|
|
49
|
-
|
|
50
|
-
<!-- <a id="more-information-link" class="pointer">{{-->
|
|
51
|
-
<!-- localization.common.moreInformation-->
|
|
52
|
-
<!-- }}</a>-->
|
|
53
|
-
<!-- </atoms-tooltip-signpost>-->
|
|
54
|
-
<!-- </div>-->
|
|
55
|
-
</div>
|
|
56
|
-
<p class="select-compatibility-block">
|
|
57
|
-
{{ versionDescription }}
|
|
58
|
-
</p>
|
|
59
|
-
</div>
|
|
2
|
+
<common-vm-actions-common-select-compatibility-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model:selected-version="selectedVersion"
|
|
5
|
+
:versions="versions"
|
|
6
|
+
:description="description"
|
|
7
|
+
:api-error="apiError"
|
|
8
|
+
@remove-validation-error="onRemoveValidationError"
|
|
9
|
+
/>
|
|
10
|
+
<common-vm-actions-common-select-compatibility-old
|
|
11
|
+
v-else
|
|
12
|
+
v-model:selected-version="selectedVersion"
|
|
13
|
+
:versions="versions"
|
|
14
|
+
:description="description"
|
|
15
|
+
:version-description="versionDescription"
|
|
16
|
+
:api-error="apiError"
|
|
17
|
+
@remove-validation-error="onRemoveValidationError"
|
|
18
|
+
/>
|
|
60
19
|
</template>
|
|
61
20
|
|
|
62
21
|
<script setup lang="ts">
|
|
@@ -66,13 +25,16 @@ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
|
66
25
|
|
|
67
26
|
const props = defineProps<{
|
|
68
27
|
options: UI_I_OptionItem[]
|
|
69
|
-
errorValidationFields: UI_I_ErrorValidationField
|
|
28
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
70
29
|
}>()
|
|
71
30
|
const emits = defineEmits<{
|
|
72
31
|
(event: 'change', value: UI_I_OptionItem): void
|
|
73
32
|
(event: 'remove-error-by-title', value: string): void
|
|
74
33
|
}>()
|
|
75
34
|
|
|
35
|
+
const { $store }: any = useNuxtApp()
|
|
36
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
37
|
+
|
|
76
38
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
77
39
|
|
|
78
40
|
const versions = ref<UI_I_OptionItem[]>(props.options)
|
|
@@ -135,28 +97,4 @@ const onRemoveValidationError = (): void => {
|
|
|
135
97
|
</script>
|
|
136
98
|
|
|
137
99
|
<style scoped lang="scss">
|
|
138
|
-
.select-compatibility-block {
|
|
139
|
-
margin-top: 12px;
|
|
140
|
-
font-size: 13px;
|
|
141
|
-
|
|
142
|
-
&.version-select-wrap {
|
|
143
|
-
display: flex;
|
|
144
|
-
align-items: center;
|
|
145
|
-
gap: 6px;
|
|
146
|
-
|
|
147
|
-
//#version-select-help-icon {
|
|
148
|
-
// .help-title {
|
|
149
|
-
// font-size: 22px;
|
|
150
|
-
// }
|
|
151
|
-
//
|
|
152
|
-
// p {
|
|
153
|
-
// width: 200px;
|
|
154
|
-
// }
|
|
155
|
-
//
|
|
156
|
-
// a {
|
|
157
|
-
// color: #0072a3;
|
|
158
|
-
// }
|
|
159
|
-
//}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
100
|
</style>
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="select-compatibility pt-4">
|
|
3
|
+
<Teleport to="#compatibility-alert-wrapper">
|
|
4
|
+
<ui-alert
|
|
5
|
+
v-show="props.apiError.length"
|
|
6
|
+
status="alert-danger"
|
|
7
|
+
:messages="[props.apiError]"
|
|
8
|
+
test-id="storage-alert"
|
|
9
|
+
:items="[props.apiError]"
|
|
10
|
+
@remove="emits('remove-validation-error')"
|
|
11
|
+
/>
|
|
12
|
+
</Teleport>
|
|
13
|
+
<h3 class="select-compatibility-description pb-4">
|
|
14
|
+
{{ props.description }}
|
|
15
|
+
</h3>
|
|
16
|
+
<div class="version-select-wrap flex">
|
|
17
|
+
<div
|
|
18
|
+
v-for="item in versionsLocal"
|
|
19
|
+
:key="item.value"
|
|
20
|
+
:class="[
|
|
21
|
+
'version-select',
|
|
22
|
+
{
|
|
23
|
+
selected: item.value === selectedVersionLocal,
|
|
24
|
+
disabled: item.disabled,
|
|
25
|
+
},
|
|
26
|
+
]"
|
|
27
|
+
@click="selectedVersionLocal = item.value"
|
|
28
|
+
>
|
|
29
|
+
<ui-radio
|
|
30
|
+
v-model="selectedVersionLocal"
|
|
31
|
+
:label="item.text"
|
|
32
|
+
:value="item.value"
|
|
33
|
+
:test-id="item.testId"
|
|
34
|
+
:disabled="item.disabled"
|
|
35
|
+
size="md"
|
|
36
|
+
/>
|
|
37
|
+
|
|
38
|
+
<p class="description">
|
|
39
|
+
{{ item.description }}
|
|
40
|
+
</p>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script setup lang="ts">
|
|
47
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
48
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
49
|
+
|
|
50
|
+
const selectedVersion = defineModel<UI_I_OptionItem | null>('selectedVersion', {
|
|
51
|
+
required: true,
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const props = defineProps<{
|
|
55
|
+
versions: UI_I_OptionItem[]
|
|
56
|
+
description: string
|
|
57
|
+
apiError: string
|
|
58
|
+
}>()
|
|
59
|
+
const emits = defineEmits<{
|
|
60
|
+
(event: 'remove-validation-error'): void
|
|
61
|
+
}>()
|
|
62
|
+
|
|
63
|
+
const selectedVersionLocal = computed<string>({
|
|
64
|
+
get() {
|
|
65
|
+
return selectedVersion.value?.value
|
|
66
|
+
},
|
|
67
|
+
set(newValue) {
|
|
68
|
+
selectedVersion.value =
|
|
69
|
+
props.versions.find((version) => version.value === newValue) || null
|
|
70
|
+
},
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
74
|
+
|
|
75
|
+
const getDescription = (version: any) => {
|
|
76
|
+
const versionValue = version.value.split('-')[1]
|
|
77
|
+
const text = version.text
|
|
78
|
+
|
|
79
|
+
if (version === props.versions.at(-1)) {
|
|
80
|
+
return localization.value.common.virtualMachineUsesHardwareVersionAvailable
|
|
81
|
+
.replace('{0}', versionValue)
|
|
82
|
+
.replace('{1}', text)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return localization.value.common.virtualMachineUsesHardwareVersionUnavailable
|
|
86
|
+
.replace('{0}', versionValue)
|
|
87
|
+
.replace('{1}', text)
|
|
88
|
+
}
|
|
89
|
+
const versionsLocal = computed(() => {
|
|
90
|
+
return props.versions.map((version) => {
|
|
91
|
+
return {
|
|
92
|
+
...version,
|
|
93
|
+
description: getDescription(version),
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<style>
|
|
100
|
+
:root {
|
|
101
|
+
--select-compatibility-bg-color: #ffffff;
|
|
102
|
+
--select-compatibility-border-color: #e9ebed;
|
|
103
|
+
--select-compatibility-border-hover-color: #d3d6da;
|
|
104
|
+
--select-compatibility-selected-bg-color: #f0f8fd;
|
|
105
|
+
--select-compatibility-selected-border-color: #008fd6;
|
|
106
|
+
--select-compatibility-description-color: #4d5d69;
|
|
107
|
+
}
|
|
108
|
+
:root.dark-theme {
|
|
109
|
+
--select-compatibility-bg-color: transparent;
|
|
110
|
+
--select-compatibility-border-color: #e9ebed1f;
|
|
111
|
+
--select-compatibility-border-hover-color: #e9ebed3d;
|
|
112
|
+
--select-compatibility-selected-bg-color: #2ba2de14;
|
|
113
|
+
--select-compatibility-selected-border-color: #2ba2de;
|
|
114
|
+
--select-compatibility-description-color: #e9eaec;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
117
|
+
<style scoped lang="scss">
|
|
118
|
+
.select-compatibility {
|
|
119
|
+
container-type: inline-size;
|
|
120
|
+
|
|
121
|
+
.select-compatibility-description {
|
|
122
|
+
font-size: 13px;
|
|
123
|
+
color: var(--select-compatibility-description-color);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.version-select-wrap {
|
|
127
|
+
gap: 12px;
|
|
128
|
+
|
|
129
|
+
.version-select {
|
|
130
|
+
background-color: var(--select-compatibility-bg-color);
|
|
131
|
+
border: 1px solid var(--select-compatibility-border-color);
|
|
132
|
+
padding: 12px;
|
|
133
|
+
border-radius: 8px;
|
|
134
|
+
|
|
135
|
+
&:not(.selected):not(.disabled) {
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
&:hover {
|
|
138
|
+
border-color: var(--select-compatibility-border-hover-color);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&.selected {
|
|
143
|
+
background-color: var(--select-compatibility-selected-bg-color);
|
|
144
|
+
border: 1.5px solid var(--select-compatibility-selected-border-color);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.description {
|
|
148
|
+
font-size: 13px;
|
|
149
|
+
color: #9da6ad;
|
|
150
|
+
margin: 8px 0 0 28px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
:deep(.radio-label) {
|
|
154
|
+
align-items: flex-start;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@container (max-width: 600px) {
|
|
160
|
+
.version-select-wrap {
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
</style>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="select-compatibility">
|
|
3
|
+
<p class="select-compatibility-block">
|
|
4
|
+
{{ props.description }}
|
|
5
|
+
</p>
|
|
6
|
+
<div class="select-compatibility-block version-select-wrap">
|
|
7
|
+
<label for="version-select"
|
|
8
|
+
>{{ localization.common.compatibleWith }}:</label
|
|
9
|
+
>
|
|
10
|
+
|
|
11
|
+
<atoms-tooltip-error
|
|
12
|
+
:has-error="!!props.apiError"
|
|
13
|
+
selector="#vm-wizard-version-select"
|
|
14
|
+
@remove="emits('remove-validation-error')"
|
|
15
|
+
>
|
|
16
|
+
<template #elem>
|
|
17
|
+
<select
|
|
18
|
+
id="vm-wizard-version-select"
|
|
19
|
+
v-model="selectedVersion"
|
|
20
|
+
data-id="vm-wizard-version-select"
|
|
21
|
+
>
|
|
22
|
+
<option v-for="(item, key) in props.versions" :key="key" :value="item">
|
|
23
|
+
{{ item.text }}
|
|
24
|
+
</option>
|
|
25
|
+
</select>
|
|
26
|
+
</template>
|
|
27
|
+
<template #content>{{ props.apiError }}</template>
|
|
28
|
+
</atoms-tooltip-error>
|
|
29
|
+
<!-- <div id="version-select-help-icon" class="flex-align-center relative">-->
|
|
30
|
+
<!-- <atoms-the-icon-->
|
|
31
|
+
<!-- fill="#0072a3"-->
|
|
32
|
+
<!-- width="24px"-->
|
|
33
|
+
<!-- height="24px"-->
|
|
34
|
+
<!-- name="info-circle"-->
|
|
35
|
+
<!-- @click="isShowHelp = !isShowHelp"-->
|
|
36
|
+
<!-- />-->
|
|
37
|
+
<!-- <atoms-tooltip-signpost-->
|
|
38
|
+
<!-- v-if="isShowHelp"-->
|
|
39
|
+
<!-- elem-id="version-select-help-icon"-->
|
|
40
|
+
<!-- @hide="isShowHelp = false"-->
|
|
41
|
+
<!-- >-->
|
|
42
|
+
<!-- <h3 class="help-title">{{ localization.common.help }}</h3>-->
|
|
43
|
+
|
|
44
|
+
<!-- <p>-->
|
|
45
|
+
<!-- {{-->
|
|
46
|
+
<!-- localization.common.eachVirtualMachineCompatibilitySettingIncludesHardwareAvailableVirtualMachine-->
|
|
47
|
+
<!-- }}-->
|
|
48
|
+
<!-- </p>-->
|
|
49
|
+
|
|
50
|
+
<!-- <a id="more-information-link" class="pointer">{{-->
|
|
51
|
+
<!-- localization.common.moreInformation-->
|
|
52
|
+
<!-- }}</a>-->
|
|
53
|
+
<!-- </atoms-tooltip-signpost>-->
|
|
54
|
+
<!-- </div>-->
|
|
55
|
+
</div>
|
|
56
|
+
<p class="select-compatibility-block">
|
|
57
|
+
{{ props.versionDescription }}
|
|
58
|
+
</p>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup lang="ts">
|
|
63
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
64
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
65
|
+
|
|
66
|
+
const selectedVersion = defineModel<UI_I_OptionItem | null>('selectedVersion', {required: true})
|
|
67
|
+
|
|
68
|
+
const props = defineProps<{
|
|
69
|
+
versions: UI_I_OptionItem[]
|
|
70
|
+
description: string
|
|
71
|
+
versionDescription: string
|
|
72
|
+
apiError: string
|
|
73
|
+
}>()
|
|
74
|
+
const emits = defineEmits<{
|
|
75
|
+
(event: 'remove-validation-error'): void
|
|
76
|
+
}>()
|
|
77
|
+
|
|
78
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
79
|
+
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style scoped lang="scss">
|
|
83
|
+
.select-compatibility-block {
|
|
84
|
+
margin-top: 12px;
|
|
85
|
+
font-size: 13px;
|
|
86
|
+
|
|
87
|
+
&.version-select-wrap {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 6px;
|
|
91
|
+
|
|
92
|
+
//#version-select-help-icon {
|
|
93
|
+
// .help-title {
|
|
94
|
+
// font-size: 22px;
|
|
95
|
+
// }
|
|
96
|
+
//
|
|
97
|
+
// p {
|
|
98
|
+
// width: 200px;
|
|
99
|
+
// }
|
|
100
|
+
//
|
|
101
|
+
// a {
|
|
102
|
+
// color: #0072a3;
|
|
103
|
+
// }
|
|
104
|
+
//}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
</style>
|