bfg-common 1.5.118 → 1.5.119
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/assets/scss/common/icons/icons-6.scss +6 -0
- package/components/common/details/lib/models/interfaces.ts +1 -0
- package/components/common/wizards/datastore/add/Add.vue +77 -167
- package/components/common/wizards/datastore/add/New.vue +242 -0
- package/components/common/wizards/datastore/add/Old.vue +125 -0
- package/components/common/wizards/datastore/add/lib/config/createDatastore.ts +16 -0
- package/components/common/wizards/datastore/add/lib/config/steps.ts +174 -138
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +10 -7
- package/components/common/wizards/datastore/add/lib/models/types.ts +4 -4
- package/components/common/wizards/datastore/add/lib/validations.ts +40 -24
- package/components/common/wizards/datastore/add/{nfs → steps}/_kerberosAuthentication/KerberosAuthentication.vue +1 -0
- package/components/common/wizards/datastore/add/{local → steps/_local}/Local.vue +4 -3
- package/components/common/wizards/datastore/add/{nfs/version/Version.vue → steps/_nfsVersion/NfsVersion.vue} +1 -0
- package/components/common/wizards/datastore/add/{sharedStorm/partitionConfiguration → steps/_partitionConfiguration}/PartitionConfiguration.vue +11 -2
- package/components/common/wizards/datastore/add/{sharedStorm/_version → steps/_vmfsVersion}/Version.vue +7 -3
- package/components/common/wizards/datastore/add/steps/common/tooltipInfo/TooltipInfo.vue +93 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibility.vue +54 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityNew.vue +48 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityOld.vue +50 -0
- package/components/common/wizards/datastore/add/{nfs/accessibility → steps/hostAccessibility}/lib/config/tabsPannel.ts +2 -3
- package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/types.ts +3 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/Table.vue +41 -0
- package/components/common/wizards/datastore/add/{nfs/accessibility/tablesView → steps/hostAccessibility/table}/lib/models/interfaces.ts +1 -1
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/new/New.vue +113 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/new/lib/config/compatibleTable.ts +79 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/old/Old.vue +79 -0
- package/components/common/wizards/datastore/add/{nfs/accessibility/tablesView → steps/hostAccessibility/table/old}/lib/config/compatibleTable.ts +7 -11
- package/components/common/wizards/datastore/add/{nfs/accessibility/tablesView → steps/hostAccessibility/table/old}/lib/config/incompatibleTable.ts +1 -1
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/old/lib/config/tableKeys.ts +15 -0
- package/components/common/wizards/datastore/add/steps/hostAccessibility/table/old/lib/models/types.ts +6 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigure.vue +95 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureNew.vue +210 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureOld.vue +234 -0
- package/components/common/wizards/datastore/add/{nfs/configuration → steps/nameAndConfigure}/_serversList/ServersList.vue +2 -1
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDevice.vue +142 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +185 -0
- package/components/common/wizards/datastore/add/{sharedStorm/deviceSelection/DeviceSelection.vue → steps/nameAndDevice/NameAndDeviceOld.vue} +47 -115
- package/components/common/wizards/datastore/add/steps/nameAndDevice/lib/config/selectOptions.ts +13 -0
- package/components/common/wizards/datastore/add/{sharedStorm/deviceSelection → steps/nameAndDevice}/lib/models/interfaces.ts +0 -10
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/Table.vue +74 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces.ts +14 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/new/New.vue +137 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/new/lib/config/lunDiskTable.ts +176 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/new/lib/models/enums.ts +16 -0
- package/components/common/wizards/datastore/add/{sharedStorm/deviceSelection/table/Table.vue → steps/nameAndDevice/table/old/Old.vue} +18 -57
- package/components/common/wizards/datastore/add/{sharedStorm/deviceSelection/table → steps/nameAndDevice/table/old}/lib/config/lunDiskTable.ts +2 -2
- package/components/common/wizards/datastore/add/{sharedStorm/deviceSelection/table → steps/nameAndDevice/table/old}/lib/config/tableKeys.ts +1 -1
- package/components/common/wizards/datastore/add/steps/readyComplete/ReadyComplete.vue +44 -0
- package/components/common/wizards/datastore/add/steps/readyComplete/ReadyCompleteNew.vue +122 -0
- package/components/common/wizards/datastore/add/{readyComplete/ReadyComplete.vue → steps/readyComplete/ReadyCompleteOld.vue} +20 -6
- package/components/common/wizards/datastore/add/{readyComplete → steps/readyComplete}/lib/config/propertiesDetails.ts +36 -20
- package/components/common/wizards/datastore/add/steps/typeMode/TypeMode.vue +35 -0
- package/components/common/wizards/datastore/add/steps/typeMode/TypeModeNew.vue +98 -0
- package/components/common/wizards/datastore/add/{types/Types.vue → steps/typeMode/TypeModeOld.vue} +7 -15
- package/components/common/wizards/datastore/add/{types → steps/typeMode}/lib/config/typeOptions.ts +3 -3
- package/package.json +1 -1
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +0 -60
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +0 -60
- package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces.ts +0 -9
- package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types.ts +0 -5
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +0 -85
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +0 -228
- package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +0 -73
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +0 -26
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/types.ts +0 -1
- /package/components/common/wizards/datastore/add/{nfs → steps}/_kerberosAuthentication/lib/config/radioOptions.ts +0 -0
- /package/components/common/wizards/datastore/add/{local → steps/_local}/createName/CreateName.vue +0 -0
- /package/components/common/wizards/datastore/add/{nfs/version → steps/_nfsVersion}/lib/config/versionOptions.ts +0 -0
- /package/components/common/wizards/datastore/add/{sharedStorm/partitionConfiguration → steps/_partitionConfiguration}/graphicTooltip/graphicTooltip.vue +0 -0
- /package/components/common/wizards/datastore/add/{sharedStorm/partitionConfiguration → steps/_partitionConfiguration}/lib/config/selectOptions.ts +0 -0
- /package/components/common/wizards/datastore/add/{sharedStorm/partitionConfiguration → steps/_partitionConfiguration}/sizeGraphic/sizeGraphic.vue +0 -0
- /package/components/common/wizards/datastore/add/{sharedStorm/_version → steps/_vmfsVersion}/lib/config/versionOptions.ts +0 -0
- /package/components/common/wizards/datastore/add/{nfs/configuration → steps/nameAndConfigure}/_serversList/DeletePopover.vue +0 -0
- /package/components/common/wizards/datastore/add/{nfs/configuration → steps/nameAndConfigure}/_serversList/lib/config/serversListConfig.ts +0 -0
- /package/components/common/wizards/datastore/add/{nfs/configuration → steps/nameAndConfigure}/_serversList/lib/config/tableKeys.ts +0 -0
- /package/components/common/wizards/datastore/add/{nfs/configuration → steps/nameAndConfigure}/_serversList/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/datastore/add/{nfs/configuration → steps/nameAndConfigure}/_serversList/lib/models/types.ts +0 -0
- /package/components/common/wizards/datastore/add/{nfs/configuration → steps/nameAndConfigure}/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/datastore/add/{sharedStorm/deviceSelection/table → steps/nameAndDevice/table/old}/lib/models/types.ts +0 -0
|
@@ -65,6 +65,9 @@
|
|
|
65
65
|
.icon-sessions {
|
|
66
66
|
background-position: 0 87.5%;
|
|
67
67
|
}
|
|
68
|
+
.icon-server {
|
|
69
|
+
background-position: 0 91.8%;
|
|
70
|
+
}
|
|
68
71
|
.icon-add-permission {
|
|
69
72
|
background-position: 0 99.8%;
|
|
70
73
|
}
|
|
@@ -91,6 +94,7 @@
|
|
|
91
94
|
.icon-backup-restore,
|
|
92
95
|
.icon-sensors,
|
|
93
96
|
.icon-sessions,
|
|
97
|
+
.icon-server,
|
|
94
98
|
.icon-add-permission,
|
|
95
99
|
.icon-workload-management {
|
|
96
100
|
background-image: url('../img/icons/icons-sprite-light-6.svg');
|
|
@@ -120,6 +124,7 @@
|
|
|
120
124
|
.active .icon-backup-restore,
|
|
121
125
|
.active .icon-sensors,
|
|
122
126
|
.active .icon-sessions,
|
|
127
|
+
.active .icon-server,
|
|
123
128
|
.active .icon-add-permission,
|
|
124
129
|
.active .icon-workload-management {
|
|
125
130
|
background-image: url('../img/icons/icons-sprite-dark-6.svg');
|
|
@@ -151,6 +156,7 @@
|
|
|
151
156
|
.icon-backup-restore,
|
|
152
157
|
.icon-sensors,
|
|
153
158
|
.icon-sessions,
|
|
159
|
+
.icon-server,
|
|
154
160
|
.icon-add-permission,
|
|
155
161
|
.icon-workload-management {
|
|
156
162
|
display: inline-block;
|
|
@@ -1,68 +1,35 @@
|
|
|
1
1
|
<template>
|
|
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
|
-
<common-wizards-datastore-add-shared-storm
|
|
35
|
-
v-show="datastoreType === 'shared-storm'"
|
|
36
|
-
v-model="form"
|
|
37
|
-
:project="props.project"
|
|
38
|
-
:step-id="selectedStep.id"
|
|
39
|
-
:datastore-type="datastoreType"
|
|
40
|
-
:alert-messages="alertMessages[selectedStep.id]"
|
|
41
|
-
:messages-fields="selectedStep.fields"
|
|
42
|
-
:hosts="props.nfsHosts"
|
|
43
|
-
:is-main-filter="props.isMainFilter"
|
|
44
|
-
:host-id="props.hostId"
|
|
45
|
-
@hide-alert="onHideAlert"
|
|
46
|
-
@main-filter="emits('main-filter', $event)"
|
|
47
|
-
/>
|
|
48
|
-
|
|
49
|
-
<common-wizards-datastore-add-nfs
|
|
50
|
-
v-show="datastoreType === 'nfs'"
|
|
51
|
-
v-model="form"
|
|
52
|
-
:project="props.project"
|
|
53
|
-
:step-id="selectedStep.id"
|
|
54
|
-
:alert-messages="alertMessages[selectedStep.id]"
|
|
55
|
-
:messages-fields="selectedStep.fields"
|
|
56
|
-
:hosts="props.nfsHosts"
|
|
57
|
-
/>
|
|
58
|
-
|
|
59
|
-
<common-wizards-datastore-add-ready-complete
|
|
60
|
-
v-show="selectedStep.id === 11"
|
|
61
|
-
:data-ready-view="dataReadyView"
|
|
62
|
-
/>
|
|
63
|
-
</template>
|
|
64
|
-
</atoms-wizard>
|
|
65
|
-
</div>
|
|
2
|
+
<common-wizards-datastore-add-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model="form"
|
|
5
|
+
:project="props.project"
|
|
6
|
+
:wizard="wizard"
|
|
7
|
+
:alert-messages="alertMessages"
|
|
8
|
+
:selected-scheme="selectedScheme"
|
|
9
|
+
:selected-node="props.selectedNode"
|
|
10
|
+
:title="title"
|
|
11
|
+
:nfs-hosts="props.nfsHosts"
|
|
12
|
+
:host-id="props.hostId"
|
|
13
|
+
@change-steps="onChangeSteps"
|
|
14
|
+
@hide="onHideModal"
|
|
15
|
+
@submit="onCreateDatastore"
|
|
16
|
+
/>
|
|
17
|
+
<common-wizards-datastore-add-old
|
|
18
|
+
v-else
|
|
19
|
+
v-model="form"
|
|
20
|
+
:project="props.project"
|
|
21
|
+
:wizard="wizard"
|
|
22
|
+
:alert-messages="alertMessages"
|
|
23
|
+
:selected-scheme="selectedScheme"
|
|
24
|
+
:selected-node="props.selectedNode"
|
|
25
|
+
:title="title"
|
|
26
|
+
:nfs-hosts="props.nfsHosts"
|
|
27
|
+
:host-id="props.hostId"
|
|
28
|
+
@change-steps="onChangeSteps"
|
|
29
|
+
@hide-alert="onHideAlert"
|
|
30
|
+
@hide="onHideModal"
|
|
31
|
+
@submit="onCreateDatastore"
|
|
32
|
+
/>
|
|
66
33
|
</template>
|
|
67
34
|
|
|
68
35
|
<script setup lang="ts">
|
|
@@ -70,35 +37,35 @@ import type {
|
|
|
70
37
|
UI_I_WizardStep,
|
|
71
38
|
UI_I_ValidationReturn,
|
|
72
39
|
} from '~/components/atoms/wizard/lib/models/interfaces'
|
|
40
|
+
import Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
73
41
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
74
42
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
75
|
-
import type {
|
|
43
|
+
import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
76
44
|
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
77
|
-
import type {
|
|
78
|
-
import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/models/interfaces'
|
|
79
|
-
import type { UI_I_ChangeStepsSchemes } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
80
|
-
import { E_DatastoreTypeKode } from '~/components/common/wizards/datastore/add/lib/models/enums'
|
|
81
|
-
import { constructDataReadyViewFunc } from '~/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails'
|
|
82
|
-
import * as validation from '~/components/common/wizards/datastore/add/lib/validations'
|
|
45
|
+
import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
83
46
|
import {
|
|
84
47
|
stepsFunc,
|
|
85
48
|
stepsSchemeInitial,
|
|
49
|
+
getStepScheme,
|
|
50
|
+
dynamicSteps,
|
|
86
51
|
} from '~/components/common/wizards/datastore/add/lib/config/steps'
|
|
87
|
-
import
|
|
52
|
+
import { datastoreDefaultFormFunc } from '~/components/common/wizards/datastore/add/lib/config/createDatastore'
|
|
53
|
+
import * as validation from '~/components/common/wizards/datastore/add/lib/validations'
|
|
88
54
|
|
|
89
55
|
const props = defineProps<{
|
|
90
56
|
project: UI_T_Project
|
|
91
|
-
nfsHosts?:
|
|
57
|
+
nfsHosts?: UI_I_CompatibleHosts
|
|
92
58
|
hostId?: string
|
|
93
59
|
isMainFilter?: boolean
|
|
94
60
|
}>()
|
|
95
61
|
const emits = defineEmits<{
|
|
96
62
|
(event: 'hide'): void
|
|
97
|
-
(event: 'finish', value:
|
|
63
|
+
(event: 'finish', value: any): void
|
|
98
64
|
(event: 'main-filter', value: string): void
|
|
99
65
|
}>()
|
|
100
66
|
|
|
101
67
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
68
|
+
const { $store }: any = useNuxtApp()
|
|
102
69
|
|
|
103
70
|
const wizard: Wizard = new Wizard(
|
|
104
71
|
stepsFunc(localization.value),
|
|
@@ -108,21 +75,13 @@ const wizard: Wizard = new Wizard(
|
|
|
108
75
|
const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
|
|
109
76
|
const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
|
|
110
77
|
|
|
111
|
-
|
|
112
|
-
// props.project === 'procurator' ? 'local' : 'shared-storm'
|
|
113
|
-
// )
|
|
114
|
-
const datastoreType = ref<UI_T_DatastoreType>('shared-storm')
|
|
115
|
-
const form = ref<UI_I_CreateDatastoreForm>({
|
|
116
|
-
name: 'Datastore',
|
|
117
|
-
lunDisk: [],
|
|
118
|
-
hosts: props.hostId ? [props?.hostId] : [],
|
|
119
|
-
type_code: E_DatastoreTypeKode[datastoreType.value],
|
|
120
|
-
nfsVersion: 'nfs-4.1',
|
|
121
|
-
readonly: false,
|
|
122
|
-
server: '',
|
|
123
|
-
folder: '',
|
|
124
|
-
})
|
|
78
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
125
79
|
|
|
80
|
+
const title = computed<string>(() => localization.value.common.newDatastore)
|
|
81
|
+
|
|
82
|
+
const form = ref<UI_I_CreateDatastoreForm>(
|
|
83
|
+
useDeepCopy(datastoreDefaultFormFunc(props.hostId))
|
|
84
|
+
)
|
|
126
85
|
const validationFunc = async (
|
|
127
86
|
value: UI_I_WizardStep[],
|
|
128
87
|
currentStep: UI_I_WizardStep,
|
|
@@ -130,28 +89,18 @@ const validationFunc = async (
|
|
|
130
89
|
): Promise<UI_I_ValidationReturn> => {
|
|
131
90
|
let stepHasError = false
|
|
132
91
|
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
1,
|
|
139
|
-
'datastoreName',
|
|
140
|
-
wizard,
|
|
141
|
-
props.project
|
|
92
|
+
if (
|
|
93
|
+
wizard.isValidateForStep(
|
|
94
|
+
dynamicSteps.nameAndDevice,
|
|
95
|
+
currentStep.id,
|
|
96
|
+
nextStep.id
|
|
142
97
|
)
|
|
143
|
-
|
|
144
|
-
value = nameValidation.newValue
|
|
145
|
-
|
|
146
|
-
stepHasError = nameValidation.stepHasError
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (wizard.isValidateForStep(2, currentStep.id, nextStep.id)) {
|
|
98
|
+
) {
|
|
150
99
|
const nameValidation = await validation.checkDatastoreNameAsync(
|
|
151
100
|
localization.value,
|
|
152
101
|
value,
|
|
153
102
|
form.value,
|
|
154
|
-
|
|
103
|
+
dynamicSteps.nameAndDevice,
|
|
155
104
|
'datastoreName',
|
|
156
105
|
wizard,
|
|
157
106
|
props.project
|
|
@@ -173,12 +122,18 @@ const validationFunc = async (
|
|
|
173
122
|
stepHasError = nameValidation.stepHasError || lunDiskValidation.stepHasError
|
|
174
123
|
}
|
|
175
124
|
|
|
176
|
-
if (
|
|
125
|
+
if (
|
|
126
|
+
wizard.isValidateForStep(
|
|
127
|
+
dynamicSteps.nameAndConfigure,
|
|
128
|
+
currentStep.id,
|
|
129
|
+
nextStep.id
|
|
130
|
+
)
|
|
131
|
+
) {
|
|
177
132
|
const nameValidation = await validation.checkDatastoreNameAsync(
|
|
178
133
|
localization.value,
|
|
179
134
|
value,
|
|
180
135
|
form.value,
|
|
181
|
-
|
|
136
|
+
dynamicSteps.nameAndConfigure,
|
|
182
137
|
'name',
|
|
183
138
|
wizard,
|
|
184
139
|
props.project
|
|
@@ -207,7 +162,13 @@ const validationFunc = async (
|
|
|
207
162
|
serverValidation.stepHasError
|
|
208
163
|
}
|
|
209
164
|
|
|
210
|
-
if (
|
|
165
|
+
if (
|
|
166
|
+
wizard.isValidateForStep(
|
|
167
|
+
dynamicSteps.hostAccessibility,
|
|
168
|
+
currentStep.id,
|
|
169
|
+
nextStep.id
|
|
170
|
+
)
|
|
171
|
+
) {
|
|
211
172
|
const nameValidation = await validation.checkHostsAccessibilitySync(
|
|
212
173
|
localization.value,
|
|
213
174
|
form.value.hosts,
|
|
@@ -231,36 +192,14 @@ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
|
|
|
231
192
|
|
|
232
193
|
// Choosing Scheme
|
|
233
194
|
watch(
|
|
234
|
-
|
|
235
|
-
(newValue:
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
'shared-storm': 1,
|
|
240
|
-
nfs: 2,
|
|
241
|
-
},
|
|
242
|
-
sphere: {
|
|
243
|
-
'shared-storm': 3,
|
|
244
|
-
nfs: !props.hostId ? 4 : 2,
|
|
245
|
-
},
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
const projectSchemes = schemes[props.project]
|
|
249
|
-
|
|
250
|
-
if (projectSchemes && projectSchemes[newValue] !== undefined) {
|
|
251
|
-
wizard.changeScheme(projectSchemes[newValue] as number)
|
|
195
|
+
() => form.value.type_code,
|
|
196
|
+
(newValue: UI_T_DatastoreTypeCode) => {
|
|
197
|
+
const step = getStepScheme(props.project, newValue, props.hostId)
|
|
198
|
+
if (step !== undefined) {
|
|
199
|
+
wizard.changeScheme(step)
|
|
252
200
|
}
|
|
253
201
|
},
|
|
254
|
-
{
|
|
255
|
-
)
|
|
256
|
-
|
|
257
|
-
const dataReadyView = computed<UI_I_DetailsItem>(() =>
|
|
258
|
-
constructDataReadyViewFunc(
|
|
259
|
-
localization.value,
|
|
260
|
-
form.value,
|
|
261
|
-
props.project,
|
|
262
|
-
props.nfsHosts
|
|
263
|
-
)
|
|
202
|
+
{ immediate: true }
|
|
264
203
|
)
|
|
265
204
|
|
|
266
205
|
const onHideAlert = (stepId: number): void => {
|
|
@@ -269,38 +208,9 @@ const onHideAlert = (stepId: number): void => {
|
|
|
269
208
|
const onHideModal = (): void => {
|
|
270
209
|
emits('hide')
|
|
271
210
|
}
|
|
272
|
-
const
|
|
211
|
+
const onCreateDatastore = (): void => {
|
|
273
212
|
emits('finish', form.value)
|
|
274
213
|
}
|
|
275
|
-
// watch(
|
|
276
|
-
// () => props.isLoading,
|
|
277
|
-
// (newValue) => {
|
|
278
|
-
// wizard.setLoader(newValue)
|
|
279
|
-
// },
|
|
280
|
-
// { immediate: true }
|
|
281
|
-
// )
|
|
282
214
|
</script>
|
|
283
215
|
|
|
284
|
-
<style scoped lang="scss">
|
|
285
|
-
@import 'assets/scss/common/mixins.scss';
|
|
286
|
-
.new-datastore {
|
|
287
|
-
&__body {
|
|
288
|
-
@include flex($dir: column);
|
|
289
|
-
height: 100%;
|
|
290
|
-
padding-left: 24px;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.finish-block {
|
|
295
|
-
padding: 18px 24px 24px 24px;
|
|
296
|
-
|
|
297
|
-
.add-hosts-ready-to-complete-mt-12 {
|
|
298
|
-
margin-top: 12px;
|
|
299
|
-
|
|
300
|
-
.add-hosts-ready-to-complete-bold {
|
|
301
|
-
line-height: 18px;
|
|
302
|
-
font-weight: 700;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
</style>
|
|
216
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ui-wizard
|
|
3
|
+
show
|
|
4
|
+
:steps="props.wizard.steps"
|
|
5
|
+
:selected-scheme="props.selectedScheme"
|
|
6
|
+
:is-loading="props.wizard.wizardLoader.status"
|
|
7
|
+
:title="props.title"
|
|
8
|
+
:texts="texts"
|
|
9
|
+
test-id="add-datastore-wizard"
|
|
10
|
+
@change-steps="onChangeSteps"
|
|
11
|
+
@hide="onHideModal"
|
|
12
|
+
@submit="onCreateDatastore"
|
|
13
|
+
>
|
|
14
|
+
<template #content="{ selectedStep, isLoading }">
|
|
15
|
+
<ui-wizard-block
|
|
16
|
+
v-if="selectedStep.id === dynamicSteps.type"
|
|
17
|
+
:sub-title-height="height0"
|
|
18
|
+
>
|
|
19
|
+
<template #subTitle>
|
|
20
|
+
<div ref="subTitleBlock0">
|
|
21
|
+
<div class="subtitle-block flex-row">
|
|
22
|
+
<ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
|
|
23
|
+
|
|
24
|
+
<common-wizards-datastore-add-steps-common-tooltip-info
|
|
25
|
+
id="datastore-type-subtitle-tooltip"
|
|
26
|
+
:description="localization.common.datastoreTypeHelpDesc"
|
|
27
|
+
/>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
<template #content>
|
|
32
|
+
<common-wizards-datastore-add-steps-type-mode
|
|
33
|
+
v-if="selectedStep.id === dynamicSteps.type"
|
|
34
|
+
v-model="formModelLocal.type_code"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
</ui-wizard-block>
|
|
38
|
+
|
|
39
|
+
<ui-wizard-block
|
|
40
|
+
v-if="selectedStep.id === dynamicSteps.nameAndDevice"
|
|
41
|
+
:sub-title-height="height1"
|
|
42
|
+
>
|
|
43
|
+
<template #subTitle>
|
|
44
|
+
<div ref="subTitleBlock1">
|
|
45
|
+
<div class="subtitle-block">
|
|
46
|
+
<ui-alert
|
|
47
|
+
v-if="props.alertMessages[dynamicSteps.nameAndDevice].length"
|
|
48
|
+
test-id="add-host-connection-settings-error-alert"
|
|
49
|
+
type="error"
|
|
50
|
+
size="md"
|
|
51
|
+
:messages="props.alertMessages[dynamicSteps.nameAndDevice]"
|
|
52
|
+
class="subtitle-block__alert"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
<template #content>
|
|
60
|
+
<common-wizards-datastore-add-steps-name-and-device
|
|
61
|
+
v-if="selectedStep.id === dynamicSteps.nameAndDevice"
|
|
62
|
+
v-model="formModelLocal"
|
|
63
|
+
:project="props.project"
|
|
64
|
+
:messages-fields="selectedStep.fields"
|
|
65
|
+
:hosts="props.nfsHosts"
|
|
66
|
+
:host-id="props.hostId"
|
|
67
|
+
:is-main-filter="props.isMainFilter"
|
|
68
|
+
/>
|
|
69
|
+
</template>
|
|
70
|
+
</ui-wizard-block>
|
|
71
|
+
|
|
72
|
+
<ui-wizard-block
|
|
73
|
+
v-if="selectedStep.id === dynamicSteps.nameAndConfigure"
|
|
74
|
+
:sub-title-height="height2"
|
|
75
|
+
>
|
|
76
|
+
<template #subTitle>
|
|
77
|
+
<div ref="subTitleBlock2">
|
|
78
|
+
<div class="subtitle-block">
|
|
79
|
+
<ui-alert
|
|
80
|
+
v-if="props.alertMessages[dynamicSteps.nameAndConfigure].length"
|
|
81
|
+
test-id="add-host-connection-settings-error-alert"
|
|
82
|
+
type="error"
|
|
83
|
+
size="md"
|
|
84
|
+
:messages="props.alertMessages[dynamicSteps.nameAndConfigure]"
|
|
85
|
+
class="subtitle-block__alert"
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
92
|
+
<template #content>
|
|
93
|
+
<common-wizards-datastore-add-steps-name-and-configure
|
|
94
|
+
v-if="selectedStep.id === dynamicSteps.nameAndConfigure"
|
|
95
|
+
v-model="formModelLocal"
|
|
96
|
+
:project="props.project"
|
|
97
|
+
:messages-fields="selectedStep.fields"
|
|
98
|
+
/>
|
|
99
|
+
</template>
|
|
100
|
+
</ui-wizard-block>
|
|
101
|
+
|
|
102
|
+
<ui-wizard-block
|
|
103
|
+
v-if="selectedStep.id === dynamicSteps.hostAccessibility"
|
|
104
|
+
:sub-title-height="height3"
|
|
105
|
+
>
|
|
106
|
+
<template #subTitle>
|
|
107
|
+
<div ref="subTitleBlock3">
|
|
108
|
+
<div class="subtitle-block">
|
|
109
|
+
<ui-alert
|
|
110
|
+
v-if="
|
|
111
|
+
props.alertMessages[dynamicSteps.hostAccessibility].length
|
|
112
|
+
"
|
|
113
|
+
test-id="add-host-accessibility-error-alert"
|
|
114
|
+
type="error"
|
|
115
|
+
size="md"
|
|
116
|
+
:messages="props.alertMessages[dynamicSteps.hostAccessibility]"
|
|
117
|
+
class="subtitle-block__alert"
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
<ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</template>
|
|
124
|
+
<template #content>
|
|
125
|
+
<common-wizards-datastore-add-steps-host-accessibility
|
|
126
|
+
v-if="selectedStep.id === dynamicSteps.hostAccessibility"
|
|
127
|
+
v-model="formModelLocal.hosts"
|
|
128
|
+
:alert-messages="props.alertMessages[dynamicSteps.nameAndDevice]"
|
|
129
|
+
:hosts="props.nfsHosts"
|
|
130
|
+
/>
|
|
131
|
+
</template>
|
|
132
|
+
</ui-wizard-block>
|
|
133
|
+
|
|
134
|
+
<ui-wizard-block
|
|
135
|
+
v-if="selectedStep.id === dynamicSteps.readyComplete"
|
|
136
|
+
:sub-title-height="height4"
|
|
137
|
+
>
|
|
138
|
+
<template #subTitle>
|
|
139
|
+
<div ref="subTitleBlock4">
|
|
140
|
+
<div class="subtitle-block">
|
|
141
|
+
<ui-wizard-subtitle :sub-title="selectedStep.subTitle" />
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
<template #content>
|
|
146
|
+
<common-wizards-datastore-add-steps-ready-complete
|
|
147
|
+
v-if="selectedStep.id === dynamicSteps.readyComplete"
|
|
148
|
+
:form="formModelLocal"
|
|
149
|
+
:project="props.project"
|
|
150
|
+
:hosts="props.nfsHosts"
|
|
151
|
+
:host-id="props.hostId"
|
|
152
|
+
/>
|
|
153
|
+
</template>
|
|
154
|
+
</ui-wizard-block>
|
|
155
|
+
</template>
|
|
156
|
+
</ui-wizard>
|
|
157
|
+
</template>
|
|
158
|
+
|
|
159
|
+
<script setup lang="ts">
|
|
160
|
+
import { useElementSize } from '@vueuse/core'
|
|
161
|
+
import type {
|
|
162
|
+
UI_I_WizardStep,
|
|
163
|
+
UI_I_WizardTexts,
|
|
164
|
+
} from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
165
|
+
import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
|
|
166
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
167
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
168
|
+
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
|
|
169
|
+
import type { UI_I_CompatibleHosts } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/table/lib/models/interfaces'
|
|
170
|
+
import { dynamicSteps } from '~/components/common/wizards/datastore/add/lib/config/steps'
|
|
171
|
+
|
|
172
|
+
const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
173
|
+
const props = defineProps<{
|
|
174
|
+
project: UI_T_Project
|
|
175
|
+
wizard: Wizard
|
|
176
|
+
selectedScheme: number[]
|
|
177
|
+
alertMessages: string[][]
|
|
178
|
+
title: string
|
|
179
|
+
nfsHosts?: UI_I_CompatibleHosts
|
|
180
|
+
hostId?: string
|
|
181
|
+
isMainFilter?: boolean
|
|
182
|
+
}>()
|
|
183
|
+
const emits = defineEmits<{
|
|
184
|
+
(event: 'change-steps', value: UI_I_WizardStep[]): void
|
|
185
|
+
(event: 'hide'): void
|
|
186
|
+
(event: 'submit', value: any): void
|
|
187
|
+
(event: 'main-filter', value: string): void
|
|
188
|
+
}>()
|
|
189
|
+
|
|
190
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
191
|
+
|
|
192
|
+
const texts = computed<UI_I_WizardTexts>(() => ({
|
|
193
|
+
cancel: localization.value.common.cancel,
|
|
194
|
+
back: localization.value.common.backCap,
|
|
195
|
+
processing: localization.value.common.processing,
|
|
196
|
+
next: localization.value.common.next,
|
|
197
|
+
finish: localization.value.common.add,
|
|
198
|
+
incompleteTitle: localization.value.common.incompleteProcess,
|
|
199
|
+
incompleteMessage: localization.value.common.incompleteProcessMessage,
|
|
200
|
+
incompleteCancel: localization.value.common.cancel,
|
|
201
|
+
incompleteLeave: localization.value.common.leave,
|
|
202
|
+
}))
|
|
203
|
+
|
|
204
|
+
const subTitleBlock0 = ref<HTMLElement | null>(null)
|
|
205
|
+
const { height: height0 } = useElementSize(subTitleBlock0)
|
|
206
|
+
|
|
207
|
+
const subTitleBlock1 = ref<HTMLElement | null>(null)
|
|
208
|
+
const { height: height1 } = useElementSize(subTitleBlock1)
|
|
209
|
+
|
|
210
|
+
const subTitleBlock2 = ref<HTMLElement | null>(null)
|
|
211
|
+
const { height: height2 } = useElementSize(subTitleBlock2)
|
|
212
|
+
|
|
213
|
+
const subTitleBlock3 = ref<HTMLElement | null>(null)
|
|
214
|
+
const { height: height3 } = useElementSize(subTitleBlock3)
|
|
215
|
+
|
|
216
|
+
const subTitleBlock4 = ref<HTMLElement | null>(null)
|
|
217
|
+
const { height: height4 } = useElementSize(subTitleBlock4)
|
|
218
|
+
|
|
219
|
+
const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
|
|
220
|
+
emits('change-steps', value)
|
|
221
|
+
|
|
222
|
+
const onHideModal = (): void => emits('hide')
|
|
223
|
+
const onCreateDatastore = (): void => emits('submit')
|
|
224
|
+
</script>
|
|
225
|
+
|
|
226
|
+
<style scoped lang="scss">
|
|
227
|
+
.subtitle-block {
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
row-gap: 16px;
|
|
231
|
+
border-bottom: 1px solid var(--wizard-line);
|
|
232
|
+
padding-bottom: 12px;
|
|
233
|
+
|
|
234
|
+
&.flex-row {
|
|
235
|
+
flex-direction: row;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
:deep(&__alert) {
|
|
239
|
+
padding: 10px 12px;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
</style>
|