bfg-common 1.3.337 → 1.3.339
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 +4 -2
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +38 -36
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +18 -5
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +5 -7
- package/package.json +1 -1
|
@@ -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="onChangeConfigurationAndNext"
|
|
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>
|
|
@@ -90,8 +90,21 @@ watch(nfsVersion, (newValue: UI_T_NfsType) => {
|
|
|
90
90
|
emits('change-nfs-version', newValue)
|
|
91
91
|
})
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
let sendData: any = null
|
|
94
|
+
const onChangeConfigurationAndNext = (
|
|
95
|
+
event: UI_I_ConfigurationSendDataNfs
|
|
96
|
+
): void => {
|
|
97
|
+
sendData = {
|
|
98
|
+
name: event.name,
|
|
99
|
+
folder: event.folder,
|
|
100
|
+
server: event.server,
|
|
101
|
+
hosts: [],
|
|
102
|
+
}
|
|
103
|
+
emits('submit', sendData)
|
|
104
|
+
}
|
|
105
|
+
const onChangeAccessibilityAndNext = (hosts: string[]): void => {
|
|
106
|
+
sendData.hosts = hosts
|
|
107
|
+
emits('submit', sendData)
|
|
95
108
|
}
|
|
96
109
|
</script>
|
|
97
110
|
|
|
@@ -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"
|
|
@@ -45,7 +45,7 @@ const props = defineProps<{
|
|
|
45
45
|
}>()
|
|
46
46
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
47
47
|
const emits = defineEmits<{
|
|
48
|
-
(event: 'next', value: string): void
|
|
48
|
+
(event: 'next', value: string[]): void
|
|
49
49
|
}>()
|
|
50
50
|
|
|
51
51
|
const activeTab = ref<T_HostsAccessibilityTab>('compatible-hosts')
|
|
@@ -53,8 +53,6 @@ const tabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
|
53
53
|
hostAccessibilityTabsFunc(localization.value, ['5', '3'])
|
|
54
54
|
)
|
|
55
55
|
|
|
56
|
-
console.log(444444)
|
|
57
|
-
|
|
58
56
|
// const dataTable = computed(() => hostsAccessibilityTablesFunc(activeTab.value))
|
|
59
57
|
// TODO refactoring
|
|
60
58
|
const dataTable = computed<any>(() => props.hosts)
|
|
@@ -65,7 +63,7 @@ const pagination = ref<UI_I_Pagination>({
|
|
|
65
63
|
})
|
|
66
64
|
const sort = ref<string | null>(null)
|
|
67
65
|
|
|
68
|
-
const
|
|
66
|
+
const selectedHosts = ref<string[]>([])
|
|
69
67
|
|
|
70
68
|
const updatePagination = (event: UI_I_Pagination): void => {
|
|
71
69
|
pagination.value = event
|
|
@@ -83,14 +81,14 @@ const removeValidationErrors = (): void => {
|
|
|
83
81
|
errors.value = []
|
|
84
82
|
}
|
|
85
83
|
const submit = async () => {
|
|
86
|
-
if (!
|
|
84
|
+
if (!selectedHosts.value.length) {
|
|
87
85
|
const text = localization.value.selectLeastEntityContinue
|
|
88
86
|
showValidationErrors(text)
|
|
89
87
|
return
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
removeValidationErrors()
|
|
93
|
-
emits('next',
|
|
91
|
+
emits('next', selectedHosts.value)
|
|
94
92
|
}
|
|
95
93
|
watch(
|
|
96
94
|
() => props.hostAccessibilitySubmit,
|