bfg-common 1.4.665 → 1.4.667
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/components/atoms/autocomplete/Autocomplete.vue +3 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +3 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +7 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +7 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +11 -11
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<div v-show="props.loading" class="loader">
|
|
5
5
|
<atoms-loader-pre-loader
|
|
6
6
|
id="loader"
|
|
7
|
+
:test-id="`${props.testId}-pre-loader`"
|
|
7
8
|
class="content-area__loading"
|
|
8
9
|
:show="true"
|
|
9
10
|
/>
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
:data-id="`${props.testId}-search-input`"
|
|
23
24
|
type="text"
|
|
24
25
|
class="search-input"
|
|
26
|
+
autocomplete="off"
|
|
25
27
|
:placeholder="props.placeholder"
|
|
26
28
|
@input="onSearch"
|
|
27
29
|
/>
|
|
@@ -89,7 +91,7 @@ const items = computed<any[]>(() => {
|
|
|
89
91
|
firstText: texts[0],
|
|
90
92
|
secondText: term,
|
|
91
93
|
thirdText: texts[1],
|
|
92
|
-
testId: `${term}-filtered-item
|
|
94
|
+
testId: `${term}-filtered-item`,
|
|
93
95
|
}
|
|
94
96
|
})
|
|
95
97
|
})
|
|
@@ -2,32 +2,30 @@
|
|
|
2
2
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-new
|
|
3
3
|
v-if="isNewView"
|
|
4
4
|
v-model:invalid="invalid"
|
|
5
|
-
v-model:selected-video-card="selectedVideoCard"
|
|
6
5
|
v-model:number-displays="numberDisplays"
|
|
7
6
|
v-model:video-card-model="videoCardModel"
|
|
8
7
|
:is-edit="props.isEdit"
|
|
9
8
|
:error-validation-fields="props.errorValidationFields"
|
|
10
9
|
:video-card-model-name="videoCardModelName"
|
|
11
10
|
:error-text="apiError"
|
|
12
|
-
:video-card-options="videoCardOptions"
|
|
13
11
|
:is-disabled="isDisabled"
|
|
14
12
|
:state="props.state"
|
|
13
|
+
:video-card-model-options="videoCardModelOptions"
|
|
15
14
|
@remove-error="onRemoveValidationError"
|
|
16
15
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
17
16
|
/>
|
|
18
17
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-old
|
|
19
18
|
v-else
|
|
20
19
|
v-model:invalid="invalid"
|
|
21
|
-
v-model:selected-video-card="selectedVideoCard"
|
|
22
20
|
v-model:number-displays="numberDisplays"
|
|
23
21
|
v-model:video-card-model="videoCardModel"
|
|
24
22
|
:is-edit="props.isEdit"
|
|
25
23
|
:error-validation-fields="props.errorValidationFields"
|
|
26
24
|
:video-card-model-name="videoCardModelName"
|
|
27
25
|
:error-text="apiError"
|
|
28
|
-
:video-card-options="videoCardOptions"
|
|
29
26
|
:is-disabled="isDisabled"
|
|
30
27
|
:state="props.state"
|
|
28
|
+
:video-card-model-options="videoCardModelOptions"
|
|
31
29
|
@remove-error="onRemoveValidationError"
|
|
32
30
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
33
31
|
/>
|
|
@@ -35,11 +33,9 @@
|
|
|
35
33
|
|
|
36
34
|
<script setup lang="ts">
|
|
37
35
|
import type { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
38
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
39
36
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
40
37
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
41
38
|
import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
|
|
42
|
-
import { videoCardOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
|
|
43
39
|
|
|
44
40
|
const props = defineProps<{
|
|
45
41
|
isEdit: boolean
|
|
@@ -56,15 +52,8 @@ const emits = defineEmits<{
|
|
|
56
52
|
const { $store }: any = useNuxtApp()
|
|
57
53
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
58
54
|
|
|
59
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
60
|
-
|
|
61
|
-
const selectedVideoCard = ref<number>(1)
|
|
62
|
-
const videoCardOptions = ref<UI_I_OptionItem[]>(
|
|
63
|
-
videoCardOptionsFunc(localization.value)
|
|
64
|
-
)
|
|
65
|
-
|
|
66
55
|
const isDisabled = computed<boolean>(
|
|
67
|
-
() =>
|
|
56
|
+
() => props.isEdit && props.state !== 1
|
|
68
57
|
)
|
|
69
58
|
watch(isDisabled, (newValue) => {
|
|
70
59
|
if (!newValue) {
|
|
@@ -117,7 +106,6 @@ watch(
|
|
|
117
106
|
(newValue) => {
|
|
118
107
|
if (!newValue) return
|
|
119
108
|
|
|
120
|
-
selectedVideoCard.value = 1
|
|
121
109
|
videoCardModel.value = newValue.adapter
|
|
122
110
|
numberDisplays.value = '' + newValue.displays
|
|
123
111
|
// totalVideoMemory.value = newValue.memory_mb
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
<template #stackBlockContent>
|
|
22
22
|
<ui-select
|
|
23
23
|
id="vm-wizard-video-card"
|
|
24
|
-
v-model="
|
|
24
|
+
v-model="videoCardModel"
|
|
25
25
|
width="auto"
|
|
26
|
-
:items="props.
|
|
26
|
+
:items="props.videoCardModelOptions"
|
|
27
27
|
:disabled="props.isEdit && props.state !== 1"
|
|
28
28
|
test-id="vm-wizard-video-card-select"
|
|
29
29
|
class="vm-wizard-video-card video-card-select"
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
<!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
|
|
50
50
|
<!-- v-models:graphics="graphics"-->
|
|
51
51
|
<!-- />-->
|
|
52
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model
|
|
53
|
-
v-model:video-card-model="videoCardModel"
|
|
54
|
-
:disabled="props.isDisabled"
|
|
55
|
-
|
|
52
|
+
<!-- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model-->
|
|
53
|
+
<!-- v-model:video-card-model="videoCardModel"-->
|
|
54
|
+
<!-- :disabled="props.isDisabled"-->
|
|
55
|
+
<!-- />-->
|
|
56
56
|
</template>
|
|
57
57
|
</ui-stack-block>
|
|
58
58
|
</template>
|
|
@@ -63,9 +63,6 @@ import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
|
63
63
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
64
64
|
|
|
65
65
|
const invalid = defineModel<boolean>('invalid', { required: true })
|
|
66
|
-
const selectedVideoCard = defineModel<string>('selectedVideoCard', {
|
|
67
|
-
required: true,
|
|
68
|
-
})
|
|
69
66
|
const numberDisplays = defineModel<string>('numberDisplays', { required: true })
|
|
70
67
|
// const totalVideoMemory = defineModel<number>('totalVideoMemory', {
|
|
71
68
|
// required: true,
|
|
@@ -77,8 +74,8 @@ const props = defineProps<{
|
|
|
77
74
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
78
75
|
videoCardModelName: string
|
|
79
76
|
errorText: string
|
|
80
|
-
videoCardOptions: UI_I_OptionItem[]
|
|
81
77
|
isDisabled: boolean
|
|
78
|
+
videoCardModelOptions: UI_I_OptionItem[]
|
|
82
79
|
state?: string | number
|
|
83
80
|
}>()
|
|
84
81
|
const emits = defineEmits<{
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
<div class="select">
|
|
31
31
|
<select
|
|
32
32
|
id="vm-wizard-video-card"
|
|
33
|
-
v-model="
|
|
33
|
+
v-model="videoCardModel"
|
|
34
34
|
data-id="vm-wizard-video-card-select"
|
|
35
35
|
class="vm-wizard-video-card input-text-color"
|
|
36
36
|
:disabled="props.isEdit && props.state !== 1"
|
|
37
37
|
@click.stop
|
|
38
38
|
>
|
|
39
39
|
<option
|
|
40
|
-
v-for="(item, key) in props.
|
|
40
|
+
v-for="(item, key) in props.videoCardModelOptions"
|
|
41
41
|
:key="key"
|
|
42
42
|
:value="item.value"
|
|
43
43
|
>
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
<!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
|
|
68
68
|
<!-- v-models:graphics="graphics"-->
|
|
69
69
|
<!-- />-->
|
|
70
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model
|
|
71
|
-
v-model:video-card-model="videoCardModel"
|
|
72
|
-
:disabled="props.isDisabled"
|
|
73
|
-
|
|
70
|
+
<!-- <common-vm-actions-common-customize-hardware-virtual-hardware-video-card-model-->
|
|
71
|
+
<!-- v-model:video-card-model="videoCardModel"-->
|
|
72
|
+
<!-- :disabled="props.isDisabled"-->
|
|
73
|
+
<!-- />-->
|
|
74
74
|
</template>
|
|
75
75
|
</atoms-stack-block>
|
|
76
76
|
</div>
|
|
@@ -82,9 +82,6 @@ import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
|
82
82
|
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
83
83
|
|
|
84
84
|
const invalid = defineModel<boolean>('invalid', { required: true })
|
|
85
|
-
const selectedVideoCard = defineModel<string>('selectedVideoCard', {
|
|
86
|
-
required: true,
|
|
87
|
-
})
|
|
88
85
|
const numberDisplays = defineModel<string>('numberDisplays', { required: true })
|
|
89
86
|
// const totalVideoMemory = defineModel<number>('totalVideoMemory', {
|
|
90
87
|
// required: true,
|
|
@@ -96,8 +93,8 @@ const props = defineProps<{
|
|
|
96
93
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
97
94
|
videoCardModelName: string
|
|
98
95
|
errorText: string
|
|
99
|
-
videoCardOptions: UI_I_OptionItem[]
|
|
100
96
|
isDisabled: boolean
|
|
97
|
+
videoCardModelOptions: UI_I_OptionItem[]
|
|
101
98
|
state?: string | number
|
|
102
99
|
}>()
|
|
103
100
|
const emits = defineEmits<{
|
|
@@ -1,11 +1,11 @@
|
|
|
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 videoCardOptionsFunc = (
|
|
5
|
-
|
|
6
|
-
): UI_I_OptionItem[] => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
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 videoCardOptionsFunc = (
|
|
5
|
+
// localization: UI_I_Localization
|
|
6
|
+
// ): UI_I_OptionItem[] => {
|
|
7
|
+
// return [
|
|
8
|
+
// { text: localization.common.autoDetectSettings, value: 0 },
|
|
9
|
+
// { text: localization.common.specifyCustomSettings, value: 1 },
|
|
10
|
+
// ]
|
|
11
|
+
// }
|