bfg-common 1.3.333 → 1.3.335
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/Add.vue +423 -395
- package/components/common/wizards/datastore/add/lib/config/stepItems.ts +191 -170
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +107 -94
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +111 -98
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +1 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -75
- package/package.json +1 -1
|
@@ -1,98 +1,111 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<atoms-alert
|
|
4
|
-
v-show="errors.length"
|
|
5
|
-
test-id="accessibility"
|
|
6
|
-
status="alert-danger"
|
|
7
|
-
:items="errors"
|
|
8
|
-
@remove="removeValidationErrors"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<div>
|
|
12
|
-
<atoms-tabs
|
|
13
|
-
v-model="activeTab"
|
|
14
|
-
test-id="accessibility"
|
|
15
|
-
:items="tabs"
|
|
16
|
-
size="small"
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
<div>
|
|
20
|
-
<common-wizards-datastore-add-nfs-accessibility-tables-view
|
|
21
|
-
v-model:selected-row="selectedHost"
|
|
22
|
-
:data-table="dataTable?.items || []"
|
|
23
|
-
:total-items="dataTable?.total_items || 0"
|
|
24
|
-
:total-pages="dataTable?.total_pages || 1"
|
|
25
|
-
:pagination="pagination"
|
|
26
|
-
:table-type="activeTab"
|
|
27
|
-
@pagination="updatePagination"
|
|
28
|
-
@sort="sortTable"
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script lang="ts" setup>
|
|
35
|
-
import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
36
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
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
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="errors.length"
|
|
5
|
+
test-id="accessibility"
|
|
6
|
+
status="alert-danger"
|
|
7
|
+
:items="errors"
|
|
8
|
+
@remove="removeValidationErrors"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<div>
|
|
12
|
+
<atoms-tabs
|
|
13
|
+
v-model="activeTab"
|
|
14
|
+
test-id="accessibility"
|
|
15
|
+
:items="tabs"
|
|
16
|
+
size="small"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
<div>
|
|
20
|
+
<common-wizards-datastore-add-nfs-accessibility-tables-view
|
|
21
|
+
v-model:selected-row="selectedHost"
|
|
22
|
+
:data-table="dataTable?.items || []"
|
|
23
|
+
:total-items="dataTable?.total_items || 0"
|
|
24
|
+
:total-pages="dataTable?.total_pages || 1"
|
|
25
|
+
:pagination="pagination"
|
|
26
|
+
:table-type="activeTab"
|
|
27
|
+
@pagination="updatePagination"
|
|
28
|
+
@sort="sortTable"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script lang="ts" setup>
|
|
35
|
+
import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
36
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
37
|
+
import { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
38
|
+
import { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
39
|
+
import { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
|
|
40
|
+
import { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
41
|
+
import { hostAccessibilityTabsFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/config/tabsPannel'
|
|
42
|
+
// import { hostsAccessibilityTablesFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems'
|
|
43
|
+
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
hostAccessibilitySubmit: number
|
|
46
|
+
datacenterHosts?: UI_I_SelectHostOptions[]
|
|
47
|
+
}>()
|
|
48
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
49
|
+
const emits = defineEmits<{
|
|
50
|
+
(event: 'next', value: string): void
|
|
51
|
+
}>()
|
|
52
|
+
|
|
53
|
+
const activeTab = ref<T_HostsAccessibilityTab>('compatible-hosts')
|
|
54
|
+
const tabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
55
|
+
hostAccessibilityTabsFunc(localization.value, ['5', '3'])
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
console.log(444444)
|
|
59
|
+
|
|
60
|
+
// const dataTable = computed(() => hostsAccessibilityTablesFunc(activeTab.value))
|
|
61
|
+
// TODO refactoring
|
|
62
|
+
const dataTable = computed<API_UI_I_DataTable<UI_I_SelectHostOptions[]>>(() => {
|
|
63
|
+
return {
|
|
64
|
+
items: props.datacenterHosts,
|
|
65
|
+
total_items: props.datacenterHosts.length,
|
|
66
|
+
total_pages: 1,
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
const pagination = ref<UI_I_Pagination>({
|
|
71
|
+
page: 1,
|
|
72
|
+
pageSize: 35,
|
|
73
|
+
})
|
|
74
|
+
const sort = ref<string | null>(null)
|
|
75
|
+
|
|
76
|
+
const selectedHost = ref<number[]>([])
|
|
77
|
+
|
|
78
|
+
const updatePagination = (event: UI_I_Pagination): void => {
|
|
79
|
+
pagination.value = event
|
|
80
|
+
}
|
|
81
|
+
const sortTable = (event: string): void => {
|
|
82
|
+
sort.value = event
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const errors = ref<string[]>([])
|
|
86
|
+
|
|
87
|
+
const showValidationErrors = (text: string): void => {
|
|
88
|
+
errors.value = [text]
|
|
89
|
+
}
|
|
90
|
+
const removeValidationErrors = (): void => {
|
|
91
|
+
errors.value = []
|
|
92
|
+
}
|
|
93
|
+
const submit = async () => {
|
|
94
|
+
if (!selectedHost.value.length) {
|
|
95
|
+
const text = localization.value.selectLeastEntityContinue
|
|
96
|
+
showValidationErrors(text)
|
|
97
|
+
return
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
removeValidationErrors()
|
|
101
|
+
emits('next', '')
|
|
102
|
+
}
|
|
103
|
+
watch(
|
|
104
|
+
() => props.hostAccessibilitySubmit,
|
|
105
|
+
() => {
|
|
106
|
+
submit()
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style lang="scss" scoped></style>
|
|
@@ -26,6 +26,7 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export const bodyItems = (data: I_CompatibleHostsTable[]): UI_I_BodyItem[][] => {
|
|
29
|
+
console.log(data, 11111);
|
|
29
30
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
30
31
|
data.forEach((item: I_CompatibleHostsTable, key) => {
|
|
31
32
|
const hostData = {
|
|
@@ -1,75 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
I_CompatibleHostsTable,
|
|
3
|
-
I_IncompatibleHostsTable,
|
|
4
|
-
} from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
|
|
5
|
-
import { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
|
|
6
|
-
import { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
7
|
-
|
|
8
|
-
const compatibleHostsTable: API_UI_I_DataTable<I_CompatibleHostsTable[]> = {
|
|
9
|
-
items: [
|
|
10
|
-
{
|
|
11
|
-
id: 1,
|
|
12
|
-
host: 'esxi0.иридиум',
|
|
13
|
-
cluster: 'Cluster00',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: 2,
|
|
17
|
-
host: ' esxi0.иридиум',
|
|
18
|
-
cluster: 'Cluster00',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: 3,
|
|
22
|
-
host: 'esxi3.иридиум',
|
|
23
|
-
cluster: 'Cluster00',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 4,
|
|
27
|
-
host: 'esxi4.иридиум',
|
|
28
|
-
cluster: 'Cluster00',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: 5,
|
|
32
|
-
host: 'esxi1.иридиум',
|
|
33
|
-
cluster: 'Cluster01',
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
total_items: 5,
|
|
37
|
-
total_pages: 1,
|
|
38
|
-
}
|
|
39
|
-
const incompatibleHostsTable: API_UI_I_DataTable<I_IncompatibleHostsTable[]> = {
|
|
40
|
-
items: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 3,
|
|
57
|
-
host: 'esxi0.иридиум',
|
|
58
|
-
host_incompatibility_reason:
|
|
59
|
-
'Kerberos is not supported as host is not in AD domain',
|
|
60
|
-
cluster: 'Cluster00',
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
total_items: 3,
|
|
64
|
-
total_pages: 1,
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export { incompatibleHostsTable, compatibleHostsTable }
|
|
68
|
-
export const hostsAccessibilityTablesFunc = (type: T_HostsAccessibilityTab) => {
|
|
69
|
-
const hostItems = {
|
|
70
|
-
'compatible-hosts': compatibleHostsTable,
|
|
71
|
-
'incompatible-hosts': incompatibleHostsTable,
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return hostItems[type]
|
|
75
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
I_CompatibleHostsTable,
|
|
3
|
+
I_IncompatibleHostsTable,
|
|
4
|
+
} from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
|
|
5
|
+
import { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
|
|
6
|
+
import { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
7
|
+
|
|
8
|
+
const compatibleHostsTable: API_UI_I_DataTable<I_CompatibleHostsTable[]> = {
|
|
9
|
+
items: [
|
|
10
|
+
{
|
|
11
|
+
id: 1,
|
|
12
|
+
host: 'esxi0.иридиум',
|
|
13
|
+
cluster: 'Cluster00',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 2,
|
|
17
|
+
host: ' esxi0.иридиум',
|
|
18
|
+
cluster: 'Cluster00',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 3,
|
|
22
|
+
host: 'esxi3.иридиум',
|
|
23
|
+
cluster: 'Cluster00',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 4,
|
|
27
|
+
host: 'esxi4.иридиум',
|
|
28
|
+
cluster: 'Cluster00',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: 5,
|
|
32
|
+
host: 'esxi1.иридиум',
|
|
33
|
+
cluster: 'Cluster01',
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
total_items: 5,
|
|
37
|
+
total_pages: 1,
|
|
38
|
+
}
|
|
39
|
+
const incompatibleHostsTable: API_UI_I_DataTable<I_IncompatibleHostsTable[]> = {
|
|
40
|
+
items: [],
|
|
41
|
+
total_items: 0,
|
|
42
|
+
total_pages: 1,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { incompatibleHostsTable, compatibleHostsTable }
|
|
46
|
+
export const hostsAccessibilityTablesFunc = (type: T_HostsAccessibilityTab) => {
|
|
47
|
+
const hostItems = {
|
|
48
|
+
'compatible-hosts': compatibleHostsTable,
|
|
49
|
+
'incompatible-hosts': incompatibleHostsTable,
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return hostItems[type]
|
|
53
|
+
}
|