bfg-common 1.2.74 → 1.2.75
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,178 +1,181 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="vm-options">
|
|
3
|
-
<div class="clr-component">
|
|
4
|
-
<div class="stack-view">
|
|
5
|
-
<common-vm-actions-common-customize-hardware-vmoptions-general-options
|
|
6
|
-
v-model:vm-name="vmNameLocal"
|
|
7
|
-
v-model:guest-machine-type="guestMachineTypeLocal"
|
|
8
|
-
v-model:guest-os-family="guestOsFamilyLocal"
|
|
9
|
-
v-model:guest-os-version="guestOsVersionLocal"
|
|
10
|
-
:is-edit="props.isEdit"
|
|
11
|
-
:is-clone="props.isClone"
|
|
12
|
-
:state="props.state"
|
|
13
|
-
/>
|
|
14
|
-
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
|
|
15
|
-
:error-validation-fields="props.errorValidationFields"
|
|
16
|
-
:remote-console-options="props.options?.remote_console"
|
|
17
|
-
:is-edit="props.isEdit"
|
|
18
|
-
:state="props.state"
|
|
19
|
-
@send-data="sendDataRemoteConsoleOptionsMethod"
|
|
20
|
-
@invalid="remoteConsoleOptionsInvalid = $event"
|
|
21
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
22
|
-
/>
|
|
23
|
-
<common-vm-actions-common-customize-hardware-vmoptions-tools
|
|
24
|
-
:tools="props.options?.guest_tools?.enabled"
|
|
25
|
-
@send-data="sendDataToolsMethod"
|
|
26
|
-
/>
|
|
27
|
-
<common-vm-actions-common-customize-hardware-vmoptions-boot-options
|
|
28
|
-
:error-validation-fields="props.errorValidationFields"
|
|
29
|
-
:hard-disks="props.hardDisks"
|
|
30
|
-
:cd-dvd-drives="props.cdDvdDrives"
|
|
31
|
-
:networks="props.networks"
|
|
32
|
-
:boot-options="props.options?.boot_options"
|
|
33
|
-
:is-edit="props.isEdit"
|
|
34
|
-
@change-boot-order="changeBootOrder"
|
|
35
|
-
@send-data="sendDataBootOptionsMethod"
|
|
36
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
37
|
-
/>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script setup lang="ts">
|
|
44
|
-
import {
|
|
45
|
-
UI_I_SendDataRemoteConsoleOptions,
|
|
46
|
-
UI_I_SendDataTools,
|
|
47
|
-
UI_I_SendDataBootOptions,
|
|
48
|
-
UI_I_SendDataVmoptions,
|
|
49
|
-
} from '~/components/common/vm/actions/common/customizeHardware/vmoptions/models/interfaces'
|
|
50
|
-
import {
|
|
51
|
-
UI_I_SendDataNewCdDvdDrive,
|
|
52
|
-
UI_I_SendDataNewHardDisk,
|
|
53
|
-
UI_I_SendDataNewNetwork,
|
|
54
|
-
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/models/interfaces'
|
|
55
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
56
|
-
import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
|
|
57
|
-
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
58
|
-
import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/models/types'
|
|
59
|
-
|
|
60
|
-
const props = defineProps<{
|
|
61
|
-
vmName: string
|
|
62
|
-
guestMachineType: UI_I_OptionItem | null
|
|
63
|
-
guestOsFamily: UI_I_OptionItem | null
|
|
64
|
-
guestOsVersion: UI_I_OptionItem | null
|
|
65
|
-
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
66
|
-
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
67
|
-
networks: UI_I_SendDataNewNetwork[] | null
|
|
68
|
-
isEdit: boolean
|
|
69
|
-
isClone: boolean
|
|
70
|
-
errorValidationFields: UI_I_ErrorValidationField[]
|
|
71
|
-
options?: UI_I_SendDataVmoptions
|
|
72
|
-
state?: string | number
|
|
73
|
-
}>()
|
|
74
|
-
const emits = defineEmits<{
|
|
75
|
-
(
|
|
76
|
-
event: 'change-boot-order',
|
|
77
|
-
value: [
|
|
78
|
-
UI_I_SendDataNewHardDisk[],
|
|
79
|
-
UI_I_SendDataNewCdDvdDrive[],
|
|
80
|
-
UI_I_SendDataNewNetwork[]
|
|
81
|
-
]
|
|
82
|
-
): void
|
|
83
|
-
(event: 'send-data', value: UI_I_SendDataVmoptions): void
|
|
84
|
-
(event: 'invalid', value: string[]): void
|
|
85
|
-
(event: 'update:vm-name', value: string): void
|
|
86
|
-
(event: 'update:guest-machine-type', value: UI_I_OptionItem | null): void
|
|
87
|
-
(event: 'update:guest-os-family', value: UI_I_OptionItem | null): void
|
|
88
|
-
(event: 'update:guest-os-version', value: UI_I_OptionItem | null): void
|
|
89
|
-
(event: 'remove-error-by-title', value: string): void
|
|
90
|
-
}>()
|
|
91
|
-
|
|
92
|
-
const vmNameLocal = computed<string>({
|
|
93
|
-
get() {
|
|
94
|
-
return props.vmName
|
|
95
|
-
},
|
|
96
|
-
set(newValue) {
|
|
97
|
-
emits('update:vm-name', newValue)
|
|
98
|
-
},
|
|
99
|
-
})
|
|
100
|
-
const guestMachineTypeLocal = computed<UI_I_OptionItem | null>({
|
|
101
|
-
get() {
|
|
102
|
-
return props.guestMachineType
|
|
103
|
-
},
|
|
104
|
-
set(newValue) {
|
|
105
|
-
emits('update:guest-machine-type', newValue)
|
|
106
|
-
},
|
|
107
|
-
})
|
|
108
|
-
const guestOsFamilyLocal = computed<UI_I_OptionItem | null>({
|
|
109
|
-
get() {
|
|
110
|
-
return props.guestOsFamily
|
|
111
|
-
},
|
|
112
|
-
set(newValue) {
|
|
113
|
-
emits('update:guest-os-family', newValue)
|
|
114
|
-
},
|
|
115
|
-
})
|
|
116
|
-
const guestOsVersionLocal = computed<UI_I_OptionItem | null>({
|
|
117
|
-
get() {
|
|
118
|
-
return props.guestOsVersion
|
|
119
|
-
},
|
|
120
|
-
set(newValue) {
|
|
121
|
-
emits('update:guest-os-version', newValue)
|
|
122
|
-
},
|
|
123
|
-
})
|
|
124
|
-
|
|
125
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
126
|
-
|
|
127
|
-
const sendDataRemoteConsoleOptions =
|
|
128
|
-
ref<UI_I_SendDataRemoteConsoleOptions | null>(null)
|
|
129
|
-
const sendDataRemoteConsoleOptionsMethod = (
|
|
130
|
-
data: UI_I_SendDataRemoteConsoleOptions
|
|
131
|
-
): void => {
|
|
132
|
-
sendDataRemoteConsoleOptions.value = data
|
|
133
|
-
sendData()
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
const sendDataTools = ref<UI_I_SendDataTools | null>(null)
|
|
137
|
-
const sendDataToolsMethod = (data: UI_I_SendDataTools): void => {
|
|
138
|
-
sendDataTools.value = data
|
|
139
|
-
sendData()
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
const sendDataBootOptions = ref<UI_I_SendDataBootOptions | null>(null)
|
|
143
|
-
const sendDataBootOptionsMethod = (data: UI_I_SendDataBootOptions): void => {
|
|
144
|
-
sendDataBootOptions.value = data
|
|
145
|
-
sendData()
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const changeBootOrder = (data: UI_T_ChangeBootOrder): void => {
|
|
149
|
-
emits('change-boot-order', data)
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
const sendData = (): void => {
|
|
153
|
-
emits('send-data', {
|
|
154
|
-
remote_console: sendDataRemoteConsoleOptions.value,
|
|
155
|
-
guest_tools: sendDataTools.value,
|
|
156
|
-
boot_options: sendDataBootOptions.value,
|
|
157
|
-
})
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const remoteConsoleOptionsInvalid = ref<boolean>(false)
|
|
161
|
-
|
|
162
|
-
watch(
|
|
163
|
-
remoteConsoleOptionsInvalid,
|
|
164
|
-
(newValue) => {
|
|
165
|
-
const remoteConsoleOptions = newValue
|
|
166
|
-
? localization.value.remoteConsoleOptions
|
|
167
|
-
: ''
|
|
168
|
-
emits('invalid', [remoteConsoleOptions])
|
|
169
|
-
},
|
|
170
|
-
{ immediate: true }
|
|
171
|
-
)
|
|
172
|
-
</script>
|
|
173
|
-
|
|
174
|
-
<style scoped lang="scss">
|
|
175
|
-
.clr-component {
|
|
176
|
-
padding-top: 36px;
|
|
177
|
-
}
|
|
178
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vm-options">
|
|
3
|
+
<div class="clr-component">
|
|
4
|
+
<div class="stack-view">
|
|
5
|
+
<common-vm-actions-common-customize-hardware-vmoptions-general-options
|
|
6
|
+
v-model:vm-name="vmNameLocal"
|
|
7
|
+
v-model:guest-machine-type="guestMachineTypeLocal"
|
|
8
|
+
v-model:guest-os-family="guestOsFamilyLocal"
|
|
9
|
+
v-model:guest-os-version="guestOsVersionLocal"
|
|
10
|
+
:is-edit="props.isEdit"
|
|
11
|
+
:is-clone="props.isClone"
|
|
12
|
+
:state="props.state"
|
|
13
|
+
/>
|
|
14
|
+
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options
|
|
15
|
+
:error-validation-fields="props.errorValidationFields"
|
|
16
|
+
:remote-console-options="props.options?.remote_console"
|
|
17
|
+
:is-edit="props.isEdit"
|
|
18
|
+
:state="props.state"
|
|
19
|
+
@send-data="sendDataRemoteConsoleOptionsMethod"
|
|
20
|
+
@invalid="remoteConsoleOptionsInvalid = $event"
|
|
21
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
22
|
+
/>
|
|
23
|
+
<common-vm-actions-common-customize-hardware-vmoptions-tools
|
|
24
|
+
:tools="props.options?.guest_tools?.enabled"
|
|
25
|
+
@send-data="sendDataToolsMethod"
|
|
26
|
+
/>
|
|
27
|
+
<common-vm-actions-common-customize-hardware-vmoptions-boot-options
|
|
28
|
+
:error-validation-fields="props.errorValidationFields"
|
|
29
|
+
:hard-disks="props.hardDisks"
|
|
30
|
+
:cd-dvd-drives="props.cdDvdDrives"
|
|
31
|
+
:networks="props.networks"
|
|
32
|
+
:boot-options="props.options?.boot_options"
|
|
33
|
+
:is-edit="props.isEdit"
|
|
34
|
+
@change-boot-order="changeBootOrder"
|
|
35
|
+
@send-data="sendDataBootOptionsMethod"
|
|
36
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
37
|
+
/>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup lang="ts">
|
|
44
|
+
import {
|
|
45
|
+
UI_I_SendDataRemoteConsoleOptions,
|
|
46
|
+
UI_I_SendDataTools,
|
|
47
|
+
UI_I_SendDataBootOptions,
|
|
48
|
+
UI_I_SendDataVmoptions,
|
|
49
|
+
} from '~/components/common/vm/actions/common/customizeHardware/vmoptions/models/interfaces'
|
|
50
|
+
import {
|
|
51
|
+
UI_I_SendDataNewCdDvdDrive,
|
|
52
|
+
UI_I_SendDataNewHardDisk,
|
|
53
|
+
UI_I_SendDataNewNetwork,
|
|
54
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/models/interfaces'
|
|
55
|
+
import { UI_I_Localization } from '~/models/interfaces'
|
|
56
|
+
import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
|
|
57
|
+
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
58
|
+
import { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/models/types'
|
|
59
|
+
|
|
60
|
+
const props = defineProps<{
|
|
61
|
+
vmName: string
|
|
62
|
+
guestMachineType: UI_I_OptionItem | null
|
|
63
|
+
guestOsFamily: UI_I_OptionItem | null
|
|
64
|
+
guestOsVersion: UI_I_OptionItem | null
|
|
65
|
+
hardDisks: UI_I_SendDataNewHardDisk[] | null
|
|
66
|
+
cdDvdDrives: UI_I_SendDataNewCdDvdDrive[] | null
|
|
67
|
+
networks: UI_I_SendDataNewNetwork[] | null
|
|
68
|
+
isEdit: boolean
|
|
69
|
+
isClone: boolean
|
|
70
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
71
|
+
options?: UI_I_SendDataVmoptions
|
|
72
|
+
state?: string | number
|
|
73
|
+
}>()
|
|
74
|
+
const emits = defineEmits<{
|
|
75
|
+
(
|
|
76
|
+
event: 'change-boot-order',
|
|
77
|
+
value: [
|
|
78
|
+
UI_I_SendDataNewHardDisk[],
|
|
79
|
+
UI_I_SendDataNewCdDvdDrive[],
|
|
80
|
+
UI_I_SendDataNewNetwork[]
|
|
81
|
+
]
|
|
82
|
+
): void
|
|
83
|
+
(event: 'send-data', value: UI_I_SendDataVmoptions): void
|
|
84
|
+
(event: 'invalid', value: string[]): void
|
|
85
|
+
(event: 'update:vm-name', value: string): void
|
|
86
|
+
(event: 'update:guest-machine-type', value: UI_I_OptionItem | null): void
|
|
87
|
+
(event: 'update:guest-os-family', value: UI_I_OptionItem | null): void
|
|
88
|
+
(event: 'update:guest-os-version', value: UI_I_OptionItem | null): void
|
|
89
|
+
(event: 'remove-error-by-title', value: string): void
|
|
90
|
+
}>()
|
|
91
|
+
|
|
92
|
+
const vmNameLocal = computed<string>({
|
|
93
|
+
get() {
|
|
94
|
+
return props.vmName
|
|
95
|
+
},
|
|
96
|
+
set(newValue) {
|
|
97
|
+
emits('update:vm-name', newValue)
|
|
98
|
+
},
|
|
99
|
+
})
|
|
100
|
+
const guestMachineTypeLocal = computed<UI_I_OptionItem | null>({
|
|
101
|
+
get() {
|
|
102
|
+
return props.guestMachineType
|
|
103
|
+
},
|
|
104
|
+
set(newValue) {
|
|
105
|
+
emits('update:guest-machine-type', newValue)
|
|
106
|
+
},
|
|
107
|
+
})
|
|
108
|
+
const guestOsFamilyLocal = computed<UI_I_OptionItem | null>({
|
|
109
|
+
get() {
|
|
110
|
+
return props.guestOsFamily
|
|
111
|
+
},
|
|
112
|
+
set(newValue) {
|
|
113
|
+
emits('update:guest-os-family', newValue)
|
|
114
|
+
},
|
|
115
|
+
})
|
|
116
|
+
const guestOsVersionLocal = computed<UI_I_OptionItem | null>({
|
|
117
|
+
get() {
|
|
118
|
+
return props.guestOsVersion
|
|
119
|
+
},
|
|
120
|
+
set(newValue) {
|
|
121
|
+
emits('update:guest-os-version', newValue)
|
|
122
|
+
},
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
126
|
+
|
|
127
|
+
const sendDataRemoteConsoleOptions =
|
|
128
|
+
ref<UI_I_SendDataRemoteConsoleOptions | null>(null)
|
|
129
|
+
const sendDataRemoteConsoleOptionsMethod = (
|
|
130
|
+
data: UI_I_SendDataRemoteConsoleOptions
|
|
131
|
+
): void => {
|
|
132
|
+
sendDataRemoteConsoleOptions.value = data
|
|
133
|
+
sendData()
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const sendDataTools = ref<UI_I_SendDataTools | null>(null)
|
|
137
|
+
const sendDataToolsMethod = (data: UI_I_SendDataTools): void => {
|
|
138
|
+
sendDataTools.value = data
|
|
139
|
+
sendData()
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const sendDataBootOptions = ref<UI_I_SendDataBootOptions | null>(null)
|
|
143
|
+
const sendDataBootOptionsMethod = (data: UI_I_SendDataBootOptions): void => {
|
|
144
|
+
sendDataBootOptions.value = data
|
|
145
|
+
sendData()
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const changeBootOrder = (data: UI_T_ChangeBootOrder): void => {
|
|
149
|
+
emits('change-boot-order', data)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const sendData = (): void => {
|
|
153
|
+
emits('send-data', {
|
|
154
|
+
remote_console: sendDataRemoteConsoleOptions.value,
|
|
155
|
+
guest_tools: sendDataTools.value,
|
|
156
|
+
boot_options: sendDataBootOptions.value,
|
|
157
|
+
})
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const remoteConsoleOptionsInvalid = ref<boolean>(false)
|
|
161
|
+
|
|
162
|
+
watch(
|
|
163
|
+
remoteConsoleOptionsInvalid,
|
|
164
|
+
(newValue) => {
|
|
165
|
+
const remoteConsoleOptions = newValue
|
|
166
|
+
? localization.value.remoteConsoleOptions
|
|
167
|
+
: ''
|
|
168
|
+
emits('invalid', [remoteConsoleOptions])
|
|
169
|
+
},
|
|
170
|
+
{ immediate: true }
|
|
171
|
+
)
|
|
172
|
+
</script>
|
|
173
|
+
|
|
174
|
+
<style scoped lang="scss">
|
|
175
|
+
.clr-component {
|
|
176
|
+
padding-top: 36px;
|
|
177
|
+
}
|
|
178
|
+
.stack-view {
|
|
179
|
+
background-color: var(--block-view-bg-color);
|
|
180
|
+
}
|
|
181
|
+
</style>
|