bfg-common 1.5.112 → 1.5.114
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/wizards/datastore/add/New.vue +2 -1
- package/components/common/wizards/datastore/add/Old.vue +1 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/new/New.vue +15 -20
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/new/lib/config/compatibleTable.ts +3 -10
- package/components/common/wizards/datastore/add/steps/readyComplete/ReadyComplete.vue +4 -2
- package/components/common/wizards/datastore/add/steps/readyComplete/lib/config/propertiesDetails.ts +20 -22
- package/package.json +1 -1
|
@@ -146,8 +146,9 @@
|
|
|
146
146
|
<common-wizards-datastore-add-steps-ready-complete
|
|
147
147
|
v-if="selectedStep.id === dynamicSteps.readyComplete"
|
|
148
148
|
:form="formModelLocal"
|
|
149
|
-
:hosts="props.nfsHosts"
|
|
150
149
|
:project="props.project"
|
|
150
|
+
:hosts="props.nfsHosts"
|
|
151
|
+
:host-id="props.hostId"
|
|
151
152
|
/>
|
|
152
153
|
</template>
|
|
153
154
|
</ui-wizard-block>
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="host-accessibility-table">
|
|
3
|
-
<h2>
|
|
4
|
-
{{ tableHeadline }}
|
|
5
|
-
</h2>
|
|
6
|
-
|
|
7
3
|
<ui-data-table
|
|
8
4
|
test-id="accessibility-table"
|
|
9
5
|
:data="data"
|
|
@@ -12,6 +8,7 @@
|
|
|
12
8
|
:total-pages="props.totalPages"
|
|
13
9
|
:total-items="props.totalItems"
|
|
14
10
|
:texts="texts"
|
|
11
|
+
:default-layout="false"
|
|
15
12
|
class="accessibility-host-table"
|
|
16
13
|
size="sm"
|
|
17
14
|
@select-row="onSelectRow"
|
|
@@ -30,14 +27,14 @@
|
|
|
30
27
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
28
|
import type {
|
|
32
29
|
UI_I_DataTable,
|
|
33
|
-
UI_I_DataTableHeader,
|
|
34
30
|
UI_I_DataTableBody,
|
|
31
|
+
UI_I_DataTableHeader,
|
|
35
32
|
UI_I_TableTexts,
|
|
36
33
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
37
34
|
import {
|
|
38
|
-
options,
|
|
39
|
-
getHeaderDataFunc,
|
|
40
35
|
getBodyDataFunc,
|
|
36
|
+
getHeaderDataFunc,
|
|
37
|
+
options,
|
|
41
38
|
} from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/new/lib/config/compatibleTable'
|
|
42
39
|
import { UI_I_CompatibleHostsTableItem } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
43
40
|
|
|
@@ -90,25 +87,23 @@ watch(
|
|
|
90
87
|
{ deep: true, immediate: true }
|
|
91
88
|
)
|
|
92
89
|
|
|
93
|
-
const tableHeadline = computed<string>(() => {
|
|
94
|
-
const { selected } = localization.value.common
|
|
95
|
-
return ` ${props.totalItems} ${selected}`
|
|
96
|
-
})
|
|
97
|
-
|
|
98
90
|
const onSelectRow = (value: UI_I_DataTableBody[]): void => {
|
|
99
|
-
|
|
100
|
-
selectedHostsIdLocal.value = value?.[0].row
|
|
91
|
+
selectedHostsIdLocal.value = value.map((item) => item.row)
|
|
101
92
|
}
|
|
102
93
|
</script>
|
|
103
94
|
|
|
104
95
|
<style lang="scss" scoped>
|
|
105
96
|
.host-accessibility-table {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
97
|
+
:deep(.bottom-grid-content) {
|
|
98
|
+
border: 1px solid var(--select-storage-border-color);
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
padding: 12px;
|
|
101
|
+
background-color: var(--select-storage-bg-color);
|
|
102
|
+
}
|
|
103
|
+
:deep(.select-row-item) {
|
|
104
|
+
background-color: var(--select-storage-bg-color);
|
|
105
|
+
}
|
|
106
|
+
:deep(.table-container .table-title) {
|
|
112
107
|
margin-bottom: 12px;
|
|
113
108
|
}
|
|
114
109
|
.icon {
|
|
@@ -37,21 +37,14 @@ export const getHeaderDataFunc = (
|
|
|
37
37
|
export const options: UI_I_DataTableOptions = {
|
|
38
38
|
perPageOptions: [{ text: '10', value: 100, default: true }],
|
|
39
39
|
isSelectable: true,
|
|
40
|
-
|
|
40
|
+
selectType: 'checkbox',
|
|
41
41
|
showPagination: false,
|
|
42
|
-
showPaginationOnTop: false,
|
|
43
42
|
showPageInfo: false,
|
|
44
43
|
isSortable: true,
|
|
45
44
|
server: true,
|
|
46
45
|
isResizable: true,
|
|
47
|
-
|
|
48
|
-
showSelectedRows: false,
|
|
46
|
+
showSelectedRows: true,
|
|
49
47
|
showColumnManager: false,
|
|
50
|
-
withActions: false,
|
|
51
|
-
selectType: 'checkbox',
|
|
52
|
-
inBlock: true,
|
|
53
|
-
showExport: false,
|
|
54
|
-
withCollapse: false,
|
|
55
48
|
}
|
|
56
49
|
|
|
57
50
|
export const getBodyDataFunc = (
|
|
@@ -59,7 +52,7 @@ export const getBodyDataFunc = (
|
|
|
59
52
|
): UI_I_DataTableBody[] => {
|
|
60
53
|
return bodyData.map((host, _index: number) => {
|
|
61
54
|
return {
|
|
62
|
-
row:
|
|
55
|
+
row: host.id as any,
|
|
63
56
|
collapse: false,
|
|
64
57
|
isHiddenCollapse: false,
|
|
65
58
|
collapseToggle: false,
|
|
@@ -19,9 +19,10 @@ import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore
|
|
|
19
19
|
import { constructDataReadyViewFunc } from '~/components/common/wizards/datastore/add/steps/readyComplete/lib/config/propertiesDetails'
|
|
20
20
|
|
|
21
21
|
const props = defineProps<{
|
|
22
|
+
project: UI_T_Project
|
|
22
23
|
form: UI_I_CreateDatastoreForm
|
|
23
24
|
hosts: UI_I_CompatibleHosts
|
|
24
|
-
|
|
25
|
+
hostId: string
|
|
25
26
|
}>()
|
|
26
27
|
|
|
27
28
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -34,7 +35,8 @@ const dataReadyView = computed<UI_I_DetailsItem>(() =>
|
|
|
34
35
|
localization.value,
|
|
35
36
|
props.form,
|
|
36
37
|
props.project,
|
|
37
|
-
props.hosts
|
|
38
|
+
props.hosts,
|
|
39
|
+
props.hostId
|
|
38
40
|
)
|
|
39
41
|
)
|
|
40
42
|
</script>
|
package/components/common/wizards/datastore/add/steps/readyComplete/lib/config/propertiesDetails.ts
CHANGED
|
@@ -5,18 +5,6 @@ import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/
|
|
|
5
5
|
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
6
6
|
import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
7
7
|
|
|
8
|
-
// const constructLunDiskItems = (
|
|
9
|
-
// disks: UI_I_CreateStorageLunDiskItem[]
|
|
10
|
-
// ): string => {
|
|
11
|
-
// const { $binary } = useNuxtApp() as any
|
|
12
|
-
//
|
|
13
|
-
// let result = ''
|
|
14
|
-
// disks.forEach((disk: UI_I_CreateStorageLunDiskItem) => {
|
|
15
|
-
// const capacity = $binary.round(disk.capacity_mb)
|
|
16
|
-
// result += `${disk.name} - ${capacity} \n`
|
|
17
|
-
// })
|
|
18
|
-
// return result
|
|
19
|
-
// }
|
|
20
8
|
const constructLunDiskItems = (
|
|
21
9
|
disks: UI_I_CreateStorageLunDiskItem[]
|
|
22
10
|
): { label: string; iconClassName?: string }[] => {
|
|
@@ -35,7 +23,8 @@ const nfsDetailsFunc = (
|
|
|
35
23
|
localization: UI_I_Localization,
|
|
36
24
|
data: UI_I_CreateDatastoreForm,
|
|
37
25
|
project: UI_T_Project,
|
|
38
|
-
nfsHosts: UI_I_CompatibleHosts
|
|
26
|
+
nfsHosts: UI_I_CompatibleHosts,
|
|
27
|
+
hostId: string
|
|
39
28
|
): UI_I_DetailsItem[] => {
|
|
40
29
|
const { name, server, folder, version, hosts } = data
|
|
41
30
|
// const accessMode = readonly ? 'Read-only' : 'Read-write'
|
|
@@ -91,11 +80,14 @@ const nfsDetailsFunc = (
|
|
|
91
80
|
},
|
|
92
81
|
]
|
|
93
82
|
|
|
94
|
-
if (project === 'sphere') {
|
|
95
|
-
const
|
|
83
|
+
if (project === 'sphere' && !hostId) {
|
|
84
|
+
const hostsData = nfsHosts
|
|
96
85
|
? nfsHosts.items
|
|
97
|
-
.filter((host) =>
|
|
98
|
-
.map((host) =>
|
|
86
|
+
.filter((host) => hosts.includes(host.id))
|
|
87
|
+
.map((host) => ({
|
|
88
|
+
label: host.host,
|
|
89
|
+
iconClassName: 'vsphere-icon-host',
|
|
90
|
+
}))
|
|
99
91
|
: []
|
|
100
92
|
details.push({
|
|
101
93
|
label: localization.common.hostsAccessibility,
|
|
@@ -103,8 +95,7 @@ const nfsDetailsFunc = (
|
|
|
103
95
|
items: [
|
|
104
96
|
{
|
|
105
97
|
label: localization.common.hosts,
|
|
106
|
-
value:
|
|
107
|
-
data: hostsNames,
|
|
98
|
+
value: hostsData as any,
|
|
108
99
|
items: [],
|
|
109
100
|
testId: 'view-hosts-name-in-complete',
|
|
110
101
|
iconClassName: 'vsphere-icon-host',
|
|
@@ -136,7 +127,7 @@ const sharedStormDetailsFunc = (
|
|
|
136
127
|
},
|
|
137
128
|
{
|
|
138
129
|
label: localization.common.diskLun,
|
|
139
|
-
value: constructLunDiskItems(dev_names),
|
|
130
|
+
value: constructLunDiskItems(dev_names) as any,
|
|
140
131
|
items: [],
|
|
141
132
|
testId: 'view-selected-lun-disks-in-complete',
|
|
142
133
|
},
|
|
@@ -150,12 +141,19 @@ export const constructDataReadyViewFunc = (
|
|
|
150
141
|
localization: UI_I_Localization,
|
|
151
142
|
data: UI_I_CreateDatastoreForm,
|
|
152
143
|
project: UI_T_Project,
|
|
153
|
-
nfsHosts: UI_I_CompatibleHosts
|
|
144
|
+
nfsHosts: UI_I_CompatibleHosts,
|
|
145
|
+
hostId: string
|
|
154
146
|
): UI_I_DetailsItem[] => {
|
|
155
147
|
const details = {
|
|
156
148
|
2: sharedStormDetailsFunc,
|
|
157
149
|
4: nfsDetailsFunc,
|
|
158
150
|
}
|
|
159
151
|
|
|
160
|
-
return details[data.type_code as 2 | 4](
|
|
152
|
+
return details[data.type_code as 2 | 4](
|
|
153
|
+
localization,
|
|
154
|
+
data,
|
|
155
|
+
project,
|
|
156
|
+
nfsHosts,
|
|
157
|
+
hostId
|
|
158
|
+
)
|
|
161
159
|
}
|