bfg-common 1.3.334 → 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.
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:step-position="stepPosition"
|
|
28
28
|
:datastore-type="datastoreType"
|
|
29
29
|
:local-create-name-submit="localCreateNameSubmit"
|
|
30
|
-
:datacenter-hosts="datacenterHosts"
|
|
30
|
+
:datacenter-hosts="props.datacenterHosts"
|
|
31
31
|
:is-main-filter="props.isMainFilter"
|
|
32
32
|
@loading="(e) => (loading = e)"
|
|
33
33
|
@submit="onSaveNameAndNextLocal"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
:step-position="stepPosition"
|
|
41
41
|
:datastore-type="datastoreType"
|
|
42
42
|
:device-selection-submit="deviceSelectionSubmit"
|
|
43
|
-
:datacenter-hosts="datacenterHosts"
|
|
43
|
+
:datacenter-hosts="props.datacenterHosts"
|
|
44
44
|
:is-main-filter="props.isMainFilter"
|
|
45
45
|
@loading="(e) => (loading = e)"
|
|
46
46
|
@submit="onSaveAndNextSharedStorm"
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
:datastore-type="datastoreType"
|
|
55
55
|
:nfs-configuration-submit="nfsConfigurationSubmit"
|
|
56
56
|
:host-accessibility-submit="hostAccessibilitySubmit"
|
|
57
|
+
:datacenter-hosts="props.datacenterHosts"
|
|
57
58
|
@loading="(e) => (loading = e)"
|
|
58
59
|
@change-nfs-version="updateNfsVersion"
|
|
59
60
|
@submit="saveChangesAndNextNfs"
|
|
@@ -293,6 +294,7 @@ const saveChangesAndNextNfs = (event: any, next = true): void => {
|
|
|
293
294
|
}
|
|
294
295
|
|
|
295
296
|
const isShowCompleteBlock = computed<boolean>(() => {
|
|
297
|
+
// TODO refactoring
|
|
296
298
|
const localStep = datastoreType.value === 'local' && stepPosition.value === 2
|
|
297
299
|
|
|
298
300
|
const sharesStep =
|
|
@@ -301,14 +303,31 @@ const isShowCompleteBlock = computed<boolean>(() => {
|
|
|
301
303
|
? stepPosition.value === 3
|
|
302
304
|
: stepPosition.value === 2)
|
|
303
305
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
let nfsFirst
|
|
307
|
+
if (props.mode === 'procurator') {
|
|
308
|
+
nfsFirst =
|
|
309
|
+
datastoreType.value === 'nfs' &&
|
|
310
|
+
nfsVersion.value === 'nfs-3' &&
|
|
311
|
+
stepPosition.value === 3
|
|
312
|
+
} else {
|
|
313
|
+
nfsFirst =
|
|
314
|
+
datastoreType.value === 'nfs' &&
|
|
315
|
+
nfsVersion.value === 'nfs-3' &&
|
|
316
|
+
stepPosition.value === 4
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
let nfsSecond
|
|
320
|
+
if (props.mode === 'procurator') {
|
|
321
|
+
nfsSecond =
|
|
322
|
+
datastoreType.value === 'nfs' &&
|
|
323
|
+
nfsVersion.value === 'nfs-4.1' &&
|
|
324
|
+
stepPosition.value === 3
|
|
325
|
+
} else {
|
|
326
|
+
nfsSecond =
|
|
327
|
+
datastoreType.value === 'nfs' &&
|
|
328
|
+
nfsVersion.value === 'nfs-4.1' &&
|
|
329
|
+
stepPosition.value === 4
|
|
330
|
+
}
|
|
312
331
|
|
|
313
332
|
return localStep || sharesStep || nfsFirst || nfsSecond
|
|
314
333
|
})
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
<!-- :nfs-version="nfsVersion"-->
|
|
22
22
|
<!-- />--><!-- TODO Он будет когда будем делать групповое -->
|
|
23
23
|
|
|
24
|
-
<
|
|
24
|
+
<common-wizards-datastore-add-nfs-accessibility
|
|
25
25
|
v-if="showHostAccessibility"
|
|
26
26
|
:host-accessibility-submit="props.hostAccessibilitySubmit"
|
|
27
|
+
:datacenter-hosts="props.datacenterHosts"
|
|
27
28
|
@next="applyChangesAndNext"
|
|
28
29
|
/>
|
|
29
30
|
<!-- TODO Он будет когда будем делать групповое -->
|
|
@@ -38,6 +39,7 @@ import {
|
|
|
38
39
|
UI_T_WizardDatastoreMode,
|
|
39
40
|
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
40
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'
|
|
41
43
|
import { subTitleFunc } from '~/components/common/wizards/datastore/add/lib/config/stepItems'
|
|
42
44
|
|
|
43
45
|
const props = defineProps<{
|
|
@@ -46,6 +48,7 @@ const props = defineProps<{
|
|
|
46
48
|
datastoreType: UI_T_DatastoreType
|
|
47
49
|
nfsConfigurationSubmit: number
|
|
48
50
|
hostAccessibilitySubmit: number
|
|
51
|
+
datacenterHosts?: UI_I_SelectHostOptions[]
|
|
49
52
|
}>()
|
|
50
53
|
const emits = defineEmits<{
|
|
51
54
|
(event: 'loading', value: boolean): void
|
|
@@ -74,9 +77,16 @@ const stepSubTitle = computed<string>(() => {
|
|
|
74
77
|
// )
|
|
75
78
|
// })
|
|
76
79
|
const showHostAccessibility = computed<boolean>(() => {
|
|
77
|
-
return
|
|
80
|
+
return props.mode === 'sphere' && props.stepPosition === 3
|
|
78
81
|
})
|
|
79
82
|
|
|
83
|
+
watch(
|
|
84
|
+
() => props.stepPosition,
|
|
85
|
+
(newValue: number) => {
|
|
86
|
+
console.log(showHostAccessibility.value, newValue, 1111, props.mode)
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
|
|
80
90
|
watch(nfsVersion, (newValue: UI_T_NfsType) => {
|
|
81
91
|
emits('change-nfs-version', newValue)
|
|
82
92
|
})
|
|
@@ -1,103 +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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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>
|