bfg-common 1.5.261 → 1.5.262
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/common/pages/licensing/listView/ListView.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +13 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +147 -136
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +14 -11
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -57
- package/package.json +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/lib/config/options.ts +0 -14
|
@@ -159,11 +159,19 @@ const selectedNodeInfo = computed<UI_I_FileInfo[] | null>(() => {
|
|
|
159
159
|
|
|
160
160
|
if (node.type !== 4) {
|
|
161
161
|
const modified = node.modified_time || 0
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
if (modified !== 0) {
|
|
163
|
+
result.push({
|
|
164
|
+
type: 'date',
|
|
165
|
+
title: localization.value.common.modified,
|
|
166
|
+
value: +modified * 1000,
|
|
167
|
+
})
|
|
168
|
+
} else {
|
|
169
|
+
result.push({
|
|
170
|
+
type: 'text',
|
|
171
|
+
title: localization.value.common.modified,
|
|
172
|
+
value: ' --',
|
|
173
|
+
})
|
|
174
|
+
}
|
|
167
175
|
}
|
|
168
176
|
|
|
169
177
|
return result
|
|
@@ -1,136 +1,147 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model:invalid="invalid"
|
|
5
|
-
v-model:number-displays="numberDisplays"
|
|
6
|
-
v-model:video-card-model="videoCardModel"
|
|
7
|
-
:is-edit="props.isEdit"
|
|
8
|
-
:error-validation-fields="props.errorValidationFields"
|
|
9
|
-
:video-card-model-name="videoCardModelName"
|
|
10
|
-
:error-text="apiError"
|
|
11
|
-
:is-disabled="isDisabled"
|
|
12
|
-
:state="props.state"
|
|
13
|
-
:video-card-model-options="videoCardModelOptions"
|
|
14
|
-
|
|
15
|
-
@remove-error
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
v-
|
|
20
|
-
v-model:
|
|
21
|
-
v-model:
|
|
22
|
-
:
|
|
23
|
-
:
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
:
|
|
27
|
-
:
|
|
28
|
-
:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
import type {
|
|
38
|
-
import type {
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
(event: '
|
|
52
|
-
(event: '
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model:invalid="invalid"
|
|
5
|
+
v-model:number-displays="numberDisplays"
|
|
6
|
+
v-model:video-card-model="videoCardModel"
|
|
7
|
+
:is-edit="props.isEdit"
|
|
8
|
+
:error-validation-fields="props.errorValidationFields"
|
|
9
|
+
:video-card-model-name="videoCardModelName"
|
|
10
|
+
:error-text="apiError"
|
|
11
|
+
:is-disabled="isDisabled"
|
|
12
|
+
:state="props.state"
|
|
13
|
+
:video-card-model-options="videoCardModelOptions"
|
|
14
|
+
:number-displays-options="numberDisplaysOptions"
|
|
15
|
+
@remove-error="onRemoveValidationError"
|
|
16
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
17
|
+
/>
|
|
18
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-old
|
|
19
|
+
v-else
|
|
20
|
+
v-model:invalid="invalid"
|
|
21
|
+
v-model:number-displays="numberDisplays"
|
|
22
|
+
v-model:video-card-model="videoCardModel"
|
|
23
|
+
:is-edit="props.isEdit"
|
|
24
|
+
:error-validation-fields="props.errorValidationFields"
|
|
25
|
+
:video-card-model-name="videoCardModelName"
|
|
26
|
+
:error-text="apiError"
|
|
27
|
+
:is-disabled="isDisabled"
|
|
28
|
+
:state="props.state"
|
|
29
|
+
:video-card-model-options="videoCardModelOptions"
|
|
30
|
+
:number-displays-options="numberDisplaysOptions"
|
|
31
|
+
@remove-error="onRemoveValidationError"
|
|
32
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
33
|
+
/>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import type { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
38
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
39
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
40
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
41
|
+
import { videoCardModelOptionsConfigFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/model/lib/config/options'
|
|
42
|
+
import { numberDisplaysOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options'
|
|
43
|
+
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
isEdit: boolean
|
|
46
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
47
|
+
videoCard?: UI_I_SendDataVideoCard
|
|
48
|
+
state?: string | number
|
|
49
|
+
}>()
|
|
50
|
+
const emits = defineEmits<{
|
|
51
|
+
(event: 'send-data', value: UI_I_SendDataVideoCard): void
|
|
52
|
+
(event: 'invalid', value: boolean): void
|
|
53
|
+
(event: 'remove-error-by-title', value: string): void
|
|
54
|
+
}>()
|
|
55
|
+
|
|
56
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
57
|
+
|
|
58
|
+
const { $store }: any = useNuxtApp()
|
|
59
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
60
|
+
|
|
61
|
+
const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
|
|
62
|
+
watch(isDisabled, (newValue) => {
|
|
63
|
+
if (!newValue) {
|
|
64
|
+
return
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
numberDisplays.value = '1'
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
const videoCardModel = ref<string>('qxl')
|
|
71
|
+
const videoCardModelOptions = computed<UI_I_OptionItem[]>(() =>
|
|
72
|
+
videoCardModelOptionsConfigFunc(localization.value)
|
|
73
|
+
)
|
|
74
|
+
const videoCardModelName = computed<string>(
|
|
75
|
+
() =>
|
|
76
|
+
videoCardModelOptions.value.find(
|
|
77
|
+
(videoCard) => videoCard.value === videoCardModel.value
|
|
78
|
+
)?.text || ''
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
const numberDisplays = ref<string>('1')
|
|
82
|
+
const numberDisplaysOptions = ref<UI_I_OptionItem[]>(numberDisplaysOptionsFunc())
|
|
83
|
+
|
|
84
|
+
// const totalVideoMemory = ref<number>(64)
|
|
85
|
+
const invalid = ref<boolean>(false)
|
|
86
|
+
watch(
|
|
87
|
+
invalid,
|
|
88
|
+
(newValue) => {
|
|
89
|
+
emits('invalid', newValue)
|
|
90
|
+
},
|
|
91
|
+
{ immediate: true }
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
// const graphics = ref(false)
|
|
95
|
+
|
|
96
|
+
const changeNumberDisplays = (model: any): void => {
|
|
97
|
+
if (model === 'none') {
|
|
98
|
+
numberDisplaysOptions.value.unshift({text: '0', value: '0'})
|
|
99
|
+
numberDisplays.value = '0'
|
|
100
|
+
} else if (numberDisplays.value === '0') {
|
|
101
|
+
numberDisplays.value = '1'
|
|
102
|
+
numberDisplaysOptions.value.shift()
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
watch(
|
|
106
|
+
// [numberDisplays, totalVideoMemory, videoCardModel],
|
|
107
|
+
[numberDisplays, videoCardModel],
|
|
108
|
+
([_newValue1, newValue2]) => {
|
|
109
|
+
changeNumberDisplays(newValue2)
|
|
110
|
+
|
|
111
|
+
emits('send-data', {
|
|
112
|
+
adapter: videoCardModel.value,
|
|
113
|
+
displays: +numberDisplays.value,
|
|
114
|
+
// memory_mb: totalVideoMemory.value,
|
|
115
|
+
})
|
|
116
|
+
},
|
|
117
|
+
{ immediate: true }
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
// Добавляем данные для редактирования
|
|
121
|
+
watch(
|
|
122
|
+
() => props.videoCard,
|
|
123
|
+
(newValue) => {
|
|
124
|
+
if (!newValue) return
|
|
125
|
+
|
|
126
|
+
videoCardModel.value = newValue.adapter
|
|
127
|
+
numberDisplays.value = '' + newValue.displays
|
|
128
|
+
// totalVideoMemory.value = newValue.memory_mb
|
|
129
|
+
},
|
|
130
|
+
{ immediate: true }
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
const typeError = 'video_card.adapter'
|
|
134
|
+
|
|
135
|
+
const apiError = computed<string>(() => {
|
|
136
|
+
return (
|
|
137
|
+
props.errorValidationFields?.find((message) => message.field === typeError)
|
|
138
|
+
?.error_message || ''
|
|
139
|
+
)
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
const onRemoveValidationError = (): void => {
|
|
143
|
+
emits('remove-error-by-title', typeError)
|
|
144
|
+
}
|
|
145
|
+
</script>
|
|
146
|
+
|
|
147
|
+
<style scoped lang="scss"></style>
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
<template #stackChildren>
|
|
40
40
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
|
|
41
41
|
v-model:number-displays="numberDisplays"
|
|
42
|
+
:number-displays-options="props.numberDisplaysOptions"
|
|
42
43
|
:disabled="props.isDisabled"
|
|
43
44
|
:error-validation-fields="props.errorValidationFields"
|
|
44
45
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
@@ -81,6 +82,7 @@ const props = defineProps<{
|
|
|
81
82
|
errorText: string
|
|
82
83
|
isDisabled: boolean
|
|
83
84
|
videoCardModelOptions: UI_I_OptionItem[]
|
|
85
|
+
numberDisplaysOptions: UI_I_OptionItem[]
|
|
84
86
|
state?: string | number
|
|
85
87
|
}>()
|
|
86
88
|
const emits = defineEmits<{
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
<template #stackChildren>
|
|
53
53
|
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays
|
|
54
54
|
v-model:number-displays="numberDisplays"
|
|
55
|
+
:number-displays-options="props.numberDisplaysOptions"
|
|
55
56
|
:disabled="props.isDisabled"
|
|
56
57
|
:error-validation-fields="props.errorValidationFields"
|
|
57
58
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
@@ -95,6 +96,7 @@ const props = defineProps<{
|
|
|
95
96
|
errorText: string
|
|
96
97
|
isDisabled: boolean
|
|
97
98
|
videoCardModelOptions: UI_I_OptionItem[]
|
|
99
|
+
numberDisplaysOptions: UI_I_OptionItem[]
|
|
98
100
|
state?: string | number
|
|
99
101
|
}>()
|
|
100
102
|
const emits = defineEmits<{
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
// }
|
|
1
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
2
|
+
|
|
3
|
+
export const numberDisplaysOptionsFunc = (): UI_I_OptionItem[] => [
|
|
4
|
+
{ text: '1', value: '1' },
|
|
5
|
+
{ text: '2', value: '2' },
|
|
6
|
+
{ text: '3', value: '3' },
|
|
7
|
+
{ text: '4', value: '4' },
|
|
8
|
+
// { text: '5', value: '5' },
|
|
9
|
+
// { text: '6', value: '6' },
|
|
10
|
+
// { text: '7', value: '7' },
|
|
11
|
+
// { text: '8', value: '8' },
|
|
12
|
+
// { text: '9', value: '9' },
|
|
13
|
+
// { text: '10', value: '10' },
|
|
14
|
+
]
|
|
@@ -1,57 +1,53 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model:number-displays="numberDisplays"
|
|
5
|
-
:disabled="props.disabled"
|
|
6
|
-
:error-text="apiError"
|
|
7
|
-
:number-displays-options="numberDisplaysOptions"
|
|
8
|
-
@remove-error="onRemoveValidationError"
|
|
9
|
-
|
|
10
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-old
|
|
11
|
-
v-else
|
|
12
|
-
v-model:number-displays="numberDisplays"
|
|
13
|
-
:disabled="props.disabled"
|
|
14
|
-
:error-text="apiError"
|
|
15
|
-
:number-displays-options="numberDisplaysOptions"
|
|
16
|
-
@remove-error="onRemoveValidationError"
|
|
17
|
-
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script setup lang="ts">
|
|
21
|
-
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
22
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
disabled: boolean
|
|
29
|
-
errorValidationFields: UI_I_ErrorValidationField[]
|
|
30
|
-
}>()
|
|
31
|
-
|
|
32
|
-
const emits = defineEmits<{
|
|
33
|
-
(event: 'remove-error-by-title', value: string): void
|
|
34
|
-
}>()
|
|
35
|
-
|
|
36
|
-
const { $store }: any = useNuxtApp()
|
|
37
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
|
|
57
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model:number-displays="numberDisplays"
|
|
5
|
+
:disabled="props.disabled"
|
|
6
|
+
:error-text="apiError"
|
|
7
|
+
:number-displays-options="props.numberDisplaysOptions"
|
|
8
|
+
@remove-error="onRemoveValidationError"
|
|
9
|
+
/>
|
|
10
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-video-card-number-displays-old
|
|
11
|
+
v-else
|
|
12
|
+
v-model:number-displays="numberDisplays"
|
|
13
|
+
:disabled="props.disabled"
|
|
14
|
+
:error-text="apiError"
|
|
15
|
+
:number-displays-options="props.numberDisplaysOptions"
|
|
16
|
+
@remove-error="onRemoveValidationError"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
22
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
23
|
+
|
|
24
|
+
const numberDisplays = defineModel<string>('numberDisplays', { required: true })
|
|
25
|
+
|
|
26
|
+
const props = defineProps<{
|
|
27
|
+
numberDisplaysOptions: UI_I_OptionItem[]
|
|
28
|
+
disabled: boolean
|
|
29
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
30
|
+
}>()
|
|
31
|
+
|
|
32
|
+
const emits = defineEmits<{
|
|
33
|
+
(event: 'remove-error-by-title', value: string): void
|
|
34
|
+
}>()
|
|
35
|
+
|
|
36
|
+
const { $store }: any = useNuxtApp()
|
|
37
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
38
|
+
|
|
39
|
+
const typeError = 'video_card.displays'
|
|
40
|
+
|
|
41
|
+
const apiError = computed<string>(() => {
|
|
42
|
+
return (
|
|
43
|
+
props.errorValidationFields?.find((message) => message.field === typeError)
|
|
44
|
+
?.error_message || ''
|
|
45
|
+
)
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const onRemoveValidationError = (): void => {
|
|
49
|
+
emits('remove-error-by-title', typeError)
|
|
50
|
+
}
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style scoped></style>
|
package/package.json
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
2
|
-
|
|
3
|
-
export const numberDisplaysOptionsConfig: UI_I_OptionItem[] = [
|
|
4
|
-
{ text: '1', value: '1' },
|
|
5
|
-
{ text: '2', value: '2' },
|
|
6
|
-
{ text: '3', value: '3' },
|
|
7
|
-
{ text: '4', value: '4' },
|
|
8
|
-
// { text: '5', value: '5' },
|
|
9
|
-
// { text: '6', value: '6' },
|
|
10
|
-
// { text: '7', value: '7' },
|
|
11
|
-
// { text: '8', value: '8' },
|
|
12
|
-
// { text: '9', value: '9' },
|
|
13
|
-
// { text: '10', value: '10' },
|
|
14
|
-
]
|