bfg-common 1.4.549 → 1.4.550
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.
|
@@ -1,189 +1,176 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="edit-vm">
|
|
3
|
-
<ui-modal
|
|
4
|
-
show
|
|
5
|
-
test-id="edit-vm-wizard"
|
|
6
|
-
size="sm"
|
|
7
|
-
width="720px"
|
|
8
|
-
:title="localization.common.editSettings"
|
|
9
|
-
:subtitle="props.vmNameOld"
|
|
10
|
-
:texts="modalTextsLocal"
|
|
11
|
-
:is-disabled-accept="props.loading"
|
|
12
|
-
@submit="emits('validate')"
|
|
13
|
-
@hide="emits('hide')"
|
|
14
|
-
>
|
|
15
|
-
<template #content>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
v-model:
|
|
25
|
-
v-model:guest-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
:
|
|
29
|
-
:
|
|
30
|
-
:
|
|
31
|
-
:cd-dvd-drives
|
|
32
|
-
:
|
|
33
|
-
:
|
|
34
|
-
:
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
:
|
|
38
|
-
:
|
|
39
|
-
:
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
:
|
|
45
|
-
:
|
|
46
|
-
:
|
|
47
|
-
:
|
|
48
|
-
:
|
|
49
|
-
:
|
|
50
|
-
:
|
|
51
|
-
:
|
|
52
|
-
:
|
|
53
|
-
:
|
|
54
|
-
:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
@
|
|
60
|
-
@get-
|
|
61
|
-
@get-
|
|
62
|
-
@
|
|
63
|
-
@
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
import type {
|
|
78
|
-
import type {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
} from '~/
|
|
92
|
-
import type {
|
|
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
|
-
(event: '
|
|
129
|
-
(event: '
|
|
130
|
-
(event: '
|
|
131
|
-
(event: 'get-
|
|
132
|
-
(event: 'get-
|
|
133
|
-
(event: '
|
|
134
|
-
(event: 'get-
|
|
135
|
-
(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
:
|
|
155
|
-
--vm-wizard-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
font-weight: 500;
|
|
178
|
-
line-height: 16.94px;
|
|
179
|
-
color: var(--vm-wizard-sub-title);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
//.edit-vm-settings-spinner {
|
|
183
|
-
// width: 50px;
|
|
184
|
-
// position: absolute;
|
|
185
|
-
// z-index: 1;
|
|
186
|
-
// top: calc(50% - 25px);
|
|
187
|
-
// left: calc(50% - 25px);
|
|
188
|
-
//}
|
|
189
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="edit-vm">
|
|
3
|
+
<ui-modal
|
|
4
|
+
show
|
|
5
|
+
test-id="edit-vm-wizard"
|
|
6
|
+
size="sm"
|
|
7
|
+
width="720px"
|
|
8
|
+
:title="localization.common.editSettings"
|
|
9
|
+
:subtitle="props.vmNameOld"
|
|
10
|
+
:texts="modalTextsLocal"
|
|
11
|
+
:is-disabled-accept="props.loading"
|
|
12
|
+
@submit="emits('validate')"
|
|
13
|
+
@hide="emits('hide')"
|
|
14
|
+
>
|
|
15
|
+
<template #content>
|
|
16
|
+
<common-vm-actions-edit-settings-new-skeleton
|
|
17
|
+
v-if="!vmSettings || props.loading"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<div v-else class="vm-context">
|
|
21
|
+
<common-vm-actions-common-customize-hardware
|
|
22
|
+
v-model:vm-name="vmName"
|
|
23
|
+
v-model:guest-machine-type="vmSettings.guestMachineType"
|
|
24
|
+
v-model:guest-os-family="vmSettings.guestOsFamily"
|
|
25
|
+
v-model:guest-os-version="vmSettings.guestOsVersion"
|
|
26
|
+
:project="props.project"
|
|
27
|
+
:storage="vmSettings.storage"
|
|
28
|
+
:hard-disks-for-boot-options="props.virtualHardwareHardDisks"
|
|
29
|
+
:cd-dvd-drives-for-boot-options="props.virtualHardwareCdDvdDrives"
|
|
30
|
+
:networks-for-boot-options="props.virtualHardwareNetworks"
|
|
31
|
+
:cd-dvd-drives="vmSettings.cdDvdDrives"
|
|
32
|
+
:hard-disks="vmSettings.hardDisks"
|
|
33
|
+
:networks="vmSettings.networks"
|
|
34
|
+
:customize-hardware-submit="0"
|
|
35
|
+
:max-cpus="vmSettings.maxCpus"
|
|
36
|
+
:max-memory="vmSettings.maxMemory"
|
|
37
|
+
:cpu-models="vmSettings.cpuModels"
|
|
38
|
+
:cpu="vmSettings.cpu"
|
|
39
|
+
:memory="vmSettings.memory"
|
|
40
|
+
:video-card="vmSettings.videoCard"
|
|
41
|
+
:usb-controller="vmSettings.usbController"
|
|
42
|
+
:pci-devices="vmSettings.pciDevices"
|
|
43
|
+
:selected-nav-item="props.selectedNavItem"
|
|
44
|
+
:hard-disks-for-edit="vmSettings.hardDisks"
|
|
45
|
+
:options="vmSettings.options"
|
|
46
|
+
:nodes="props.nodes"
|
|
47
|
+
:files="props.files"
|
|
48
|
+
:networks-table="props.networksTable"
|
|
49
|
+
:error-validation-fields="props.errorValidationFields"
|
|
50
|
+
:vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
|
|
51
|
+
:passthrough-devices="props.passthroughDevices"
|
|
52
|
+
:state="props.state"
|
|
53
|
+
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
54
|
+
:datastore="props.datastore"
|
|
55
|
+
is-edit
|
|
56
|
+
@get-storage="emits('get-storage', $event)"
|
|
57
|
+
@get-folders-or-files="emits('get-folders-or-files', $event)"
|
|
58
|
+
@get-active-device-child="emits('get-active-device-child', $event)"
|
|
59
|
+
@show-datastore-child="emits('show-datastore-child', $event)"
|
|
60
|
+
@get-networks-table="emits('get-networks-table', $event)"
|
|
61
|
+
@get-pci-devices="emits('get-pci-devices')"
|
|
62
|
+
@change-boot-order="emits('change-boot-order', $event)"
|
|
63
|
+
@send-data="emits('change-customize-hardware', $event)"
|
|
64
|
+
/>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<template #footerLeftContent><span></span></template>
|
|
69
|
+
</ui-modal>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup lang="ts">
|
|
74
|
+
import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
|
|
75
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
76
|
+
import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
|
|
77
|
+
import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
|
|
78
|
+
import type {
|
|
79
|
+
UI_I_PciDevice,
|
|
80
|
+
UI_I_VmSettings,
|
|
81
|
+
} from '~/lib/models/store/vm/interfaces'
|
|
82
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
83
|
+
import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
|
|
84
|
+
import type {
|
|
85
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
86
|
+
UI_I_SendDataNewHardDisk,
|
|
87
|
+
UI_I_SendDataNewNetwork,
|
|
88
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
89
|
+
import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
|
|
90
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
91
|
+
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
92
|
+
import type {
|
|
93
|
+
UI_I_DatastoreTableItem,
|
|
94
|
+
UI_I_FolderOrFileTreePayload,
|
|
95
|
+
} from '~/lib/models/store/storage/interfaces'
|
|
96
|
+
import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
|
|
97
|
+
import { modalTexts } from '~/components/common/vm/actions/editSettings/lib/config/modal'
|
|
98
|
+
|
|
99
|
+
const vmName = defineModel<string>('vmName', { required: true })
|
|
100
|
+
|
|
101
|
+
const vmSettings = defineModel<UI_I_VmSettings | null>('vmSettings', {
|
|
102
|
+
required: true,
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
const props = defineProps<{
|
|
106
|
+
nodes: UI_I_FileTreeNode[]
|
|
107
|
+
files: UI_I_FileTreeNode[]
|
|
108
|
+
project: UI_T_Project
|
|
109
|
+
loading: boolean
|
|
110
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
111
|
+
networksTable: UI_I_NetworkTableItem[]
|
|
112
|
+
selectedNavItem: UI_T_SelectedNavItem
|
|
113
|
+
vmCpuHelpTextSecond: string
|
|
114
|
+
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
115
|
+
virtualHardwareNetworks: UI_I_SendDataNewNetwork[] | null
|
|
116
|
+
virtualHardwareHardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
117
|
+
virtualHardwareCdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
118
|
+
state?: string | number
|
|
119
|
+
vmNameOld?: string
|
|
120
|
+
passthroughDevices?: UI_I_PciDevice[]
|
|
121
|
+
getDatastoreTableFunc?: (payload: UI_I_TablePayload) => Promise<void>
|
|
122
|
+
}>()
|
|
123
|
+
|
|
124
|
+
const emits = defineEmits<{
|
|
125
|
+
(event: 'hide'): void
|
|
126
|
+
(event: 'validate'): void
|
|
127
|
+
(event: 'update-vm'): void
|
|
128
|
+
(event: 'get-storage', value: UI_I_TablePayload): void
|
|
129
|
+
(event: 'get-pci-devices'): void
|
|
130
|
+
(event: 'change-boot-order', value: UI_T_ChangeBootOrder): void
|
|
131
|
+
(event: 'get-networks-table', value: UI_I_TablePayload): void
|
|
132
|
+
(event: 'get-folders-or-files', value: UI_I_FolderOrFileTreePayload): void
|
|
133
|
+
(event: 'show-datastore-child', value: UI_I_FileTreeNode): void
|
|
134
|
+
(event: 'get-active-device-child', value: UI_I_FileTreeNode): void
|
|
135
|
+
(
|
|
136
|
+
event: 'change-customize-hardware',
|
|
137
|
+
value: UI_I_SendDataCustomizeHardware
|
|
138
|
+
): void
|
|
139
|
+
}>()
|
|
140
|
+
|
|
141
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
142
|
+
|
|
143
|
+
const modalTextsLocal = computed<UI_I_ModalTexts>(() =>
|
|
144
|
+
modalTexts(localization.value)
|
|
145
|
+
)
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<style>
|
|
149
|
+
:root {
|
|
150
|
+
--vm-wizard-sub-title: #4d5d69;
|
|
151
|
+
--vm-wizard-title-circle: #9da6ad;
|
|
152
|
+
}
|
|
153
|
+
:root.dark-theme {
|
|
154
|
+
--vm-wizard-sub-title: #9da6ad;
|
|
155
|
+
--vm-wizard-title-circle: #4d5d69;
|
|
156
|
+
}
|
|
157
|
+
</style>
|
|
158
|
+
<style scoped lang="scss">
|
|
159
|
+
:deep(.modal-header h3) {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
gap: 12px;
|
|
163
|
+
}
|
|
164
|
+
.circle {
|
|
165
|
+
width: 4px;
|
|
166
|
+
height: 4px;
|
|
167
|
+
background-color: var(--vm-wizard-title-circle);
|
|
168
|
+
border-radius: 50px;
|
|
169
|
+
}
|
|
170
|
+
.sub-title {
|
|
171
|
+
font-size: 14px;
|
|
172
|
+
font-weight: 500;
|
|
173
|
+
line-height: 16.94px;
|
|
174
|
+
color: var(--vm-wizard-sub-title);
|
|
175
|
+
}
|
|
176
|
+
</style>
|
package/package.json
CHANGED
|
File without changes
|