bfg-common 1.4.365 → 1.4.367
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/assets/img/icons/icons-sprite-dark-1.svg +407 -407
- package/assets/img/icons/icons-sprite-dark-2.svg +343 -343
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-4.svg +255 -255
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-dark-6.svg +94 -94
- package/assets/img/icons/icons-sprite-light-1.svg +407 -407
- package/assets/img/icons/icons-sprite-light-2.svg +343 -343
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-4.svg +255 -255
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-6.svg +94 -94
- package/assets/localization/local_en.json +1 -1
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/stack/StackBlock.vue +185 -185
- package/components/common/context/lib/models/interfaces.ts +30 -30
- package/components/common/context/recursion/Recursion.vue +86 -86
- package/components/common/context/recursion/RecursionNew.vue +199 -199
- package/components/common/context/recursion/RecursionOld.vue +213 -213
- package/components/common/modals/confirmation/Confirmation.vue +65 -65
- package/components/common/vm/actions/add/Add.vue +617 -617
- package/components/common/vm/actions/clone/lib/config/steps.ts +129 -129
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/{location/Location.vue → Location.vue} +173 -172
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +201 -201
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
- package/components/common/vm/actions/common/select/storage/Storage.vue +198 -202
- package/components/common/vm/actions/editSettings/EditSettings.vue +1 -1
- package/composables/productNameLocal.ts +30 -30
- package/package.json +1 -1
- package/plugins/date.ts +181 -181
- package/plugins/recursion.ts +311 -311
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +383 -383
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/StorageModalOld.vue +0 -52
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/StorageModalNew.vue +0 -175
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/storageModalNew/lib/config/table.ts +0 -167
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.common.hardwareVirtualization }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<div class="flex-space-between">
|
|
9
|
-
<div class="flex-align-center">
|
|
10
|
-
<input
|
|
11
|
-
id="expose-hardware-assisted-virtualization"
|
|
12
|
-
v-model="hardwareVirtualizationLocal"
|
|
13
|
-
data-id="expose-hardware-assisted-virtualization"
|
|
14
|
-
type="checkbox"
|
|
15
|
-
disabled
|
|
16
|
-
/>
|
|
17
|
-
<label
|
|
18
|
-
for="expose-hardware-assisted-virtualization"
|
|
19
|
-
:class="['label-text-normal', { 'div-disabled': true }]"
|
|
20
|
-
>{{
|
|
21
|
-
localization.common.exposeHardwareAssistedVirtualizationGuestOs
|
|
22
|
-
}}</label
|
|
23
|
-
>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div id="hv-help-icon">
|
|
27
|
-
<atoms-the-icon
|
|
28
|
-
fill="#0072a3"
|
|
29
|
-
width="24px"
|
|
30
|
-
height="24px"
|
|
31
|
-
name="info-circle"
|
|
32
|
-
data-id="show-hv-help-icon"
|
|
33
|
-
@click.stop="isShowHvHelp = !isShowHvHelp"
|
|
34
|
-
/>
|
|
35
|
-
<Teleport to="body">
|
|
36
|
-
<atoms-tooltip-signpost
|
|
37
|
-
v-if="isShowHvHelp"
|
|
38
|
-
elem-id="hv-help-icon"
|
|
39
|
-
@hide="isShowHvHelp = false"
|
|
40
|
-
>
|
|
41
|
-
<h3 class="hv-help-title">
|
|
42
|
-
{{ localization.mainNavigation.help }}
|
|
43
|
-
</h3>
|
|
44
|
-
|
|
45
|
-
<p class="hv-help-text">
|
|
46
|
-
{{
|
|
47
|
-
localization.common.hardwareVirtualizationHelpDescription
|
|
48
|
-
}}
|
|
49
|
-
</p>
|
|
50
|
-
</atoms-tooltip-signpost>
|
|
51
|
-
</Teleport>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
55
|
-
</atoms-stack-block>
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
58
|
-
|
|
59
|
-
<script setup lang="ts">
|
|
60
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
61
|
-
|
|
62
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
63
|
-
|
|
64
|
-
const props = defineProps<{
|
|
65
|
-
hardwareVirtualization: boolean
|
|
66
|
-
}>()
|
|
67
|
-
const emits = defineEmits<{
|
|
68
|
-
(event: 'update:hardware-virtualization', value: boolean): boolean
|
|
69
|
-
}>()
|
|
70
|
-
|
|
71
|
-
const hardwareVirtualizationLocal = computed<boolean>({
|
|
72
|
-
get() {
|
|
73
|
-
return props.hardwareVirtualization
|
|
74
|
-
},
|
|
75
|
-
set(newValue) {
|
|
76
|
-
emits('update:hardware-virtualization', newValue)
|
|
77
|
-
},
|
|
78
|
-
})
|
|
79
|
-
|
|
80
|
-
const isShowHvHelp = ref<boolean>(false)
|
|
81
|
-
</script>
|
|
82
|
-
|
|
83
|
-
<style scoped lang="scss">
|
|
84
|
-
#expose-hardware-assisted-virtualization {
|
|
85
|
-
margin: 4px 4px 0 0;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
h3.hv-help-title {
|
|
89
|
-
margin-top: 7px;
|
|
90
|
-
font-size: 22px;
|
|
91
|
-
color: #565656;
|
|
92
|
-
}
|
|
93
|
-
p.hv-help-text {
|
|
94
|
-
width: 310px;
|
|
95
|
-
margin-top: 24px;
|
|
96
|
-
font-size: 14px;
|
|
97
|
-
color: #565656;
|
|
98
|
-
}
|
|
99
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="">
|
|
3
|
+
<atoms-stack-block :has-children="false">
|
|
4
|
+
<template #stackBlockKey>
|
|
5
|
+
{{ localization.common.hardwareVirtualization }}
|
|
6
|
+
</template>
|
|
7
|
+
<template #stackBlockContent>
|
|
8
|
+
<div class="flex-space-between">
|
|
9
|
+
<div class="flex-align-center">
|
|
10
|
+
<input
|
|
11
|
+
id="expose-hardware-assisted-virtualization"
|
|
12
|
+
v-model="hardwareVirtualizationLocal"
|
|
13
|
+
data-id="expose-hardware-assisted-virtualization"
|
|
14
|
+
type="checkbox"
|
|
15
|
+
disabled
|
|
16
|
+
/>
|
|
17
|
+
<label
|
|
18
|
+
for="expose-hardware-assisted-virtualization"
|
|
19
|
+
:class="['label-text-normal', { 'div-disabled': true }]"
|
|
20
|
+
>{{
|
|
21
|
+
localization.common.exposeHardwareAssistedVirtualizationGuestOs
|
|
22
|
+
}}</label
|
|
23
|
+
>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div id="hv-help-icon">
|
|
27
|
+
<atoms-the-icon
|
|
28
|
+
fill="#0072a3"
|
|
29
|
+
width="24px"
|
|
30
|
+
height="24px"
|
|
31
|
+
name="info-circle"
|
|
32
|
+
data-id="show-hv-help-icon"
|
|
33
|
+
@click.stop="isShowHvHelp = !isShowHvHelp"
|
|
34
|
+
/>
|
|
35
|
+
<Teleport to="body">
|
|
36
|
+
<atoms-tooltip-signpost
|
|
37
|
+
v-if="isShowHvHelp"
|
|
38
|
+
elem-id="hv-help-icon"
|
|
39
|
+
@hide="isShowHvHelp = false"
|
|
40
|
+
>
|
|
41
|
+
<h3 class="hv-help-title">
|
|
42
|
+
{{ localization.mainNavigation.help }}
|
|
43
|
+
</h3>
|
|
44
|
+
|
|
45
|
+
<p class="hv-help-text">
|
|
46
|
+
{{
|
|
47
|
+
localization.common.hardwareVirtualizationHelpDescription
|
|
48
|
+
}}
|
|
49
|
+
</p>
|
|
50
|
+
</atoms-tooltip-signpost>
|
|
51
|
+
</Teleport>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
</atoms-stack-block>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script setup lang="ts">
|
|
60
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
61
|
+
|
|
62
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
63
|
+
|
|
64
|
+
const props = defineProps<{
|
|
65
|
+
hardwareVirtualization: boolean
|
|
66
|
+
}>()
|
|
67
|
+
const emits = defineEmits<{
|
|
68
|
+
(event: 'update:hardware-virtualization', value: boolean): boolean
|
|
69
|
+
}>()
|
|
70
|
+
|
|
71
|
+
const hardwareVirtualizationLocal = computed<boolean>({
|
|
72
|
+
get() {
|
|
73
|
+
return props.hardwareVirtualization
|
|
74
|
+
},
|
|
75
|
+
set(newValue) {
|
|
76
|
+
emits('update:hardware-virtualization', newValue)
|
|
77
|
+
},
|
|
78
|
+
})
|
|
79
|
+
|
|
80
|
+
const isShowHvHelp = ref<boolean>(false)
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<style scoped lang="scss">
|
|
84
|
+
#expose-hardware-assisted-virtualization {
|
|
85
|
+
margin: 4px 4px 0 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
h3.hv-help-title {
|
|
89
|
+
margin-top: 7px;
|
|
90
|
+
font-size: 22px;
|
|
91
|
+
color: #565656;
|
|
92
|
+
}
|
|
93
|
+
p.hv-help-text {
|
|
94
|
+
width: 310px;
|
|
95
|
+
margin-top: 24px;
|
|
96
|
+
font-size: 14px;
|
|
97
|
+
color: #565656;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -1,172 +1,173 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.common.location }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<atoms-tooltip-error
|
|
9
|
-
:has-error="!!apiError"
|
|
10
|
-
:selector="`.vm-wizard-disk-device-target-field-${props.index}`"
|
|
11
|
-
@remove="onRemoveValidationError"
|
|
12
|
-
>
|
|
13
|
-
<template #elem>
|
|
14
|
-
<div class="select">
|
|
15
|
-
<select
|
|
16
|
-
:id="`vm-wizard-disk-device-target-field-${props.index}`"
|
|
17
|
-
v-model="selectedLocation"
|
|
18
|
-
:data-id="`vm-wizard-disk-device-target-field-${props.index}`"
|
|
19
|
-
:class="`vm-wizard-disk-device-target-field-${props.index}`"
|
|
20
|
-
@change="changeLocation"
|
|
21
|
-
>
|
|
22
|
-
<option
|
|
23
|
-
v-for="(item, key) in locationOptions"
|
|
24
|
-
:key="key"
|
|
25
|
-
:value="item.value"
|
|
26
|
-
>
|
|
27
|
-
{{ item.text }}
|
|
28
|
-
</option>
|
|
29
|
-
</select>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
<template #content>{{ apiError }}</template>
|
|
33
|
-
</atoms-tooltip-error>
|
|
34
|
-
</template>
|
|
35
|
-
</atoms-stack-block>
|
|
36
|
-
|
|
37
|
-
<Teleport to="body">
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
@
|
|
43
|
-
@hide="onHideStorageModal"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
import type {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
const
|
|
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
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="">
|
|
3
|
+
<atoms-stack-block :has-children="false">
|
|
4
|
+
<template #stackBlockKey>
|
|
5
|
+
{{ localization.common.location }}
|
|
6
|
+
</template>
|
|
7
|
+
<template #stackBlockContent>
|
|
8
|
+
<atoms-tooltip-error
|
|
9
|
+
:has-error="!!apiError"
|
|
10
|
+
:selector="`.vm-wizard-disk-device-target-field-${props.index}`"
|
|
11
|
+
@remove="onRemoveValidationError"
|
|
12
|
+
>
|
|
13
|
+
<template #elem>
|
|
14
|
+
<div class="select">
|
|
15
|
+
<select
|
|
16
|
+
:id="`vm-wizard-disk-device-target-field-${props.index}`"
|
|
17
|
+
v-model="selectedLocation"
|
|
18
|
+
:data-id="`vm-wizard-disk-device-target-field-${props.index}`"
|
|
19
|
+
:class="`vm-wizard-disk-device-target-field-${props.index}`"
|
|
20
|
+
@change="changeLocation"
|
|
21
|
+
>
|
|
22
|
+
<option
|
|
23
|
+
v-for="(item, key) in locationOptions"
|
|
24
|
+
:key="key"
|
|
25
|
+
:value="item.value"
|
|
26
|
+
>
|
|
27
|
+
{{ item.text }}
|
|
28
|
+
</option>
|
|
29
|
+
</select>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
<template #content>{{ apiError }}</template>
|
|
33
|
+
</atoms-tooltip-error>
|
|
34
|
+
</template>
|
|
35
|
+
</atoms-stack-block>
|
|
36
|
+
|
|
37
|
+
<Teleport to="body">
|
|
38
|
+
<atoms-modal
|
|
39
|
+
class="storage-modal"
|
|
40
|
+
:show="storageModalIsShow"
|
|
41
|
+
:title="localization.common.selectStorage"
|
|
42
|
+
@submit="onSubmitStorageModal"
|
|
43
|
+
@hide="onHideStorageModal"
|
|
44
|
+
>
|
|
45
|
+
<template #modalBody>
|
|
46
|
+
<span>{{
|
|
47
|
+
localization.common.followingDatastoresAccessibleDestinationResourceThatSelected
|
|
48
|
+
}}</span>
|
|
49
|
+
<common-vm-actions-common-select-storage
|
|
50
|
+
:storage-submit="storageSubmit"
|
|
51
|
+
:datastore="props.datastore"
|
|
52
|
+
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
53
|
+
hide-compatibility
|
|
54
|
+
@submit="changeStorage"
|
|
55
|
+
/>
|
|
56
|
+
</template>
|
|
57
|
+
</atoms-modal>
|
|
58
|
+
</Teleport>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script setup lang="ts">
|
|
63
|
+
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
64
|
+
import type {
|
|
65
|
+
UI_I_Localization,
|
|
66
|
+
UI_I_HTMLSelectElement,
|
|
67
|
+
} from '~/lib/models/interfaces'
|
|
68
|
+
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
69
|
+
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
70
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
71
|
+
|
|
72
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
73
|
+
|
|
74
|
+
const props = defineProps<{
|
|
75
|
+
location: UI_I_DatastoreTableItem | null
|
|
76
|
+
index: number
|
|
77
|
+
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
78
|
+
datastore: UI_I_DatastoreTableItem[]
|
|
79
|
+
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
80
|
+
}>()
|
|
81
|
+
const emits = defineEmits<{
|
|
82
|
+
(event: 'change', value: UI_I_DatastoreTableItem): void
|
|
83
|
+
(event: 'remove-error-by-title', value: string): void
|
|
84
|
+
}>()
|
|
85
|
+
|
|
86
|
+
const selectedLocation = ref<string>(props.location?.id || '')
|
|
87
|
+
|
|
88
|
+
const storages = ref<UI_I_DatastoreTableItem[]>([])
|
|
89
|
+
const addStorage = (storage: UI_I_DatastoreTableItem): void => {
|
|
90
|
+
const hasStorage = storages.value.some((item) => item.id === storage.id)
|
|
91
|
+
if (hasStorage) {
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
storages.value.push(storage)
|
|
96
|
+
}
|
|
97
|
+
const locationOptions = ref<UI_I_OptionItem[]>([])
|
|
98
|
+
|
|
99
|
+
watch(
|
|
100
|
+
() => props.location,
|
|
101
|
+
(newValue) => {
|
|
102
|
+
if (locationOptions.value.length || !newValue) {
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
locationOptions.value = [
|
|
107
|
+
{ text: localization.value.common.storeWithVirtualMachine, value: newValue.id },
|
|
108
|
+
{ text: `${localization.value.common.browse}...`, value: -1 },
|
|
109
|
+
]
|
|
110
|
+
selectedLocation.value = newValue.id
|
|
111
|
+
storages.value.push(newValue)
|
|
112
|
+
addStorage(newValue)
|
|
113
|
+
},
|
|
114
|
+
{ immediate: true }
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
const storageSubmit = ref<number>(0)
|
|
118
|
+
const onSubmitStorageModal = (): void => {
|
|
119
|
+
storageSubmit.value++
|
|
120
|
+
}
|
|
121
|
+
const storageModalIsShow = ref<boolean>(false)
|
|
122
|
+
const changeStorage = (storage: UI_I_DatastoreTableItem): void => {
|
|
123
|
+
locationOptions.value = [
|
|
124
|
+
locationOptions.value[0],
|
|
125
|
+
{ text: storage.name, value: storage.id },
|
|
126
|
+
// @ts-ignore
|
|
127
|
+
locationOptions.value.at(-1),
|
|
128
|
+
]
|
|
129
|
+
|
|
130
|
+
selectedLocation.value = storage.id
|
|
131
|
+
emits('change', storage)
|
|
132
|
+
addStorage(storage)
|
|
133
|
+
onHideStorageModal()
|
|
134
|
+
}
|
|
135
|
+
const onHideStorageModal = (): void => {
|
|
136
|
+
storageModalIsShow.value = false
|
|
137
|
+
}
|
|
138
|
+
const changeLocation = (event: UI_I_HTMLSelectElement): void => {
|
|
139
|
+
const value = +event.target.value
|
|
140
|
+
if (value === -1) {
|
|
141
|
+
storageModalIsShow.value = true
|
|
142
|
+
return
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
selectedLocation.value = event.target.value
|
|
146
|
+
const storage = storages.value.find((item) => item.id === event.target.value)
|
|
147
|
+
storage && emits('change', storage)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const typeError = computed<string>(
|
|
151
|
+
() => `disk_devices[${props.index}].location`
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
const apiError = computed<string>(() => {
|
|
155
|
+
return (
|
|
156
|
+
props.errorValidationFields?.find(
|
|
157
|
+
(message) => message.field === typeError.value
|
|
158
|
+
)?.error_message || ''
|
|
159
|
+
)
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
const onRemoveValidationError = (): void => {
|
|
163
|
+
emits('remove-error-by-title', typeError.value)
|
|
164
|
+
}
|
|
165
|
+
</script>
|
|
166
|
+
|
|
167
|
+
<style scoped lang="scss">
|
|
168
|
+
.storage-modal {
|
|
169
|
+
:deep(.modal-dialog) {
|
|
170
|
+
width: 864px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
</style>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div class="flex-align-center flex-space-between mr-1">
|
|
29
29
|
<template v-if="props.type === 'removed'">
|
|
30
30
|
<span>{{ localization.common.deviceWillRemoved }}</span>
|
|
31
|
-
<div class="flex-align-center"
|
|
31
|
+
<div @click.stop class="flex-align-center">
|
|
32
32
|
<input
|
|
33
33
|
:id="`hard-disk-delete-files-from-datastore-${props.index}`"
|
|
34
34
|
v-model="deleteFilesFromDatastore"
|
|
@@ -355,7 +355,7 @@ watch(
|
|
|
355
355
|
cache,
|
|
356
356
|
bus,
|
|
357
357
|
deleteFilesFromDatastore,
|
|
358
|
-
()
|
|
358
|
+
() => props.type,
|
|
359
359
|
],
|
|
360
360
|
() => {
|
|
361
361
|
const limitIopsLocal =
|