bfg-common 1.4.819 → 1.4.821
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/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +694 -693
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types.ts +5 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +8 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +229 -230
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +247 -242
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +4 -2
- package/package.json +1 -1
package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// clone почти тоже самое что и new
|
|
2
|
+
export type UI_T_HardDiskType = 'new' | 'edit' | 'clone' | 'exist' | 'removed'
|
|
3
|
+
// clone почти тоже самое что и new
|
|
4
|
+
export type UI_T_NetworkType = 'new' | 'edit' | 'clone'
|
|
5
|
+
|
|
2
6
|
export type UI_T_PciDeviceType = 'new' | 'edit'
|
|
3
|
-
export type UI_T_NetworkType = 'new' | 'edit'
|
|
4
7
|
export type UI_T_CdDvdType = 'new' | 'edit' | 'removed'
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
:type="props.type"
|
|
32
32
|
:hard-disk="props.hardDisk"
|
|
33
33
|
:guest-machine-type="props.guestMachineType"
|
|
34
|
+
:is-new-type="isNewType"
|
|
34
35
|
@remove="emits('remove')"
|
|
35
36
|
@roll-back="emits('roll-back')"
|
|
36
37
|
@validate-size="onValidateSize"
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
:type="props.type"
|
|
70
71
|
:hard-disk="props.hardDisk"
|
|
71
72
|
:guest-machine-type="props.guestMachineType"
|
|
73
|
+
:is-new-type="isNewType"
|
|
72
74
|
@remove="emits('remove')"
|
|
73
75
|
@roll-back="emits('roll-back')"
|
|
74
76
|
@validate-size="onValidateSize"
|
|
@@ -127,6 +129,10 @@ const isRemovable = computed<boolean>(() => {
|
|
|
127
129
|
)
|
|
128
130
|
})
|
|
129
131
|
|
|
132
|
+
const isNewType = computed<boolean>(
|
|
133
|
+
() => props.type === 'new' || props.type === 'clone'
|
|
134
|
+
)
|
|
135
|
+
|
|
130
136
|
const typeError = computed<string>(() => `disk_devices[${props.index}].size`)
|
|
131
137
|
|
|
132
138
|
const apiErrorLocal = computed<string>(() => {
|
|
@@ -314,7 +320,8 @@ watch(
|
|
|
314
320
|
diskProvisioning.value = newValue.provision_type || 'thick'
|
|
315
321
|
return
|
|
316
322
|
}
|
|
317
|
-
if (props.type !== 'edit') return
|
|
323
|
+
// if (props.type !== 'edit') return
|
|
324
|
+
if (props.type !== 'edit' && props.type !== 'clone') return
|
|
318
325
|
|
|
319
326
|
diskProvisioning.value = newValue.provision_type || 'thick'
|
|
320
327
|
sharing.value = newValue.sharing ? 'yes' : ''
|
|
@@ -1,230 +1,229 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ui-stack-block
|
|
3
|
-
:has-children="true"
|
|
4
|
-
:is-roll-back="props.type === 'removed'"
|
|
5
|
-
:removable="props.isRemovable"
|
|
6
|
-
:test-id="`hard-disk-stack-block-${props.index}`"
|
|
7
|
-
@remove="emits('remove')"
|
|
8
|
-
@roll-back="emits('roll-back')"
|
|
9
|
-
>
|
|
10
|
-
<template #stackBlockKey>
|
|
11
|
-
<div
|
|
12
|
-
:id="`vm-wizard-toggle-block-hard-disk-${props.index}`"
|
|
13
|
-
:data-id="`vm-wizard-toggle-block-hard-disk-${props.index}`"
|
|
14
|
-
class="vm-wizard-toggle-block-hard-disk flex-align-center"
|
|
15
|
-
>
|
|
16
|
-
<span class="title">{{ props.label }}</span>
|
|
17
|
-
<ui-icon
|
|
18
|
-
v-show="props.hardDiskInvalid"
|
|
19
|
-
width="18px"
|
|
20
|
-
height="18px"
|
|
21
|
-
name="error-outline"
|
|
22
|
-
/>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
25
|
-
<template #stackBlockContent>
|
|
26
|
-
<!-- <div class="flex-align-center flex-space-between mr-1">-->
|
|
27
|
-
<div class="new-hard-disk-content flex-align-center">
|
|
28
|
-
<template v-if="props.type === 'removed'">
|
|
29
|
-
<span>{{ localization.common.deviceWillRemoved }}</span>
|
|
30
|
-
<div class="flex-align-center" @click.stop>
|
|
31
|
-
<ui-checkbox
|
|
32
|
-
v-model="deleteFilesFromDatastore"
|
|
33
|
-
:test-id="`hard-disk-delete-files-from-datastore-${props.index}`"
|
|
34
|
-
:disabled="props.disabled"
|
|
35
|
-
:label-text="localization.common.deleteFilesFromDatastore"
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
39
|
-
<template v-else>
|
|
40
|
-
<ui-input-with-tooltip
|
|
41
|
-
:id="`vm-wizard-hard-disk-${props.index}`"
|
|
42
|
-
v-model.number="size"
|
|
43
|
-
:test-id="`vm-wizard-hard-disk-${props.index}`"
|
|
44
|
-
:disabled="props.isDisabledSize"
|
|
45
|
-
:class="[
|
|
46
|
-
'spinfree edit-setting-input input-text-color',
|
|
47
|
-
{ 'has-error': props.hardDiskTypeErrorLocalText },
|
|
48
|
-
]"
|
|
49
|
-
:error-text="props.errorText"
|
|
50
|
-
input-style="rounded"
|
|
51
|
-
type="number"
|
|
52
|
-
size="md"
|
|
53
|
-
@blur="emits('validate-size')"
|
|
54
|
-
@click.stop
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
<ui-select
|
|
58
|
-
:id="`hard-disk-type-select-${props.index}`"
|
|
59
|
-
v-model="hardDiskType"
|
|
60
|
-
width="auto"
|
|
61
|
-
:items="props.hardDiskTypeOptions"
|
|
62
|
-
:disabled="props.type === 'exist'"
|
|
63
|
-
:test-id="`hard-disk-type-select-${props.index}`"
|
|
64
|
-
class="unit"
|
|
65
|
-
@change="emits('validate-size')"
|
|
66
|
-
@click.stop
|
|
67
|
-
/>
|
|
68
|
-
</template>
|
|
69
|
-
</div>
|
|
70
|
-
</template>
|
|
71
|
-
<template #stackChildren>
|
|
72
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-maximum-size
|
|
73
|
-
:free-mb="props.maxHardDisk"
|
|
74
|
-
/>
|
|
75
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-location
|
|
76
|
-
v-if="props.
|
|
77
|
-
:location="props.location"
|
|
78
|
-
:index="props.index"
|
|
79
|
-
:error-validation-fields="props.errorValidationFields"
|
|
80
|
-
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
81
|
-
:datastore="props.datastore"
|
|
82
|
-
@change="emits('change-storage', $event)"
|
|
83
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
84
|
-
/>
|
|
85
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-file
|
|
86
|
-
v-else
|
|
87
|
-
:path="props.hardDisk?.source"
|
|
88
|
-
/>
|
|
89
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-provisioning
|
|
90
|
-
v-model:disk-provisioning="diskProvisioning"
|
|
91
|
-
:index="props.index"
|
|
92
|
-
:error-validation-fields="props.errorValidationFields"
|
|
93
|
-
:disabled="(props.isEdit && props.
|
|
94
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
95
|
-
/>
|
|
96
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-sharing
|
|
97
|
-
v-model:sharing="sharing"
|
|
98
|
-
:index="props.index"
|
|
99
|
-
:error-validation-fields="props.errorValidationFields"
|
|
100
|
-
:disabled="props.isRunning && props.
|
|
101
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
102
|
-
/>
|
|
103
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-limit-iops
|
|
104
|
-
v-model:limit-iops="limitIops"
|
|
105
|
-
v-model:limit-iops-type="limitIopsType"
|
|
106
|
-
:index="props.index"
|
|
107
|
-
:error-validation-fields="props.errorValidationFields"
|
|
108
|
-
:disabled="props.isRunning && props.
|
|
109
|
-
@valid="limitIopsInvalid = $event"
|
|
110
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
111
|
-
/>
|
|
112
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-mode
|
|
113
|
-
v-model:disk-mode="diskMode"
|
|
114
|
-
:index="props.index"
|
|
115
|
-
:error-validation-fields="props.errorValidationFields"
|
|
116
|
-
:disabled="props.isRunning && props.
|
|
117
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
118
|
-
/>
|
|
119
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-cache
|
|
120
|
-
v-model:cache="cache"
|
|
121
|
-
:index="props.index"
|
|
122
|
-
:error-validation-fields="props.errorValidationFields"
|
|
123
|
-
:disabled="(props.isEdit && props.
|
|
124
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
125
|
-
/>
|
|
126
|
-
<common-vm-actions-common-customize-hardware-virtual-hardware-bus
|
|
127
|
-
v-model:bus="bus"
|
|
128
|
-
:index="props.index"
|
|
129
|
-
:error-validation-fields="props.errorValidationFields"
|
|
130
|
-
:disabled="!props.isNewHardDisk && props.isRunning"
|
|
131
|
-
:help-text="localization.common.busVirtioHelpDesc"
|
|
132
|
-
:test-id="`vm-wizard-disk-bus-field-${props.index}`"
|
|
133
|
-
component-type="disk_devices"
|
|
134
|
-
:guest-machine-type="props.guestMachineType"
|
|
135
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
136
|
-
/>
|
|
137
|
-
</template>
|
|
138
|
-
</ui-stack-block>
|
|
139
|
-
</template>
|
|
140
|
-
|
|
141
|
-
<script setup lang="ts">
|
|
142
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
143
|
-
import type {
|
|
144
|
-
|
|
145
|
-
} from '~/
|
|
146
|
-
import type {
|
|
147
|
-
import type {
|
|
148
|
-
import type {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
)
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
})
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
})
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
(event: '
|
|
195
|
-
(event: '
|
|
196
|
-
(event: '
|
|
197
|
-
(event: '
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
.
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
:
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<ui-stack-block
|
|
3
|
+
:has-children="true"
|
|
4
|
+
:is-roll-back="props.type === 'removed'"
|
|
5
|
+
:removable="props.isRemovable"
|
|
6
|
+
:test-id="`hard-disk-stack-block-${props.index}`"
|
|
7
|
+
@remove="emits('remove')"
|
|
8
|
+
@roll-back="emits('roll-back')"
|
|
9
|
+
>
|
|
10
|
+
<template #stackBlockKey>
|
|
11
|
+
<div
|
|
12
|
+
:id="`vm-wizard-toggle-block-hard-disk-${props.index}`"
|
|
13
|
+
:data-id="`vm-wizard-toggle-block-hard-disk-${props.index}`"
|
|
14
|
+
class="vm-wizard-toggle-block-hard-disk flex-align-center"
|
|
15
|
+
>
|
|
16
|
+
<span class="title">{{ props.label }}</span>
|
|
17
|
+
<ui-icon
|
|
18
|
+
v-show="props.hardDiskInvalid"
|
|
19
|
+
width="18px"
|
|
20
|
+
height="18px"
|
|
21
|
+
name="error-outline"
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
<template #stackBlockContent>
|
|
26
|
+
<!-- <div class="flex-align-center flex-space-between mr-1">-->
|
|
27
|
+
<div class="new-hard-disk-content flex-align-center">
|
|
28
|
+
<template v-if="props.type === 'removed'">
|
|
29
|
+
<span>{{ localization.common.deviceWillRemoved }}</span>
|
|
30
|
+
<div class="flex-align-center" @click.stop>
|
|
31
|
+
<ui-checkbox
|
|
32
|
+
v-model="deleteFilesFromDatastore"
|
|
33
|
+
:test-id="`hard-disk-delete-files-from-datastore-${props.index}`"
|
|
34
|
+
:disabled="props.disabled"
|
|
35
|
+
:label-text="localization.common.deleteFilesFromDatastore"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
<template v-else>
|
|
40
|
+
<ui-input-with-tooltip
|
|
41
|
+
:id="`vm-wizard-hard-disk-${props.index}`"
|
|
42
|
+
v-model.number="size"
|
|
43
|
+
:test-id="`vm-wizard-hard-disk-${props.index}`"
|
|
44
|
+
:disabled="props.isDisabledSize"
|
|
45
|
+
:class="[
|
|
46
|
+
'spinfree edit-setting-input input-text-color',
|
|
47
|
+
{ 'has-error': props.hardDiskTypeErrorLocalText },
|
|
48
|
+
]"
|
|
49
|
+
:error-text="props.errorText"
|
|
50
|
+
input-style="rounded"
|
|
51
|
+
type="number"
|
|
52
|
+
size="md"
|
|
53
|
+
@blur="emits('validate-size')"
|
|
54
|
+
@click.stop
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<ui-select
|
|
58
|
+
:id="`hard-disk-type-select-${props.index}`"
|
|
59
|
+
v-model="hardDiskType"
|
|
60
|
+
width="auto"
|
|
61
|
+
:items="props.hardDiskTypeOptions"
|
|
62
|
+
:disabled="props.type === 'exist'"
|
|
63
|
+
:test-id="`hard-disk-type-select-${props.index}`"
|
|
64
|
+
class="unit"
|
|
65
|
+
@change="emits('validate-size')"
|
|
66
|
+
@click.stop
|
|
67
|
+
/>
|
|
68
|
+
</template>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
71
|
+
<template #stackChildren>
|
|
72
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-maximum-size
|
|
73
|
+
:free-mb="props.maxHardDisk"
|
|
74
|
+
/>
|
|
75
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-location
|
|
76
|
+
v-if="props.isNewType"
|
|
77
|
+
:location="props.location"
|
|
78
|
+
:index="props.index"
|
|
79
|
+
:error-validation-fields="props.errorValidationFields"
|
|
80
|
+
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
81
|
+
:datastore="props.datastore"
|
|
82
|
+
@change="emits('change-storage', $event)"
|
|
83
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
84
|
+
/>
|
|
85
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-file
|
|
86
|
+
v-else
|
|
87
|
+
:path="props.hardDisk?.source"
|
|
88
|
+
/>
|
|
89
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-provisioning
|
|
90
|
+
v-model:disk-provisioning="diskProvisioning"
|
|
91
|
+
:index="props.index"
|
|
92
|
+
:error-validation-fields="props.errorValidationFields"
|
|
93
|
+
:disabled="(props.isEdit && !props.isNewType) || props.isRunning"
|
|
94
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
95
|
+
/>
|
|
96
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-sharing
|
|
97
|
+
v-model:sharing="sharing"
|
|
98
|
+
:index="props.index"
|
|
99
|
+
:error-validation-fields="props.errorValidationFields"
|
|
100
|
+
:disabled="props.isRunning && !props.isNewType"
|
|
101
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
102
|
+
/>
|
|
103
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-limit-iops
|
|
104
|
+
v-model:limit-iops="limitIops"
|
|
105
|
+
v-model:limit-iops-type="limitIopsType"
|
|
106
|
+
:index="props.index"
|
|
107
|
+
:error-validation-fields="props.errorValidationFields"
|
|
108
|
+
:disabled="props.isRunning && !props.isNewType"
|
|
109
|
+
@valid="limitIopsInvalid = $event"
|
|
110
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
111
|
+
/>
|
|
112
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-mode
|
|
113
|
+
v-model:disk-mode="diskMode"
|
|
114
|
+
:index="props.index"
|
|
115
|
+
:error-validation-fields="props.errorValidationFields"
|
|
116
|
+
:disabled="props.isRunning && !props.isNewType"
|
|
117
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
118
|
+
/>
|
|
119
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-cache
|
|
120
|
+
v-model:cache="cache"
|
|
121
|
+
:index="props.index"
|
|
122
|
+
:error-validation-fields="props.errorValidationFields"
|
|
123
|
+
:disabled="(props.isEdit && !props.isNewType) || props.isRunning"
|
|
124
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
125
|
+
/>
|
|
126
|
+
<common-vm-actions-common-customize-hardware-virtual-hardware-bus
|
|
127
|
+
v-model:bus="bus"
|
|
128
|
+
:index="props.index"
|
|
129
|
+
:error-validation-fields="props.errorValidationFields"
|
|
130
|
+
:disabled="!props.isNewHardDisk && props.isRunning"
|
|
131
|
+
:help-text="localization.common.busVirtioHelpDesc"
|
|
132
|
+
:test-id="`vm-wizard-disk-bus-field-${props.index}`"
|
|
133
|
+
component-type="disk_devices"
|
|
134
|
+
:guest-machine-type="props.guestMachineType"
|
|
135
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
136
|
+
/>
|
|
137
|
+
</template>
|
|
138
|
+
</ui-stack-block>
|
|
139
|
+
</template>
|
|
140
|
+
|
|
141
|
+
<script setup lang="ts">
|
|
142
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
143
|
+
import type { UI_I_SendDataNewHardDisk } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
144
|
+
import type { UI_T_HardDiskType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
145
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
146
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
147
|
+
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
148
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
149
|
+
|
|
150
|
+
const deleteFilesFromDatastore = defineModel<boolean>(
|
|
151
|
+
'deleteFilesFromDatastore',
|
|
152
|
+
{ required: true }
|
|
153
|
+
)
|
|
154
|
+
const size = defineModel<number>('size', { required: true })
|
|
155
|
+
const hardDiskType = defineModel<number>('hardDiskType', { required: true })
|
|
156
|
+
const diskProvisioning = defineModel<string>('diskProvisioning', {
|
|
157
|
+
required: true,
|
|
158
|
+
})
|
|
159
|
+
const sharing = defineModel<string>('sharing', { required: true })
|
|
160
|
+
const limitIops = defineModel<number>('limitIops', { required: true })
|
|
161
|
+
const limitIopsType = defineModel<string>('limitIopsType', { required: true })
|
|
162
|
+
const limitIopsInvalid = defineModel<boolean>('limitIopsInvalid', {
|
|
163
|
+
required: true,
|
|
164
|
+
})
|
|
165
|
+
const diskMode = defineModel<string>('diskMode', { required: true })
|
|
166
|
+
const cache = defineModel<string>('cache', { required: true })
|
|
167
|
+
const bus = defineModel<string>('bus', { required: true })
|
|
168
|
+
|
|
169
|
+
const props = defineProps<{
|
|
170
|
+
isRemovable: boolean
|
|
171
|
+
label: string
|
|
172
|
+
hardDiskInvalid: boolean
|
|
173
|
+
disabled: boolean
|
|
174
|
+
errorText: string
|
|
175
|
+
hardDiskTypeErrorLocalText: string
|
|
176
|
+
isDisabledSize: boolean
|
|
177
|
+
hardDiskTypeOptions: UI_I_OptionItem[]
|
|
178
|
+
maxHardDisk: number
|
|
179
|
+
location: UI_I_DatastoreTableItem | null
|
|
180
|
+
isRunning: boolean
|
|
181
|
+
isNewHardDisk: boolean
|
|
182
|
+
isEdit: boolean
|
|
183
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
184
|
+
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
185
|
+
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
186
|
+
index: number
|
|
187
|
+
type: UI_T_HardDiskType
|
|
188
|
+
hardDisk: UI_I_SendDataNewHardDisk
|
|
189
|
+
guestMachineType?: UI_I_OptionItem | null
|
|
190
|
+
isNewType?: boolean
|
|
191
|
+
}>()
|
|
192
|
+
const emits = defineEmits<{
|
|
193
|
+
(event: 'remove'): void
|
|
194
|
+
(event: 'roll-back'): void
|
|
195
|
+
(event: 'validate-size'): void
|
|
196
|
+
(event: 'change-storage', value: UI_I_DatastoreTableItem): void
|
|
197
|
+
(event: 'remove-error-by-title', value: string): void
|
|
198
|
+
}>()
|
|
199
|
+
|
|
200
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
201
|
+
</script>
|
|
202
|
+
|
|
203
|
+
<style scoped lang="scss">
|
|
204
|
+
.title {
|
|
205
|
+
margin-right: 10px;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.new-hard-disk-content {
|
|
209
|
+
gap: 8px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
:deep(.ui-main-select-toggle) {
|
|
213
|
+
display: flex;
|
|
214
|
+
justify-content: space-between;
|
|
215
|
+
width: 108px;
|
|
216
|
+
}
|
|
217
|
+
.light-theme {
|
|
218
|
+
:deep(.ui-main-select-toggle) {
|
|
219
|
+
background-color: #ffffff;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:deep(.unit .ui-main-select-toggle) {
|
|
224
|
+
width: 80px;
|
|
225
|
+
}
|
|
226
|
+
:deep(.ui-main.ui-main-sm .ui-main-input) {
|
|
227
|
+
height: 26px;
|
|
228
|
+
}
|
|
229
|
+
</style>
|