bfg-common 1.3.464 → 1.3.466
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/datastoreNew/add/Add.vue +8 -30
- package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +1 -1
- package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +0 -18
- package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +0 -10
- package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +11 -4
- package/package.json +1 -1
|
@@ -52,11 +52,9 @@
|
|
|
52
52
|
v-model="form"
|
|
53
53
|
:project="props.project"
|
|
54
54
|
:step-id="selectedStep.id"
|
|
55
|
-
:datastore-type="datastoreType"
|
|
56
55
|
:alert-messages="alertMessages[selectedStep.id]"
|
|
57
56
|
:messages-fields="selectedStep.fields"
|
|
58
57
|
:hosts="props.nfsHosts"
|
|
59
|
-
@submit="saveChangesAndNextNfs"
|
|
60
58
|
/>
|
|
61
59
|
|
|
62
60
|
<common-wizards-datastore-new-add-ready-complete
|
|
@@ -362,7 +360,6 @@ const validationFunc = async (
|
|
|
362
360
|
'name',
|
|
363
361
|
wizard
|
|
364
362
|
)
|
|
365
|
-
|
|
366
363
|
value = nameValidation.newValue
|
|
367
364
|
|
|
368
365
|
const folderValidation = checkNfsFolderSync(
|
|
@@ -371,6 +368,7 @@ const validationFunc = async (
|
|
|
371
368
|
wizard,
|
|
372
369
|
value
|
|
373
370
|
)
|
|
371
|
+
value = folderValidation.newValue
|
|
374
372
|
|
|
375
373
|
const serverValidation = checkNfsServerSync(
|
|
376
374
|
localization.value,
|
|
@@ -378,6 +376,7 @@ const validationFunc = async (
|
|
|
378
376
|
wizard,
|
|
379
377
|
value
|
|
380
378
|
)
|
|
379
|
+
value = serverValidation.newValue
|
|
381
380
|
|
|
382
381
|
stepHasError =
|
|
383
382
|
nameValidation.stepHasError ||
|
|
@@ -438,10 +437,13 @@ watch(
|
|
|
438
437
|
)
|
|
439
438
|
|
|
440
439
|
const dataReadyView = computed<UI_I_DetailsItem>(() =>
|
|
441
|
-
constructDataReadyViewFunc(
|
|
440
|
+
constructDataReadyViewFunc(
|
|
441
|
+
localization.value,
|
|
442
|
+
form.value,
|
|
443
|
+
props.project,
|
|
444
|
+
props.nfsHosts
|
|
445
|
+
)
|
|
442
446
|
)
|
|
443
|
-
const onNextStep = (_force = false): void => {}
|
|
444
|
-
|
|
445
447
|
const onSaveAndNextSharedStorm = (event: any): void => {
|
|
446
448
|
const { sharedStorm } = datastoreForm.value
|
|
447
449
|
sharedStorm.name = event.name
|
|
@@ -453,30 +455,6 @@ const onSaveAndNextSharedStorm = (event: any): void => {
|
|
|
453
455
|
'shared-storm',
|
|
454
456
|
event
|
|
455
457
|
)
|
|
456
|
-
|
|
457
|
-
onNextStep(true)
|
|
458
|
-
}
|
|
459
|
-
const saveChangesAndNextNfs = (event: any, next = true): void => {
|
|
460
|
-
const { nfs } = datastoreForm.value
|
|
461
|
-
nfs.name = event.name
|
|
462
|
-
nfs.folder = event.folder
|
|
463
|
-
nfs.server = event.server
|
|
464
|
-
nfs.hosts = event.hosts
|
|
465
|
-
|
|
466
|
-
// TODO refactoring
|
|
467
|
-
const hostsNames = props.nfsHosts
|
|
468
|
-
? props.nfsHosts.items
|
|
469
|
-
.filter((host) => event.hosts.includes(host.id))
|
|
470
|
-
.map((host) => host.host)
|
|
471
|
-
: []
|
|
472
|
-
|
|
473
|
-
dataReadyView.value = constructDataReadyViewFunc(localization.value, 'nfs', {
|
|
474
|
-
...event,
|
|
475
|
-
hosts: hostsNames,
|
|
476
|
-
version: ' nfsVersion.value',
|
|
477
|
-
})
|
|
478
|
-
|
|
479
|
-
next && onNextStep(true)
|
|
480
458
|
}
|
|
481
459
|
|
|
482
460
|
const onHideAlert = (stepId: number): void => {
|
|
@@ -2,7 +2,7 @@ import type { UI_T_NfsType } from '~/components/common/wizards/datastoreNew/add/
|
|
|
2
2
|
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
3
3
|
export interface UI_I_CreateDatastoreForm {
|
|
4
4
|
name: string
|
|
5
|
-
lunDisk: UI_I_CreateStorageLunDiskItem
|
|
5
|
+
lunDisk: UI_I_CreateStorageLunDiskItem[]
|
|
6
6
|
nfsVersion: UI_T_NfsType
|
|
7
7
|
type_code: 1 | 2 | 4
|
|
8
8
|
readonly: boolean
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
:alert-messages="props.alertMessages"
|
|
13
13
|
:messages-fields="props.messagesFields"
|
|
14
14
|
@hide-alert="(e) => emits('hide-alert', e)"
|
|
15
|
-
@next="onChangeConfigurationAndNext"
|
|
16
15
|
/>
|
|
17
16
|
|
|
18
17
|
<!-- <templates-home-datastore-actions-add-nfs-kerberos-authentication-->
|
|
@@ -37,13 +36,10 @@ import type {
|
|
|
37
36
|
} from '~/lib/models/interfaces'
|
|
38
37
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
39
38
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
40
|
-
import { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
41
|
-
import { UI_I_ConfigurationSendDataNfs } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
|
|
42
39
|
|
|
43
40
|
const props = defineProps<{
|
|
44
41
|
project: UI_T_Project
|
|
45
42
|
stepId: number
|
|
46
|
-
datastoreType: UI_T_DatastoreType
|
|
47
43
|
alertMessages: string[]
|
|
48
44
|
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
49
45
|
hosts?: any
|
|
@@ -51,7 +47,6 @@ const props = defineProps<{
|
|
|
51
47
|
const model = defineModel<any>()
|
|
52
48
|
const emits = defineEmits<{
|
|
53
49
|
(event: 'hide-alert', value: number): void
|
|
54
|
-
(event: 'submit', value: UI_I_ConfigurationSendDataNfs): void
|
|
55
50
|
}>()
|
|
56
51
|
|
|
57
52
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -59,19 +54,6 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
59
54
|
const showHostAccessibility = computed<boolean>(() => {
|
|
60
55
|
return props.project === 'sphere' && props.stepId === 6
|
|
61
56
|
})
|
|
62
|
-
|
|
63
|
-
let sendData: any = null
|
|
64
|
-
const onChangeConfigurationAndNext = (
|
|
65
|
-
event: UI_I_ConfigurationSendDataNfs
|
|
66
|
-
): void => {
|
|
67
|
-
sendData = {
|
|
68
|
-
name: event.name,
|
|
69
|
-
folder: event.folder,
|
|
70
|
-
server: event.server,
|
|
71
|
-
hosts: [],
|
|
72
|
-
}
|
|
73
|
-
emits('submit', sendData)
|
|
74
|
-
}
|
|
75
57
|
</script>
|
|
76
58
|
|
|
77
59
|
<style lang="scss" scoped>
|
package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts
CHANGED
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import { UI_I_DataServersListItem } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces'
|
|
2
|
-
|
|
3
1
|
export interface UI_I_InitialValidationFields {
|
|
4
2
|
name: boolean
|
|
5
3
|
folder: boolean
|
|
6
4
|
server: boolean
|
|
7
5
|
}
|
|
8
|
-
|
|
9
|
-
export interface UI_I_ConfigurationSendDataNfs {
|
|
10
|
-
name: string
|
|
11
|
-
folder: string
|
|
12
|
-
server: UI_I_DataServersListItem[]
|
|
13
|
-
|
|
14
|
-
// readonly: boolean
|
|
15
|
-
}
|
package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts
CHANGED
|
@@ -19,7 +19,8 @@ const constructLunDiskItems = (
|
|
|
19
19
|
const nfsDetailsFunc = (
|
|
20
20
|
localization: UI_I_Localization,
|
|
21
21
|
data: UI_I_CreateDatastoreForm,
|
|
22
|
-
project: UI_T_Project
|
|
22
|
+
project: UI_T_Project,
|
|
23
|
+
nfsHosts: any
|
|
23
24
|
): UI_I_DetailsItem[] => {
|
|
24
25
|
const { name, server, folder, nfsVersion, hosts } = data
|
|
25
26
|
// const accessMode = readonly ? 'Read-only' : 'Read-write'
|
|
@@ -67,6 +68,11 @@ const nfsDetailsFunc = (
|
|
|
67
68
|
]
|
|
68
69
|
|
|
69
70
|
if (project === 'sphere') {
|
|
71
|
+
const hostsNames = nfsHosts
|
|
72
|
+
? nfsHosts.items
|
|
73
|
+
.filter((host) => data.hosts.includes(host.id))
|
|
74
|
+
.map((host) => host.host)
|
|
75
|
+
: []
|
|
70
76
|
details.push({
|
|
71
77
|
label: localization.hostsAccessibility,
|
|
72
78
|
value: '',
|
|
@@ -74,7 +80,7 @@ const nfsDetailsFunc = (
|
|
|
74
80
|
{
|
|
75
81
|
label: localization.hosts,
|
|
76
82
|
value: '',
|
|
77
|
-
data:
|
|
83
|
+
data: hostsNames,
|
|
78
84
|
items: [],
|
|
79
85
|
},
|
|
80
86
|
],
|
|
@@ -164,7 +170,8 @@ const sharedStormDetailsFunc = (
|
|
|
164
170
|
export const constructDataReadyViewFunc = (
|
|
165
171
|
localization: UI_I_Localization,
|
|
166
172
|
data: UI_I_CreateDatastoreForm,
|
|
167
|
-
project: UI_T_Project
|
|
173
|
+
project: UI_T_Project,
|
|
174
|
+
nfsHosts: any
|
|
168
175
|
): UI_I_DetailsItem[] => {
|
|
169
176
|
const details = {
|
|
170
177
|
1: localDetailsFunc,
|
|
@@ -172,5 +179,5 @@ export const constructDataReadyViewFunc = (
|
|
|
172
179
|
4: nfsDetailsFunc,
|
|
173
180
|
}
|
|
174
181
|
|
|
175
|
-
return details[data.type_code](localization, data, project)
|
|
182
|
+
return details[data.type_code](localization, data, project, nfsHosts)
|
|
176
183
|
}
|