bfg-common 1.3.336 → 1.3.338
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 +5 -3
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -36
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +17 -7
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +7 -17
- package/package.json +1 -1
|
@@ -95,7 +95,7 @@ const props = defineProps<{
|
|
|
95
95
|
version: UI_T_NfsType
|
|
96
96
|
) => Promise<void>
|
|
97
97
|
datacenterHosts?: UI_I_SelectHostOptions[]
|
|
98
|
-
nfsHosts?: any
|
|
98
|
+
nfsHosts?: any
|
|
99
99
|
isMainFilter?: boolean
|
|
100
100
|
}>()
|
|
101
101
|
const emits = defineEmits<{
|
|
@@ -135,6 +135,7 @@ const datastoreForm = ref<UI_I_CreateDatastoreForm>({
|
|
|
135
135
|
readonly: false,
|
|
136
136
|
version: nfsVersion.value,
|
|
137
137
|
type_code: 4,
|
|
138
|
+
hosts: []
|
|
138
139
|
},
|
|
139
140
|
})
|
|
140
141
|
|
|
@@ -187,8 +188,8 @@ const onHideModal = (): void => {
|
|
|
187
188
|
|
|
188
189
|
const updateNfsVersion = (event: UI_T_NfsType): void => {
|
|
189
190
|
nfsVersion.value = event
|
|
190
|
-
const { name, server, folder } = datastoreForm.value.nfs
|
|
191
|
-
saveChangesAndNextNfs({ name, server, folder }, false)
|
|
191
|
+
const { name, server, folder, hosts } = datastoreForm.value.nfs
|
|
192
|
+
saveChangesAndNextNfs({ name, server, folder, hosts }, false)
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
const localCreateNameSubmit = ref<number>(0)
|
|
@@ -280,6 +281,7 @@ const saveChangesAndNextNfs = (event: any, next = true): void => {
|
|
|
280
281
|
nfs.name = event.name
|
|
281
282
|
nfs.folder = event.folder
|
|
282
283
|
nfs.server = event.server
|
|
284
|
+
nfs.hosts = event.hosts
|
|
283
285
|
|
|
284
286
|
dataReadyView.value = constructDataReadyViewFunc(
|
|
285
287
|
localization.value,
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
import { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
2
|
+
|
|
3
|
+
// TODO refactoring
|
|
4
|
+
export interface UI_I_NfsPoolNameForm<T = number> {
|
|
5
|
+
server: string
|
|
6
|
+
folder: string
|
|
7
|
+
version: T
|
|
8
|
+
readonly: boolean
|
|
9
|
+
hosts: string[]
|
|
10
|
+
}
|
|
11
|
+
export interface UI_I_CreateDatastoreBodyRequest {
|
|
12
|
+
name: string
|
|
13
|
+
pool_name: string
|
|
14
|
+
type_code: number
|
|
15
|
+
}
|
|
16
|
+
interface I_NfsForm extends UI_I_NfsPoolNameForm<UI_T_NfsType> {
|
|
17
|
+
name: string
|
|
18
|
+
type_code: number
|
|
19
|
+
}
|
|
20
|
+
interface I_SharedStorm extends UI_I_CreateDatastoreBodyRequest {
|
|
21
|
+
dev_names: string[]
|
|
22
|
+
hosts: string[]
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface UI_I_CreateDatastoreForm {
|
|
26
|
+
local: {
|
|
27
|
+
name: string
|
|
28
|
+
hosts: string[]
|
|
29
|
+
type_code: number
|
|
30
|
+
}
|
|
31
|
+
sharedStorm: I_SharedStorm
|
|
32
|
+
nfs: I_NfsForm
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface UI_I_CreateStorageUuid {
|
|
36
|
+
code: number
|
|
37
|
+
pool_name: string
|
|
38
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:nfs-version="nfsVersion"
|
|
14
14
|
:nfs-configuration-submit="nfsConfigurationSubmit"
|
|
15
15
|
@loading="(e) => emits('loading', e)"
|
|
16
|
-
@next="
|
|
16
|
+
@next="onChangeConfiguration"
|
|
17
17
|
/>
|
|
18
18
|
|
|
19
19
|
<!-- <templates-home-datastore-actions-add-nfs-kerberos-authentication-->
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
<common-wizards-datastore-add-nfs-accessibility
|
|
25
25
|
v-if="showHostAccessibility"
|
|
26
26
|
:host-accessibility-submit="props.hostAccessibilitySubmit"
|
|
27
|
-
:
|
|
28
|
-
@next="
|
|
27
|
+
:hosts="props.hosts"
|
|
28
|
+
@next="onChangeAccessibilityAndNext"
|
|
29
29
|
/>
|
|
30
30
|
<!-- TODO Он будет когда будем делать групповое -->
|
|
31
31
|
</div>
|
|
@@ -39,7 +39,6 @@ import {
|
|
|
39
39
|
UI_T_WizardDatastoreMode,
|
|
40
40
|
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
41
41
|
import { UI_I_ConfigurationSendDataNfs } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
|
|
42
|
-
import { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
43
42
|
import { subTitleFunc } from '~/components/common/wizards/datastore/add/lib/config/stepItems'
|
|
44
43
|
|
|
45
44
|
const props = defineProps<{
|
|
@@ -48,7 +47,7 @@ const props = defineProps<{
|
|
|
48
47
|
datastoreType: UI_T_DatastoreType
|
|
49
48
|
nfsConfigurationSubmit: number
|
|
50
49
|
hostAccessibilitySubmit: number
|
|
51
|
-
hosts?:
|
|
50
|
+
hosts?: any
|
|
52
51
|
}>()
|
|
53
52
|
const emits = defineEmits<{
|
|
54
53
|
(event: 'loading', value: boolean): void
|
|
@@ -91,8 +90,19 @@ watch(nfsVersion, (newValue: UI_T_NfsType) => {
|
|
|
91
90
|
emits('change-nfs-version', newValue)
|
|
92
91
|
})
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
let configuration: any = null
|
|
94
|
+
const onChangeConfiguration = (event: UI_I_ConfigurationSendDataNfs): void => {
|
|
95
|
+
configuration = {
|
|
96
|
+
name: event.name,
|
|
97
|
+
folder: event.folder,
|
|
98
|
+
server: event.server
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const onChangeAccessibilityAndNext = (hosts: string[]): void => {
|
|
102
|
+
emits('submit', {
|
|
103
|
+
...configuration,
|
|
104
|
+
hosts
|
|
105
|
+
})
|
|
96
106
|
}
|
|
97
107
|
</script>
|
|
98
108
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
<div>
|
|
20
20
|
<common-wizards-datastore-add-nfs-accessibility-tables-view
|
|
21
|
-
v-model:selected-row="
|
|
21
|
+
v-model:selected-row="selectedHosts"
|
|
22
22
|
:data-table="dataTable?.items || []"
|
|
23
23
|
:total-items="dataTable?.total_items || 0"
|
|
24
24
|
:total-pages="dataTable?.total_pages || 1"
|
|
@@ -34,20 +34,18 @@
|
|
|
34
34
|
<script lang="ts" setup>
|
|
35
35
|
import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
36
36
|
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
37
|
-
import { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
38
37
|
import { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
39
38
|
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
39
|
import { hostAccessibilityTabsFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/config/tabsPannel'
|
|
42
40
|
// import { hostsAccessibilityTablesFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems'
|
|
43
41
|
|
|
44
42
|
const props = defineProps<{
|
|
45
43
|
hostAccessibilitySubmit: number
|
|
46
|
-
hosts?:
|
|
44
|
+
hosts?: any
|
|
47
45
|
}>()
|
|
48
46
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
49
47
|
const emits = defineEmits<{
|
|
50
|
-
(event: 'next', value: string): void
|
|
48
|
+
(event: 'next', value: string[]): void
|
|
51
49
|
}>()
|
|
52
50
|
|
|
53
51
|
const activeTab = ref<T_HostsAccessibilityTab>('compatible-hosts')
|
|
@@ -55,17 +53,9 @@ const tabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
|
55
53
|
hostAccessibilityTabsFunc(localization.value, ['5', '3'])
|
|
56
54
|
)
|
|
57
55
|
|
|
58
|
-
console.log(444444)
|
|
59
|
-
|
|
60
56
|
// const dataTable = computed(() => hostsAccessibilityTablesFunc(activeTab.value))
|
|
61
57
|
// TODO refactoring
|
|
62
|
-
const dataTable = computed<
|
|
63
|
-
return {
|
|
64
|
-
items: props.hosts,
|
|
65
|
-
total_items: props.hosts.length,
|
|
66
|
-
total_pages: 1,
|
|
67
|
-
}
|
|
68
|
-
})
|
|
58
|
+
const dataTable = computed<any>(() => props.hosts)
|
|
69
59
|
|
|
70
60
|
const pagination = ref<UI_I_Pagination>({
|
|
71
61
|
page: 1,
|
|
@@ -73,7 +63,7 @@ const pagination = ref<UI_I_Pagination>({
|
|
|
73
63
|
})
|
|
74
64
|
const sort = ref<string | null>(null)
|
|
75
65
|
|
|
76
|
-
const
|
|
66
|
+
const selectedHosts = ref<string[]>([])
|
|
77
67
|
|
|
78
68
|
const updatePagination = (event: UI_I_Pagination): void => {
|
|
79
69
|
pagination.value = event
|
|
@@ -91,14 +81,14 @@ const removeValidationErrors = (): void => {
|
|
|
91
81
|
errors.value = []
|
|
92
82
|
}
|
|
93
83
|
const submit = async () => {
|
|
94
|
-
if (!
|
|
84
|
+
if (!selectedHosts.value.length) {
|
|
95
85
|
const text = localization.value.selectLeastEntityContinue
|
|
96
86
|
showValidationErrors(text)
|
|
97
87
|
return
|
|
98
88
|
}
|
|
99
89
|
|
|
100
90
|
removeValidationErrors()
|
|
101
|
-
emits('next',
|
|
91
|
+
emits('next', selectedHosts.value)
|
|
102
92
|
}
|
|
103
93
|
watch(
|
|
104
94
|
() => props.hostAccessibilitySubmit,
|