bfg-common 1.4.113 → 1.4.115
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/scss/common/icons/icons-5.scss +28 -4
- package/components/common/layout/theHeader/TheHeaderNew.vue +12 -2
- package/components/common/layout/theHeader/ThemeSwitch.vue +8 -1
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +8 -2
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +7 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +4 -3
- package/components/common/wizards/vmNew/migrate/Migrate.vue +8 -12
- package/components/common/wizards/vmNew/migrate/lib/config/constructDataReady.ts +16 -33
- package/components/common/wizards/vmNew/migrate/lib/models/interfaces.ts +6 -0
- package/components/common/wizards/vmNew/migrate/select/storage/Storage.vue +14 -19
- package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +15 -23
- package/package.json +2 -2
|
@@ -133,10 +133,12 @@
|
|
|
133
133
|
.icon-calendar-years {
|
|
134
134
|
background-position: 0 73.4%;
|
|
135
135
|
}
|
|
136
|
-
.icon-folder-warning
|
|
136
|
+
.icon-folder-warning,
|
|
137
|
+
.vsphere-icon-folder-warning {
|
|
137
138
|
background-position: 0 74.6%;
|
|
138
139
|
}
|
|
139
|
-
.icon-folder-error
|
|
140
|
+
.icon-folder-error,
|
|
141
|
+
.vsphere-icon-folder-error {
|
|
140
142
|
background-position: 0 75.9%;
|
|
141
143
|
}
|
|
142
144
|
.icon-file {
|
|
@@ -166,15 +168,19 @@
|
|
|
166
168
|
.icon-log-file-error {
|
|
167
169
|
background-position: 0 87.3%;
|
|
168
170
|
}
|
|
169
|
-
.vx-icon-memory-warning
|
|
171
|
+
.vx-icon-memory-warning,
|
|
172
|
+
.icon-vSphere-dsVmNvram-warning {
|
|
170
173
|
background-position: 0 88.6%;
|
|
171
174
|
}
|
|
172
|
-
.vx-icon-memory-error
|
|
175
|
+
.vx-icon-memory-error
|
|
176
|
+
.icon-vSphere-dsVmNvram-error {
|
|
173
177
|
background-position: 0 89.8%;
|
|
174
178
|
}
|
|
179
|
+
.icon-vSphere-dsIsoImage-warning,
|
|
175
180
|
.icon-ds-iso-image-warning {
|
|
176
181
|
background-position: 0 91.1%;
|
|
177
182
|
}
|
|
183
|
+
.icon-vSphere-dsIsoImage-error,
|
|
178
184
|
.icon-ds-iso-image-error {
|
|
179
185
|
background-position: 0 92.4%;
|
|
180
186
|
}
|
|
@@ -243,6 +249,8 @@
|
|
|
243
249
|
.icon-calendar-years,
|
|
244
250
|
.icon-folder-warning,
|
|
245
251
|
.icon-folder-error,
|
|
252
|
+
.vsphere-icon-folder-warning,
|
|
253
|
+
.vsphere-icon-folder-error,
|
|
246
254
|
.icon-file,
|
|
247
255
|
.icon-file-warning,
|
|
248
256
|
.icon-file-error,
|
|
@@ -254,6 +262,10 @@
|
|
|
254
262
|
.icon-log-file-error,
|
|
255
263
|
.vx-icon-memory-warning,
|
|
256
264
|
.vx-icon-memory-error,
|
|
265
|
+
.icon-vSphere-dsVmNvram-warning,
|
|
266
|
+
.icon-vSphere-dsVmNvram-error,
|
|
267
|
+
.icon-vSphere-dsIsoImage-warning,
|
|
268
|
+
.icon-vSphere-dsIsoImage-error,
|
|
257
269
|
.icon-ds-iso-image-warning,
|
|
258
270
|
.icon-ds-iso-image-error,
|
|
259
271
|
.icon-temporary-file,
|
|
@@ -314,6 +326,8 @@
|
|
|
314
326
|
.active .icon-calendar-years,
|
|
315
327
|
.active .icon-folder-warning,
|
|
316
328
|
.active .icon-folder-error,
|
|
329
|
+
.active .vsphere-icon-folder-warning,
|
|
330
|
+
.active .vsphere-icon-folder-error,
|
|
317
331
|
.active .icon-file,
|
|
318
332
|
.active .icon-file-warning,
|
|
319
333
|
.active .icon-file-error,
|
|
@@ -325,6 +339,10 @@
|
|
|
325
339
|
.active .icon-log-file-error,
|
|
326
340
|
.active .vx-icon-memory-warning,
|
|
327
341
|
.active .vx-icon-memory-error,
|
|
342
|
+
.active .icon-vSphere-dsVmNvram-warning,
|
|
343
|
+
.active .icon-vSphere-dsVmNvram-error,
|
|
344
|
+
.active .icon-vSphere-dsIsoImage-warning,
|
|
345
|
+
.active .icon-vSphere-dsIsoImage-error,
|
|
328
346
|
.active .icon-ds-iso-image-warning,
|
|
329
347
|
.active .icon-ds-iso-image-error,
|
|
330
348
|
.active .icon-temporary-file,
|
|
@@ -387,6 +405,8 @@
|
|
|
387
405
|
.icon-calendar-years,
|
|
388
406
|
.icon-folder-warning,
|
|
389
407
|
.icon-folder-error,
|
|
408
|
+
.vsphere-icon-folder-warning,
|
|
409
|
+
.vsphere-icon-folder-error,
|
|
390
410
|
.icon-file,
|
|
391
411
|
.icon-file-warning,
|
|
392
412
|
.icon-file-error,
|
|
@@ -398,6 +418,10 @@
|
|
|
398
418
|
.icon-log-file-error,
|
|
399
419
|
.vx-icon-memory-warning,
|
|
400
420
|
.vx-icon-memory-error,
|
|
421
|
+
.icon-vSphere-dsVmNvram-warning,
|
|
422
|
+
.icon-vSphere-dsVmNvram-error,
|
|
423
|
+
.icon-vSphere-dsIsoImage-warning,
|
|
424
|
+
.icon-vSphere-dsIsoImage-error,
|
|
401
425
|
.icon-ds-iso-image-warning,
|
|
402
426
|
.icon-ds-iso-image-error,
|
|
403
427
|
.icon-temporary-file,
|
|
@@ -29,7 +29,11 @@
|
|
|
29
29
|
</button>
|
|
30
30
|
</div>
|
|
31
31
|
</template>
|
|
32
|
-
<template #content>
|
|
32
|
+
<template #content>
|
|
33
|
+
<span class="header-tooltip-text">{{
|
|
34
|
+
localization.common.menu
|
|
35
|
+
}}</span>
|
|
36
|
+
</template>
|
|
33
37
|
</ui-tooltip>
|
|
34
38
|
<nuxt-link
|
|
35
39
|
id="header-shortcuts-link"
|
|
@@ -77,7 +81,9 @@
|
|
|
77
81
|
</div>
|
|
78
82
|
</template>
|
|
79
83
|
<template #content>
|
|
80
|
-
|
|
84
|
+
<span class="header-tooltip-text">
|
|
85
|
+
{{ localization.common.refresh }}
|
|
86
|
+
</span>
|
|
81
87
|
</template>
|
|
82
88
|
</ui-tooltip>
|
|
83
89
|
<div class="divider" />
|
|
@@ -193,6 +199,10 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
193
199
|
display: flex;
|
|
194
200
|
justify-content: space-between;
|
|
195
201
|
|
|
202
|
+
.header-tooltip-text {
|
|
203
|
+
font-size: 12px;
|
|
204
|
+
font-weight: 500;
|
|
205
|
+
}
|
|
196
206
|
.left-content {
|
|
197
207
|
display: flex;
|
|
198
208
|
align-items: center;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</div>
|
|
23
23
|
</template>
|
|
24
24
|
<template #content>
|
|
25
|
-
<span class="text-nowrap">
|
|
25
|
+
<span class="text-nowrap header-tooltip-text">
|
|
26
26
|
{{ tooltipText }}
|
|
27
27
|
</span>
|
|
28
28
|
</template>
|
|
@@ -57,3 +57,10 @@ const tooltipText = computed<string>(() =>
|
|
|
57
57
|
: localization.value.layout.lightMode
|
|
58
58
|
)
|
|
59
59
|
</script>
|
|
60
|
+
|
|
61
|
+
<style scoped lang="scss">
|
|
62
|
+
.header-tooltip-text {
|
|
63
|
+
font-size: 12px;
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
>
|
|
21
21
|
<span class="help-icon-container">
|
|
22
22
|
<ui-icon-main-navigation-panel
|
|
23
|
-
name="icon-help"
|
|
23
|
+
name="icon-help-2"
|
|
24
24
|
width="24"
|
|
25
25
|
height="24"
|
|
26
26
|
/>
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
34
|
<template #content>
|
|
35
|
-
{{
|
|
35
|
+
<span class="header-tooltip-text">{{
|
|
36
|
+
localization.mainNavigation.help
|
|
37
|
+
}}</span>
|
|
36
38
|
</template>
|
|
37
39
|
</ui-tooltip>
|
|
38
40
|
</div>
|
|
@@ -114,6 +116,10 @@ const onSelectDropdown = (value: string): void => {
|
|
|
114
116
|
|
|
115
117
|
<style scoped lang="scss">
|
|
116
118
|
.help-menu-content {
|
|
119
|
+
.header-tooltip-text {
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
font-weight: 500;
|
|
122
|
+
}
|
|
117
123
|
.help-menu-dropdown-toggle {
|
|
118
124
|
border: unset;
|
|
119
125
|
padding: 0;
|
|
@@ -29,7 +29,9 @@
|
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
31
31
|
<template #content>
|
|
32
|
-
{{
|
|
32
|
+
<span class="header-tooltip-text">{{
|
|
33
|
+
localization.layout.myAccount
|
|
34
|
+
}}</span>
|
|
33
35
|
</template>
|
|
34
36
|
</ui-tooltip>
|
|
35
37
|
</div>
|
|
@@ -98,6 +100,10 @@ const onSelectDropdown = (value: string): void => {
|
|
|
98
100
|
|
|
99
101
|
<style lang="scss">
|
|
100
102
|
.user-menu-content {
|
|
103
|
+
.header-tooltip-text {
|
|
104
|
+
font-size: 12px;
|
|
105
|
+
font-weight: 500;
|
|
106
|
+
}
|
|
101
107
|
.user-menu-dropdown-toggle {
|
|
102
108
|
border: unset;
|
|
103
109
|
padding: 0;
|
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
>
|
|
91
91
|
<div class="flex-align-center input-action-wrapper">
|
|
92
92
|
<input
|
|
93
|
-
id="configuration-
|
|
93
|
+
id="configuration-server-input"
|
|
94
94
|
v-model="model.server"
|
|
95
|
-
data-id="configuration-
|
|
95
|
+
data-id="configuration-server-input"
|
|
96
96
|
type="text"
|
|
97
97
|
class="clr-input"
|
|
98
98
|
@blur="initValidation(true, ['server'])"
|
|
@@ -124,13 +124,14 @@ import type {
|
|
|
124
124
|
} from '~/lib/models/interfaces'
|
|
125
125
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
126
126
|
import type { UI_I_InitialValidationFields } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
|
|
127
|
+
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
127
128
|
|
|
128
129
|
const props = defineProps<{
|
|
129
130
|
project: UI_T_Project
|
|
130
131
|
alertMessages: string[]
|
|
131
132
|
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
132
133
|
}>()
|
|
133
|
-
const model = defineModel<
|
|
134
|
+
const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
134
135
|
const emits = defineEmits<{
|
|
135
136
|
(event: 'hide-alert', value: number): void
|
|
136
137
|
}>()
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
v-model="form"
|
|
27
27
|
:submit="selectComputeResourceSubmit"
|
|
28
28
|
:get-compute-resource-data="props.getComputeResourceData"
|
|
29
|
-
:migrate-type="
|
|
29
|
+
:migrate-type="form.migrate_type"
|
|
30
30
|
:compute-resource-data="props.computeResourceTableData"
|
|
31
31
|
:compute-resource-tree="props.computeResourceTree"
|
|
32
32
|
/>
|
|
@@ -75,7 +75,6 @@ import {
|
|
|
75
75
|
stepsFunc,
|
|
76
76
|
stepsSchemeInitial,
|
|
77
77
|
} from '~/components/common/wizards/vmNew/migrate/lib/config/steps'
|
|
78
|
-
|
|
79
78
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
80
79
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
81
80
|
import type {
|
|
@@ -107,7 +106,7 @@ const props = defineProps<{
|
|
|
107
106
|
}>()
|
|
108
107
|
const emits = defineEmits<{
|
|
109
108
|
(event: 'hide'): void
|
|
110
|
-
(event: 'finish'): void
|
|
109
|
+
(event: 'finish', value: UI_I_MigrateFormLocal): void
|
|
111
110
|
}>()
|
|
112
111
|
|
|
113
112
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -124,6 +123,10 @@ const form = ref<UI_I_MigrateFormLocal>({
|
|
|
124
123
|
migrate_type: props.project === 'procurator' ? 'storage' : 'resource',
|
|
125
124
|
disk_format: 0,
|
|
126
125
|
storage: null,
|
|
126
|
+
configure: {
|
|
127
|
+
type: 'batch-configure',
|
|
128
|
+
disks: [],
|
|
129
|
+
},
|
|
127
130
|
})
|
|
128
131
|
|
|
129
132
|
const validationFunc = async (
|
|
@@ -184,19 +187,12 @@ const selectComputeResourceSubmit = ref<number>(0)
|
|
|
184
187
|
|
|
185
188
|
const selectedVMotionPriority = ref<UI_T_SelectVMotionPriority>('high')
|
|
186
189
|
|
|
187
|
-
const vmMigrateType = ref<UI_T_VmMigrateType>(
|
|
188
|
-
props.project === 'procurator' ? 'storage' : 'resource'
|
|
189
|
-
)
|
|
190
190
|
const connectedStorageIdOnVm = computed<string>(
|
|
191
191
|
() => props.vmSettings?.storage.id || ''
|
|
192
192
|
)
|
|
193
193
|
|
|
194
194
|
const dataReadyView = computed<UI_I_TableInfoItem>(() =>
|
|
195
|
-
constructDataReadyViewFunc(
|
|
196
|
-
vmMigrateType.value,
|
|
197
|
-
props.vmName,
|
|
198
|
-
dataFormLocal.value
|
|
199
|
-
)
|
|
195
|
+
constructDataReadyViewFunc(props.vmName, form.value, dataFormLocal.value)
|
|
200
196
|
)
|
|
201
197
|
|
|
202
198
|
const dataFormLocal = ref<UI_I_CollectedDataFormLocal>({
|
|
@@ -210,7 +206,7 @@ const dataFormLocal = ref<UI_I_CollectedDataFormLocal>({
|
|
|
210
206
|
})
|
|
211
207
|
const onFinish = (): void => {
|
|
212
208
|
loading.value = true
|
|
213
|
-
emits('finish')
|
|
209
|
+
emits('finish', form.value)
|
|
214
210
|
loading.value = false
|
|
215
211
|
}
|
|
216
212
|
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type {
|
|
2
|
+
import type { UI_I_MigrateReadyBlockData } from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
|
|
3
|
+
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
|
|
3
4
|
import { UI_E_VmMigrationType } from '~/components/common/wizards/vm/migrate/lib/models/enums'
|
|
4
|
-
import type {
|
|
5
|
-
UI_I_CollectedDataFormLocal,
|
|
6
|
-
UI_I_MigrateReadyBlockData,
|
|
7
|
-
} from '~/components/common/wizards/vm/migrate/lib/models/interfaces'
|
|
8
5
|
import { UI_E_SelectStorageDiskFormat } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/enums'
|
|
9
|
-
// import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/interfaces'
|
|
10
6
|
import { vmDiskFormatOptions } from '~/components/common/wizards/vm/migrate/select/storage/diskFormat/lib/config/formatOptions'
|
|
11
7
|
|
|
12
8
|
const storageDetailsFunc = (
|
|
13
9
|
localization: UI_I_Localization,
|
|
14
10
|
migrationType: string,
|
|
15
11
|
name: string,
|
|
16
|
-
|
|
12
|
+
form: UI_I_MigrateFormLocal
|
|
17
13
|
): UI_I_MigrateReadyBlockData[] => {
|
|
18
|
-
const {
|
|
14
|
+
const { disk_format, configure, storage } = form
|
|
19
15
|
|
|
20
|
-
const isActivePerDiskTab: boolean =
|
|
16
|
+
const isActivePerDiskTab: boolean = configure.type === 'configure-disk'
|
|
21
17
|
|
|
22
18
|
const diskFormat = vmDiskFormatOptions().find(
|
|
23
|
-
(file) => file.value ===
|
|
19
|
+
(file) => file.value === disk_format
|
|
24
20
|
)!
|
|
25
21
|
|
|
26
22
|
let result: UI_I_MigrateReadyBlockData[] = [
|
|
@@ -36,7 +32,7 @@ const storageDetailsFunc = (
|
|
|
36
32
|
},
|
|
37
33
|
{
|
|
38
34
|
label: localization.common.storage,
|
|
39
|
-
value:
|
|
35
|
+
value: storage?.name,
|
|
40
36
|
permissions: ['batch-configure'],
|
|
41
37
|
},
|
|
42
38
|
{
|
|
@@ -51,9 +47,9 @@ const storageDetailsFunc = (
|
|
|
51
47
|
},
|
|
52
48
|
]
|
|
53
49
|
|
|
54
|
-
if (isActivePerDiskTab &&
|
|
55
|
-
const perDiskItems: UI_I_MigrateReadyBlockData[] =
|
|
56
|
-
|
|
50
|
+
if (isActivePerDiskTab && configure.disks) {
|
|
51
|
+
const perDiskItems: UI_I_MigrateReadyBlockData[] = configure.disks.map(
|
|
52
|
+
(disk) => {
|
|
57
53
|
const isConfigurationFile = disk.file === 'Configuration file'
|
|
58
54
|
const diskFormat = UI_E_SelectStorageDiskFormat[disk.disk_format]
|
|
59
55
|
|
|
@@ -67,34 +63,21 @@ const storageDetailsFunc = (
|
|
|
67
63
|
permissions: ['configure-disk'],
|
|
68
64
|
isProperty: true,
|
|
69
65
|
}
|
|
70
|
-
}
|
|
66
|
+
}
|
|
67
|
+
)
|
|
71
68
|
result = result.concat(perDiskItems)
|
|
72
69
|
}
|
|
73
70
|
|
|
74
|
-
return result.filter((option) =>
|
|
75
|
-
option.permissions.includes(selectStorage.tab)
|
|
76
|
-
)
|
|
71
|
+
return result.filter((option) => option.permissions.includes(configure.type))
|
|
77
72
|
}
|
|
78
73
|
export const constructDataReadyViewFunc = (
|
|
79
|
-
type: UI_T_VmMigrateType,
|
|
80
74
|
name: string,
|
|
81
|
-
data:
|
|
75
|
+
data: UI_I_MigrateFormLocal
|
|
82
76
|
): UI_I_MigrateReadyBlockData[] => {
|
|
83
77
|
const localization: UI_I_Localization = useLocal()
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
// 'resource-storage': storageDetailsFunc, // временно чтобы не было ошибка при исползоване сфере
|
|
88
|
-
// }
|
|
89
|
-
|
|
90
|
-
const migrationType = localization.common[UI_E_VmMigrationType[type]]
|
|
79
|
+
const migrationType =
|
|
80
|
+
localization.common[UI_E_VmMigrationType[data.migrate_type]]
|
|
91
81
|
|
|
92
82
|
return storageDetailsFunc(localization, migrationType, name, data)
|
|
93
|
-
|
|
94
|
-
// return details[type as keyof typeof details](
|
|
95
|
-
// localization,
|
|
96
|
-
// migrationType,
|
|
97
|
-
// name,
|
|
98
|
-
// data
|
|
99
|
-
// )
|
|
100
83
|
}
|
|
@@ -4,11 +4,17 @@ import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm
|
|
|
4
4
|
import type { UI_T_SelectVMotionPriority } from '~/components/common/wizards/vm/migrate/select/priority/lib/models/types'
|
|
5
5
|
import type { UI_I_ComputeResourceDataLocal } from '~/components/common/wizards/vm/migrate/select/computeResource/lib/models/interfaces'
|
|
6
6
|
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
|
|
7
|
+
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
7
8
|
|
|
8
9
|
export interface UI_I_MigrateFormLocal {
|
|
9
10
|
migrate_type: UI_T_VmMigrateType
|
|
10
11
|
disk_format: number
|
|
11
12
|
storage: any
|
|
13
|
+
|
|
14
|
+
configure: {
|
|
15
|
+
type: UI_T_VmMigrateSelectStorageTab
|
|
16
|
+
disks: UI_I_StorageConfigurePerDiskItem[]
|
|
17
|
+
}
|
|
12
18
|
}
|
|
13
19
|
|
|
14
20
|
export interface UI_I_ChangeStepsSchemes {
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
<common-wizards-vm-migrate-select-storage-selected-per-disk
|
|
12
12
|
v-if="isShowSelectedPerDisks"
|
|
13
13
|
v-model="isShowSelectedPerDisks"
|
|
14
|
-
v-model:active-tab="
|
|
14
|
+
v-model:active-tab="model.configure.type"
|
|
15
15
|
v-model:connected-storage-id-local="connectedStorageIdLocal"
|
|
16
16
|
:data="selectedPerDisks"
|
|
17
17
|
/>
|
|
18
18
|
|
|
19
19
|
<atoms-tabs
|
|
20
20
|
v-else
|
|
21
|
-
v-model="
|
|
21
|
+
v-model="model.configure.type"
|
|
22
22
|
test-id="migrate-select-storage-tabs"
|
|
23
23
|
:items="selectStorageTabs"
|
|
24
24
|
size="small"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
/>
|
|
28
28
|
|
|
29
29
|
<common-wizards-vm-new-migrate-select-storage-configure-batch
|
|
30
|
-
v-show="
|
|
30
|
+
v-show="model.configure.type === 'batch-configure'"
|
|
31
31
|
v-model="model"
|
|
32
32
|
:get-datastore-table-func="props.getDatastoreTableFunc"
|
|
33
33
|
:datastore="props.datastore"
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
</common-wizards-vm-new-migrate-select-storage-configure-batch>
|
|
47
47
|
|
|
48
48
|
<common-wizards-vm-new-migrate-select-storage-configure-disk
|
|
49
|
-
v-show="
|
|
49
|
+
v-show="model.configure.type === 'configure-disk'"
|
|
50
50
|
v-model="isShowSelectedPerDisks"
|
|
51
51
|
v-model:selected-per-disk-keys="selectedPerDiskKeys"
|
|
52
|
-
v-model:active-tab="
|
|
53
|
-
:configure-per-disks="
|
|
52
|
+
v-model:active-tab="model.configure.type"
|
|
53
|
+
:configure-per-disks="model.configure.disks"
|
|
54
54
|
@update-selected-per-disks="onChangePerDiskStorage"
|
|
55
55
|
/>
|
|
56
56
|
|
|
@@ -67,7 +67,6 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
|
67
67
|
import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
|
|
68
68
|
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
69
69
|
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
70
|
-
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
71
70
|
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
72
71
|
import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/interfaces'
|
|
73
72
|
import type { UI_I_MigrateFormLocal } from '~/components/common/wizards/vmNew/migrate/lib/models/interfaces'
|
|
@@ -89,7 +88,6 @@ const emits = defineEmits<{
|
|
|
89
88
|
|
|
90
89
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
91
90
|
|
|
92
|
-
const activeTab = ref<UI_T_VmMigrateSelectStorageTab>('batch-configure')
|
|
93
91
|
const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
94
92
|
vmMigrateSelectStorageTabsFunc(localization.value)
|
|
95
93
|
)
|
|
@@ -99,10 +97,6 @@ const isShowSelectedPerDisks = ref<boolean>(false)
|
|
|
99
97
|
const selectedPerDiskKeys = ref<number[]>([])
|
|
100
98
|
const selectedPerDisks = ref<UI_I_StorageConfigurePerDiskItem[]>([])
|
|
101
99
|
|
|
102
|
-
const configurePerDisksLocal = ref<UI_I_StorageConfigurePerDiskItem[]>(
|
|
103
|
-
props.configurePerDisks
|
|
104
|
-
)
|
|
105
|
-
|
|
106
100
|
const connectedStorageIdLocal = ref<string>('')
|
|
107
101
|
const connectedStorageId = computed<string | null>(
|
|
108
102
|
() => connectedStorageIdLocal.value || props.connectedStorageIdDefault
|
|
@@ -124,7 +118,7 @@ const onChangePerDiskStorage = (
|
|
|
124
118
|
|
|
125
119
|
const onApplyChanges = (): void => {
|
|
126
120
|
/* TODO сделать рефакторинг потом */
|
|
127
|
-
|
|
121
|
+
model.value.configure.disks.forEach((disk) => {
|
|
128
122
|
const selectedDisk = selectedPerDisks.value.find(
|
|
129
123
|
(selected) =>
|
|
130
124
|
selected.virtual_machine === disk.virtual_machine &&
|
|
@@ -143,7 +137,7 @@ const onApplyChanges = (): void => {
|
|
|
143
137
|
})
|
|
144
138
|
|
|
145
139
|
isShowSelectedPerDisks.value = false
|
|
146
|
-
|
|
140
|
+
model.value.configure.type = 'configure-disk'
|
|
147
141
|
selectedPerDisks.value = []
|
|
148
142
|
selectedPerDiskKeys.value = []
|
|
149
143
|
}
|
|
@@ -161,13 +155,13 @@ const checkValidityBlock = (): boolean => {
|
|
|
161
155
|
return false
|
|
162
156
|
}
|
|
163
157
|
|
|
164
|
-
const isActivePerDiskTab =
|
|
158
|
+
const isActivePerDiskTab = model.value.configure.type === 'configure-disk'
|
|
165
159
|
emits('next-step', {
|
|
166
160
|
...model.value,
|
|
167
|
-
tab:
|
|
161
|
+
tab: model.value.configure.type,
|
|
168
162
|
// ...(isActivePerDiskTab && { configureDisks: props.configurePerDisks }),
|
|
169
163
|
configureDisks: isActivePerDiskTab
|
|
170
|
-
?
|
|
164
|
+
? model.value.configure.disks
|
|
171
165
|
: props.configurePerDisks,
|
|
172
166
|
})
|
|
173
167
|
return true
|
|
@@ -176,8 +170,9 @@ const checkValidityBlock = (): boolean => {
|
|
|
176
170
|
watch(
|
|
177
171
|
() => props.configurePerDisks,
|
|
178
172
|
(newValue: UI_I_StorageConfigurePerDiskItem) => {
|
|
179
|
-
|
|
180
|
-
}
|
|
173
|
+
model.value.configure.disks = newValue
|
|
174
|
+
},
|
|
175
|
+
{ immediate: true }
|
|
181
176
|
)
|
|
182
177
|
watch(
|
|
183
178
|
() => props.submit,
|
package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue
CHANGED
|
@@ -30,40 +30,32 @@
|
|
|
30
30
|
|
|
31
31
|
<script lang="ts" setup>
|
|
32
32
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
33
|
-
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/
|
|
33
|
+
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vmNew/migrate/select/storage/lib/models/types'
|
|
34
|
+
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces'
|
|
34
35
|
|
|
35
36
|
const props = defineProps<{
|
|
36
|
-
|
|
37
|
-
activeTab: UI_T_VmMigrateSelectStorageTab
|
|
38
|
-
connectedStorageIdLocal: string
|
|
39
|
-
data: any[]
|
|
40
|
-
}>()
|
|
41
|
-
const emits = defineEmits<{
|
|
42
|
-
(event: 'update:model-value', value: boolean): void
|
|
43
|
-
(event: 'update:active-tab', value: UI_T_VmMigrateSelectStorageTab): void
|
|
44
|
-
(event: 'update:connected-storage-id-local', value: string): void
|
|
37
|
+
data: UI_I_StorageConfigurePerDiskItem[]
|
|
45
38
|
}>()
|
|
39
|
+
const modelShowSelectedPerDisks = defineModel<boolean>()
|
|
40
|
+
const modelConnectedStorageIdLocal = defineModel<string>(
|
|
41
|
+
'connectedStorageIdLocal'
|
|
42
|
+
)
|
|
43
|
+
const modelActiveTab = defineModel<UI_T_VmMigrateSelectStorageTab>('activeTab')
|
|
46
44
|
|
|
47
45
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
48
46
|
|
|
49
47
|
const normalizedData = computed<string[]>(() =>
|
|
50
|
-
props.data.map(
|
|
48
|
+
props.data.map(
|
|
49
|
+
(disk: UI_I_StorageConfigurePerDiskItem) =>
|
|
50
|
+
`${disk.virtual_machine} | ${disk.file}`
|
|
51
|
+
)
|
|
51
52
|
)
|
|
52
53
|
|
|
53
54
|
const onGoBack = (): void => {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
modelShowSelectedPerDisks.value = false
|
|
56
|
+
modelConnectedStorageIdLocal.value = ''
|
|
57
|
+
modelActiveTab.value = 'configure-disk'
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
const activeTabValue = computed<UI_T_VmMigrateSelectStorageTab>({
|
|
60
|
-
get() {
|
|
61
|
-
return props.activeTab
|
|
62
|
-
},
|
|
63
|
-
set(newValue: UI_T_VmMigrateSelectStorageTab) {
|
|
64
|
-
emits('update:active-tab', newValue)
|
|
65
|
-
},
|
|
66
|
-
})
|
|
67
59
|
</script>
|
|
68
60
|
|
|
69
61
|
<style lang="scss" scoped>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.115",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
|
36
36
|
"date-fns": "^2.29.3",
|
|
37
37
|
"bfg-nuxt-3-graph": "1.0.15",
|
|
38
|
-
"bfg-uikit": "1.0.
|
|
38
|
+
"bfg-uikit": "1.0.97",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
40
|
"prettier-eslint": "^15.0.1"
|
|
41
41
|
}
|