bfg-common 1.3.339 → 1.3.341
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/details/lib/models/interfaces.ts +1 -0
- package/components/common/wizards/datastore/add/Add.vue +4 -0
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +0 -7
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +4 -1
- package/components/common/wizards/datastore/add/nfs/accessibility/lib/config/tabsPannel.ts +1 -1
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +4 -4
- package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +86 -78
- package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +184 -165
- package/package.json +1 -1
|
@@ -283,11 +283,15 @@ const saveChangesAndNextNfs = (event: any, next = true): void => {
|
|
|
283
283
|
nfs.server = event.server
|
|
284
284
|
nfs.hosts = event.hosts
|
|
285
285
|
|
|
286
|
+
// TODO refactoring
|
|
287
|
+
const hostsName = props.nfsHosts.filter(host => event.hosts.includes(host.id)).map(host => host.name)
|
|
288
|
+
|
|
286
289
|
dataReadyView.value = constructDataReadyViewFunc(
|
|
287
290
|
localization.value,
|
|
288
291
|
'nfs',
|
|
289
292
|
{
|
|
290
293
|
...event,
|
|
294
|
+
hosts: hostsName,
|
|
291
295
|
version: nfsVersion.value,
|
|
292
296
|
},
|
|
293
297
|
isWizardModeForSphere.value
|
|
@@ -79,13 +79,6 @@ const showHostAccessibility = computed<boolean>(() => {
|
|
|
79
79
|
return props.mode === 'sphere' && props.stepPosition === 3
|
|
80
80
|
})
|
|
81
81
|
|
|
82
|
-
watch(
|
|
83
|
-
() => props.stepPosition,
|
|
84
|
-
(newValue: number) => {
|
|
85
|
-
console.log(showHostAccessibility.value, newValue, 1111, props.mode)
|
|
86
|
-
}
|
|
87
|
-
)
|
|
88
|
-
|
|
89
82
|
watch(nfsVersion, (newValue: UI_T_NfsType) => {
|
|
90
83
|
emits('change-nfs-version', newValue)
|
|
91
84
|
})
|
|
@@ -50,7 +50,10 @@ const emits = defineEmits<{
|
|
|
50
50
|
|
|
51
51
|
const activeTab = ref<T_HostsAccessibilityTab>('compatible-hosts')
|
|
52
52
|
const tabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
53
|
-
hostAccessibilityTabsFunc(localization.value, [
|
|
53
|
+
hostAccessibilityTabsFunc(localization.value, [
|
|
54
|
+
(props.hosts?.items?.length || 0) + '',
|
|
55
|
+
'0',
|
|
56
|
+
])
|
|
54
57
|
)
|
|
55
58
|
|
|
56
59
|
// const dataTable = computed(() => hostsAccessibilityTablesFunc(activeTab.value))
|
|
@@ -15,8 +15,8 @@ const getItems = (
|
|
|
15
15
|
localization: UI_I_Localization
|
|
16
16
|
): [string, boolean, string, string][] => {
|
|
17
17
|
return [
|
|
18
|
-
[localization.host, true, '
|
|
19
|
-
[localization.cluster, true, '
|
|
18
|
+
[localization.host, true, '300px', compatibleHostsTableKeys[0]],
|
|
19
|
+
[localization.cluster, true, '300px', compatibleHostsTableKeys[1]],
|
|
20
20
|
]
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -31,11 +31,11 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
|
31
31
|
export const bodyItems = (
|
|
32
32
|
data: I_CompatibleHostsTable[]
|
|
33
33
|
): UI_I_BodyItem[][] => {
|
|
34
|
-
console.log(data, 11111)
|
|
35
34
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
36
35
|
data.forEach((item: I_CompatibleHostsTable, key) => {
|
|
37
36
|
const hostData = {
|
|
38
|
-
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
iconClassName: `vsphere-icon-${hostIconByState[item.state]}`,
|
|
39
39
|
}
|
|
40
40
|
const clusterData = {
|
|
41
41
|
iconClassName: `vsphere-icon-${clusterIconByState[1]}`,
|
|
@@ -1,78 +1,86 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="ready-complete">
|
|
3
|
-
<div class="ready-complete__desc">{{ localization.readyCompleteDesc }}</div>
|
|
4
|
-
|
|
5
|
-
<common-details-list :items="properties" class="ready-complete__list list">
|
|
6
|
-
<template #default="{ item }">
|
|
7
|
-
<common-details-item :has-children="true" open-by-default>
|
|
8
|
-
<template #stackBlockKey>
|
|
9
|
-
<span class="list__labels">{{
|
|
10
|
-
localization.chosenDatastoreName
|
|
11
|
-
}}</span>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<template #stackChildren>
|
|
15
|
-
<template
|
|
16
|
-
v-for="(item2, key2) in item.items"
|
|
17
|
-
:key="`${item2}_${key2}`"
|
|
18
|
-
>
|
|
19
|
-
<common-details-item
|
|
20
|
-
:has-children="false"
|
|
21
|
-
class="list__default-style"
|
|
22
|
-
>
|
|
23
|
-
<template #stackBlockKey>
|
|
24
|
-
<div>
|
|
25
|
-
{{ item2.label }}
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
<template #stackBlockContent>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</template>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ready-complete">
|
|
3
|
+
<div class="ready-complete__desc">{{ localization.readyCompleteDesc }}</div>
|
|
4
|
+
|
|
5
|
+
<common-details-list :items="properties" class="ready-complete__list list">
|
|
6
|
+
<template #default="{ item }">
|
|
7
|
+
<common-details-item :has-children="true" open-by-default>
|
|
8
|
+
<template #stackBlockKey>
|
|
9
|
+
<span class="list__labels">{{
|
|
10
|
+
localization.chosenDatastoreName
|
|
11
|
+
}}</span>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<template #stackChildren>
|
|
15
|
+
<template
|
|
16
|
+
v-for="(item2, key2) in item.items"
|
|
17
|
+
:key="`${item2}_${key2}`"
|
|
18
|
+
>
|
|
19
|
+
<common-details-item
|
|
20
|
+
:has-children="false"
|
|
21
|
+
class="list__default-style"
|
|
22
|
+
>
|
|
23
|
+
<template #stackBlockKey>
|
|
24
|
+
<div>
|
|
25
|
+
{{ item2.label }}
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<template #stackBlockContent>
|
|
29
|
+
<div v-if="item2.data">
|
|
30
|
+
<span v-for="item3 in item2.data">
|
|
31
|
+
<span class="vsphere-icon-host"></span>
|
|
32
|
+
<span>{{ item3 }}</span>
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
<span v-else>
|
|
36
|
+
{{ item2.value }}
|
|
37
|
+
</span>
|
|
38
|
+
</template>
|
|
39
|
+
</common-details-item>
|
|
40
|
+
</template>
|
|
41
|
+
</template>
|
|
42
|
+
</common-details-item>
|
|
43
|
+
</template>
|
|
44
|
+
</common-details-list>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script lang="ts" setup>
|
|
49
|
+
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
50
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
51
|
+
|
|
52
|
+
const props = defineProps<{
|
|
53
|
+
dataReadyView: UI_I_DetailsItem[]
|
|
54
|
+
}>()
|
|
55
|
+
// console.log(props)
|
|
56
|
+
|
|
57
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
58
|
+
|
|
59
|
+
const properties = computed<UI_I_DetailsItem[]>(() => props.dataReadyView)
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style lang="scss" scoped>
|
|
63
|
+
@import '~/assets/scss/common/mixins.scss';
|
|
64
|
+
.ready-complete {
|
|
65
|
+
&__list {
|
|
66
|
+
@include flex($dir: column);
|
|
67
|
+
padding: 12px 0;
|
|
68
|
+
row-gap: 15px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
.list {
|
|
72
|
+
&__labels {
|
|
73
|
+
@include text($fs: 13px, $fw: 700);
|
|
74
|
+
}
|
|
75
|
+
:deep(.list__default-style) {
|
|
76
|
+
.stack-block {
|
|
77
|
+
&__label {
|
|
78
|
+
align-items: flex-start;
|
|
79
|
+
}
|
|
80
|
+
&-content {
|
|
81
|
+
white-space: pre-line;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</style>
|
package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts
CHANGED
|
@@ -1,165 +1,184 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
3
|
-
import { UI_I_LunDisk } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
4
|
-
import { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
5
|
-
import { UI_I_ReadyDataForLocal } from '~/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces'
|
|
6
|
-
|
|
7
|
-
const constructLunDiskItems = (disks: any): string => {
|
|
8
|
-
const { $binary } = useNuxtApp()
|
|
9
|
-
|
|
10
|
-
let result = ''
|
|
11
|
-
disks.forEach((disk: UI_I_LunDisk) => {
|
|
12
|
-
const capacity = $binary.round(disk.capacity)
|
|
13
|
-
result += `${disk.name} - ${capacity} \n`
|
|
14
|
-
})
|
|
15
|
-
return result
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const nfsDetailsFunc = (
|
|
19
|
-
localization: UI_I_Localization,
|
|
20
|
-
data: any
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
//
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
3
|
+
import { UI_I_LunDisk } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
4
|
+
import { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
5
|
+
import { UI_I_ReadyDataForLocal } from '~/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces'
|
|
6
|
+
|
|
7
|
+
const constructLunDiskItems = (disks: any): string => {
|
|
8
|
+
const { $binary } = useNuxtApp()
|
|
9
|
+
|
|
10
|
+
let result = ''
|
|
11
|
+
disks.forEach((disk: UI_I_LunDisk) => {
|
|
12
|
+
const capacity = $binary.round(disk.capacity)
|
|
13
|
+
result += `${disk.name} - ${capacity} \n`
|
|
14
|
+
})
|
|
15
|
+
return result
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const nfsDetailsFunc = (
|
|
19
|
+
localization: UI_I_Localization,
|
|
20
|
+
data: any,
|
|
21
|
+
isSphereWizard: boolean
|
|
22
|
+
): UI_I_DetailsItem[] => {
|
|
23
|
+
const { name, server, folder, version, hosts } = data
|
|
24
|
+
// const accessMode = readonly ? 'Read-only' : 'Read-write'
|
|
25
|
+
|
|
26
|
+
const details: UI_I_DetailsItem[] = [
|
|
27
|
+
{
|
|
28
|
+
label: localization.vmfsVersion,
|
|
29
|
+
value: '',
|
|
30
|
+
items: [
|
|
31
|
+
{
|
|
32
|
+
label: localization.version,
|
|
33
|
+
value: version.toUpperCase(),
|
|
34
|
+
items: [],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
actions: [],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: localization.nameAndConfiguration,
|
|
41
|
+
value: '',
|
|
42
|
+
items: [
|
|
43
|
+
{
|
|
44
|
+
label: localization.datastoreName,
|
|
45
|
+
value: name,
|
|
46
|
+
items: [],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: localization.server,
|
|
50
|
+
value: server,
|
|
51
|
+
items: [],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: localization.folder,
|
|
55
|
+
value: folder,
|
|
56
|
+
items: [],
|
|
57
|
+
},
|
|
58
|
+
// {
|
|
59
|
+
// label: localization.accessMode,
|
|
60
|
+
// value: accessMode,
|
|
61
|
+
// items: [],
|
|
62
|
+
// },
|
|
63
|
+
],
|
|
64
|
+
actions: [],
|
|
65
|
+
},
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
if (isSphereWizard) {
|
|
69
|
+
details.push({
|
|
70
|
+
label: localization.hostsAccessibility,
|
|
71
|
+
value: '',
|
|
72
|
+
items: [
|
|
73
|
+
{
|
|
74
|
+
label: localization.hosts,
|
|
75
|
+
value: '',
|
|
76
|
+
data: hosts,
|
|
77
|
+
items: [],
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
actions: [],
|
|
81
|
+
},)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return details
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const localDetailsFunc = (
|
|
88
|
+
localization: UI_I_Localization,
|
|
89
|
+
event: UI_I_ReadyDataForLocal | string,
|
|
90
|
+
isSphereWizard: boolean
|
|
91
|
+
): UI_I_DetailsItem[] => {
|
|
92
|
+
const data = [
|
|
93
|
+
{
|
|
94
|
+
label: localization.selectName,
|
|
95
|
+
value: '',
|
|
96
|
+
items: [
|
|
97
|
+
{
|
|
98
|
+
label: localization.datastoreName,
|
|
99
|
+
value: isSphereWizard ? event.name : event,
|
|
100
|
+
items: [],
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
actions: [],
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
if (isSphereWizard) {
|
|
108
|
+
data[0].items.push({
|
|
109
|
+
label: localization.host,
|
|
110
|
+
value: event.host,
|
|
111
|
+
items: [],
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
return data
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const sharedStormDetailsFunc = (
|
|
118
|
+
localization: UI_I_Localization,
|
|
119
|
+
data: { name: string; lunDisk: string[] } // пока так ставляем тип но надо будет поменять когда будем добавлять осталние настройки
|
|
120
|
+
): UI_I_DetailsItem[] => {
|
|
121
|
+
const { name, lunDisk } = data
|
|
122
|
+
|
|
123
|
+
return [
|
|
124
|
+
{
|
|
125
|
+
label: localization.nameAndDeviceSelection,
|
|
126
|
+
value: '',
|
|
127
|
+
items: [
|
|
128
|
+
{
|
|
129
|
+
label: localization.datastoreName,
|
|
130
|
+
value: name,
|
|
131
|
+
items: [],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: localization.diskLun,
|
|
135
|
+
value: constructLunDiskItems(lunDisk),
|
|
136
|
+
items: [],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
actions: [],
|
|
140
|
+
},
|
|
141
|
+
// {
|
|
142
|
+
// label: localization.partitionConfiguration,
|
|
143
|
+
// value: '',
|
|
144
|
+
// items: [
|
|
145
|
+
// {
|
|
146
|
+
// label: localization.method,
|
|
147
|
+
// value: 'None',
|
|
148
|
+
// items: [],
|
|
149
|
+
// },
|
|
150
|
+
// {
|
|
151
|
+
// label: localization.partitionFormat,
|
|
152
|
+
// value: 'None',
|
|
153
|
+
// items: [],
|
|
154
|
+
// },
|
|
155
|
+
// {
|
|
156
|
+
// label: localization.blockSize,
|
|
157
|
+
// value: 'None',
|
|
158
|
+
// items: [],
|
|
159
|
+
// },
|
|
160
|
+
// {
|
|
161
|
+
// label: localization.spaceReclamationGranularity,
|
|
162
|
+
// value: 'None',
|
|
163
|
+
// items: [],
|
|
164
|
+
// },
|
|
165
|
+
// ],
|
|
166
|
+
// actions: [],
|
|
167
|
+
// }, /* TODO данные с нее пока никуда не вставляем */
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export const constructDataReadyViewFunc = <T>(
|
|
172
|
+
localization: UI_I_Localization,
|
|
173
|
+
type: UI_T_DatastoreType,
|
|
174
|
+
data: T,
|
|
175
|
+
isSphereWizard: boolean
|
|
176
|
+
): UI_I_DetailsItem[] => {
|
|
177
|
+
const details = {
|
|
178
|
+
local: localDetailsFunc,
|
|
179
|
+
'shared-storm': sharedStormDetailsFunc,
|
|
180
|
+
nfs: nfsDetailsFunc,
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return details[type](localization, data, isSphereWizard)
|
|
184
|
+
}
|