bfg-common 1.4.58 → 1.4.60
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 +232 -362
- package/components/common/wizards/{datastoreNew → datastore}/add/lib/config/steps.ts +3 -0
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +11 -30
- package/components/common/wizards/datastore/add/lib/models/types.ts +0 -7
- package/components/common/wizards/datastore/add/lib/utils.ts +14 -54
- package/components/common/wizards/{datastoreNew → datastore}/add/lib/validations.ts +2 -2
- package/components/common/wizards/datastore/add/local/Local.vue +19 -45
- package/components/common/wizards/datastore/add/local/createName/CreateName.vue +31 -81
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +25 -74
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +15 -56
- package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces.ts +0 -4
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +9 -66
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +1 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +57 -214
- package/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces.ts +4 -11
- package/components/common/wizards/datastore/add/nfs/version/Version.vue +3 -19
- package/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions.ts +4 -4
- package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +3 -10
- package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +37 -95
- package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +32 -45
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +64 -267
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +5 -5
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +1 -11
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/types.ts +1 -14
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/Table.vue +2 -2
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable.ts +1 -1
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/tableKeys.ts +1 -1
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +13 -13
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +8 -8
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +2 -2
- package/components/common/wizards/datastore/add/types/Types.vue +18 -17
- package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +7 -16
- package/lib/models/enums.ts +1 -0
- package/package.json +1 -1
- package/components/common/wizards/datastore/add/lib/config/stepItems.ts +0 -225
- package/components/common/wizards/datastore/add/local/createName/lib/config/defaultForm.ts +0 -15
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -53
- package/components/common/wizards/datastore/add/nfs/configuration/lib/config/defaultForm.ts +0 -33
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +0 -100
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +0 -124
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/serversListConfig.ts +0 -40
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/tableKeys.ts +0 -3
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces.ts +0 -11
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +0 -55
- package/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces.ts +0 -4
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +0 -144
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/hostsTable.ts +0 -87
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/tableKeys.ts +0 -11
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/defaultForm.ts +0 -18
- package/components/common/wizards/datastore/add/sharedStorm/version/Version.vue +0 -39
- package/components/common/wizards/datastoreNew/add/Add.vue +0 -307
- package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +0 -19
- package/components/common/wizards/datastoreNew/add/lib/models/types.ts +0 -7
- package/components/common/wizards/datastoreNew/add/lib/utils.ts +0 -64
- package/components/common/wizards/datastoreNew/add/local/Local.vue +0 -45
- package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +0 -116
- package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +0 -63
- package/components/common/wizards/datastoreNew/add/nfs/_kerberosAuthentication/lib/config/radioOptions.ts +0 -27
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +0 -63
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +0 -24
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/interfaces.ts +0 -9
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/types.ts +0 -5
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +0 -85
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +0 -236
- package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/models/types.ts +0 -1
- package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +0 -5
- package/components/common/wizards/datastoreNew/add/nfs/version/Version.vue +0 -26
- package/components/common/wizards/datastoreNew/add/nfs/version/lib/config/versionOptions.ts +0 -22
- package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +0 -88
- package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +0 -140
- package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +0 -84
- package/components/common/wizards/datastoreNew/add/sharedStorm/_version/lib/config/versionOptions.ts +0 -21
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +0 -276
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +0 -23
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +0 -48
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts +0 -1
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +0 -236
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +0 -64
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +0 -46
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +0 -225
- package/components/common/wizards/datastoreNew/add/types/Types.vue +0 -83
- package/components/common/wizards/datastoreNew/add/types/lib/config/typeOptions.ts +0 -41
- /package/components/common/wizards/{datastoreNew → datastore}/add/lib/models/enums.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/_kerberosAuthentication/KerberosAuthentication.vue +0 -0
- /package/components/common/wizards/datastore/add/nfs/{kerberosAuthentication → _kerberosAuthentication}/lib/config/radioOptions.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/accessibility/tablesView/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/DeletePopover.vue +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/ServersList.vue +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/serversListConfig.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/tableKeys.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/datastore/add/nfs/configuration/{serversList → _serversList}/lib/models/types.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/_version/Version.vue +0 -0
- /package/components/common/wizards/datastore/add/sharedStorm/{version → _version}/lib/config/versionOptions.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/models/types.ts +0 -0
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="new-datastore">
|
|
3
|
-
<atoms-wizard
|
|
4
|
-
show
|
|
5
|
-
:wizard="wizard"
|
|
6
|
-
:selected-scheme="selectedScheme"
|
|
7
|
-
:title="localization.newDatastore"
|
|
8
|
-
:localization="localization"
|
|
9
|
-
class="add-datastore"
|
|
10
|
-
test-id="add-datastore-wizard"
|
|
11
|
-
@change-steps="onChangeSteps"
|
|
12
|
-
@hide="onHideModal"
|
|
13
|
-
@submit="onFinish"
|
|
14
|
-
>
|
|
15
|
-
<template #modalBody="{ selectedStep }">
|
|
16
|
-
<common-wizards-datastore-new-add-types
|
|
17
|
-
v-if="selectedStep.id === 0"
|
|
18
|
-
v-model="form"
|
|
19
|
-
v-model:datastore-type="datastoreType"
|
|
20
|
-
:project="props.project"
|
|
21
|
-
/>
|
|
22
|
-
|
|
23
|
-
<common-wizards-datastore-new-add-local
|
|
24
|
-
v-if="selectedStep.id === 1"
|
|
25
|
-
v-model="form"
|
|
26
|
-
:project="props.project"
|
|
27
|
-
:step-id="selectedStep.id"
|
|
28
|
-
:datastore-type="datastoreType"
|
|
29
|
-
:alert-messages="alertMessages[1]"
|
|
30
|
-
:messages-fields="selectedStep.fields"
|
|
31
|
-
@hide-alert="onHideAlert"
|
|
32
|
-
/>
|
|
33
|
-
|
|
34
|
-
<common-wizards-datastore-new-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-new-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-new-add-ready-complete
|
|
60
|
-
v-show="selectedStep.id === 11"
|
|
61
|
-
:data-ready-view="dataReadyView"
|
|
62
|
-
/>
|
|
63
|
-
</template>
|
|
64
|
-
</atoms-wizard>
|
|
65
|
-
</div>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script setup lang="ts">
|
|
69
|
-
import type {
|
|
70
|
-
UI_I_WizardStep,
|
|
71
|
-
UI_I_ValidationReturn,
|
|
72
|
-
} from '~/components/atoms/wizard/lib/models/interfaces'
|
|
73
|
-
import Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
74
|
-
import {
|
|
75
|
-
stepsFunc,
|
|
76
|
-
stepsSchemeInitial,
|
|
77
|
-
} from '~/components/common/wizards/datastoreNew/add/lib/config/steps'
|
|
78
|
-
|
|
79
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
80
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
81
|
-
import type { UI_T_DatastoreType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
|
|
82
|
-
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastoreNew/add/lib/models/interfaces'
|
|
83
|
-
import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
84
|
-
import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces'
|
|
85
|
-
import type { UI_I_ChangeStepsSchemes } from '~/components/common/wizards/datastoreNew/add/lib/models/interfaces'
|
|
86
|
-
import { E_DatastoreTypeKode } from '~/components/common/wizards/datastoreNew/add/lib/models/enums'
|
|
87
|
-
import { constructDataReadyViewFunc } from '~/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails'
|
|
88
|
-
import * as validation from '~/components/common/wizards/datastoreNew/add/lib/validations'
|
|
89
|
-
|
|
90
|
-
const props = defineProps<{
|
|
91
|
-
project: UI_T_Project
|
|
92
|
-
nfsHosts?: UI_I_CreateDatastoreHosts
|
|
93
|
-
hostId?: string
|
|
94
|
-
isMainFilter?: boolean
|
|
95
|
-
}>()
|
|
96
|
-
const emits = defineEmits<{
|
|
97
|
-
(event: 'hide'): void
|
|
98
|
-
(event: 'finish', value: any): void
|
|
99
|
-
(event: 'main-filter', value: string): void
|
|
100
|
-
}>()
|
|
101
|
-
|
|
102
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
103
|
-
|
|
104
|
-
const wizard: Wizard = new Wizard(
|
|
105
|
-
stepsFunc(localization.value),
|
|
106
|
-
stepsSchemeInitial
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
|
|
110
|
-
const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
|
|
111
|
-
|
|
112
|
-
// const datastoreType = ref<UI_T_DatastoreType>(
|
|
113
|
-
// props.project === 'procurator' ? 'local' : 'shared-storm'
|
|
114
|
-
// )
|
|
115
|
-
const datastoreType = ref<UI_T_DatastoreType>('shared-storm')
|
|
116
|
-
const form = ref<UI_I_CreateDatastoreForm>({
|
|
117
|
-
name: 'Datastore',
|
|
118
|
-
lunDisk: [],
|
|
119
|
-
hosts: props.hostId ? [props?.hostId] : [],
|
|
120
|
-
type_code: E_DatastoreTypeKode[datastoreType.value],
|
|
121
|
-
nfsVersion: 'nfs-3',
|
|
122
|
-
readonly: false,
|
|
123
|
-
server: '',
|
|
124
|
-
folder: '',
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
const validationFunc = async (
|
|
128
|
-
value: UI_I_WizardStep[],
|
|
129
|
-
currentStep: UI_I_WizardStep,
|
|
130
|
-
nextStep: UI_I_WizardStep
|
|
131
|
-
): Promise<UI_I_ValidationReturn> => {
|
|
132
|
-
let stepHasError = false
|
|
133
|
-
|
|
134
|
-
if (wizard.isValidateForStep(1, currentStep.id, nextStep.id)) {
|
|
135
|
-
const nameValidation = await validation.checkDatastoreNameAsync(
|
|
136
|
-
localization.value,
|
|
137
|
-
value,
|
|
138
|
-
form.value,
|
|
139
|
-
1,
|
|
140
|
-
'datastoreName',
|
|
141
|
-
wizard,
|
|
142
|
-
props.project
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
value = nameValidation.newValue
|
|
146
|
-
|
|
147
|
-
stepHasError = nameValidation.stepHasError
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (wizard.isValidateForStep(2, currentStep.id, nextStep.id)) {
|
|
151
|
-
const nameValidation = await validation.checkDatastoreNameAsync(
|
|
152
|
-
localization.value,
|
|
153
|
-
value,
|
|
154
|
-
form.value,
|
|
155
|
-
2,
|
|
156
|
-
'datastoreName',
|
|
157
|
-
wizard,
|
|
158
|
-
props.project
|
|
159
|
-
)
|
|
160
|
-
|
|
161
|
-
value = nameValidation.newValue
|
|
162
|
-
|
|
163
|
-
const lunDiskValidation = validation.checkSelectedLunDiskSync(
|
|
164
|
-
localization.value,
|
|
165
|
-
form.value,
|
|
166
|
-
wizard,
|
|
167
|
-
value,
|
|
168
|
-
props.project,
|
|
169
|
-
props.hostId
|
|
170
|
-
)
|
|
171
|
-
|
|
172
|
-
value = lunDiskValidation.newValue
|
|
173
|
-
|
|
174
|
-
stepHasError = nameValidation.stepHasError || lunDiskValidation.stepHasError
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
if (wizard.isValidateForStep(5, currentStep.id, nextStep.id)) {
|
|
178
|
-
const nameValidation = await validation.checkDatastoreNameAsync(
|
|
179
|
-
localization.value,
|
|
180
|
-
value,
|
|
181
|
-
form.value,
|
|
182
|
-
5,
|
|
183
|
-
'name',
|
|
184
|
-
wizard,
|
|
185
|
-
props.project
|
|
186
|
-
)
|
|
187
|
-
value = nameValidation.newValue
|
|
188
|
-
|
|
189
|
-
const folderValidation = validation.checkNfsFolderSync(
|
|
190
|
-
localization.value,
|
|
191
|
-
form.value.folder,
|
|
192
|
-
wizard,
|
|
193
|
-
value
|
|
194
|
-
)
|
|
195
|
-
value = folderValidation.newValue
|
|
196
|
-
|
|
197
|
-
const serverValidation = validation.checkNfsServerSync(
|
|
198
|
-
localization.value,
|
|
199
|
-
form.value.server,
|
|
200
|
-
wizard,
|
|
201
|
-
value
|
|
202
|
-
)
|
|
203
|
-
value = serverValidation.newValue
|
|
204
|
-
|
|
205
|
-
stepHasError =
|
|
206
|
-
nameValidation.stepHasError ||
|
|
207
|
-
folderValidation.stepHasError ||
|
|
208
|
-
serverValidation.stepHasError
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (wizard.isValidateForStep(6, currentStep.id, nextStep.id)) {
|
|
212
|
-
const nameValidation = await validation.checkHostsAccessibilitySync(
|
|
213
|
-
localization.value,
|
|
214
|
-
form.value.hosts,
|
|
215
|
-
wizard,
|
|
216
|
-
value
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
value = nameValidation.newValue
|
|
220
|
-
|
|
221
|
-
stepHasError = nameValidation.stepHasError
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
return {
|
|
225
|
-
newValue: value,
|
|
226
|
-
stepHasError,
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
|
|
231
|
-
wizard.changeSteps(value, validationFunc)
|
|
232
|
-
|
|
233
|
-
// Choosing Scheme
|
|
234
|
-
watch(
|
|
235
|
-
datastoreType,
|
|
236
|
-
(newValue: UI_T_DatastoreType) => {
|
|
237
|
-
const schemes: UI_I_ChangeStepsSchemes = {
|
|
238
|
-
procurator: {
|
|
239
|
-
local: 0,
|
|
240
|
-
'shared-storm': 1,
|
|
241
|
-
nfs: 2,
|
|
242
|
-
},
|
|
243
|
-
sphere: {
|
|
244
|
-
'shared-storm': 3,
|
|
245
|
-
nfs: 4,
|
|
246
|
-
},
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const projectSchemes = schemes[props.project]
|
|
250
|
-
|
|
251
|
-
if (projectSchemes && projectSchemes[newValue] !== undefined) {
|
|
252
|
-
wizard.changeScheme(projectSchemes[newValue] as number)
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
{ deep: true, immediate: true }
|
|
256
|
-
)
|
|
257
|
-
|
|
258
|
-
const dataReadyView = computed<UI_I_DetailsItem>(() =>
|
|
259
|
-
constructDataReadyViewFunc(
|
|
260
|
-
localization.value,
|
|
261
|
-
form.value,
|
|
262
|
-
props.project,
|
|
263
|
-
props.nfsHosts
|
|
264
|
-
)
|
|
265
|
-
)
|
|
266
|
-
|
|
267
|
-
const onHideAlert = (stepId: number): void => {
|
|
268
|
-
wizard.hideAlertMessagesByStepId(stepId)
|
|
269
|
-
}
|
|
270
|
-
const onHideModal = (): void => {
|
|
271
|
-
emits('hide')
|
|
272
|
-
}
|
|
273
|
-
const onFinish = (): void => {
|
|
274
|
-
emits('finish', form.value)
|
|
275
|
-
}
|
|
276
|
-
// watch(
|
|
277
|
-
// () => props.isLoading,
|
|
278
|
-
// (newValue) => {
|
|
279
|
-
// wizard.setLoader(newValue)
|
|
280
|
-
// },
|
|
281
|
-
// { immediate: true }
|
|
282
|
-
// )
|
|
283
|
-
</script>
|
|
284
|
-
|
|
285
|
-
<style scoped lang="scss">
|
|
286
|
-
@import 'assets/scss/common/mixins.scss';
|
|
287
|
-
.new-datastore {
|
|
288
|
-
&__body {
|
|
289
|
-
@include flex($dir: column);
|
|
290
|
-
height: 100%;
|
|
291
|
-
padding-left: 24px;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.finish-block {
|
|
296
|
-
padding: 18px 24px 24px 24px;
|
|
297
|
-
|
|
298
|
-
.add-hosts-ready-to-complete-mt-12 {
|
|
299
|
-
margin-top: 12px;
|
|
300
|
-
|
|
301
|
-
.add-hosts-ready-to-complete-bold {
|
|
302
|
-
line-height: 18px;
|
|
303
|
-
font-weight: 700;
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
</style>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { UI_T_NfsType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
|
|
2
|
-
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
3
|
-
import type { UI_T_DatastoreType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
|
|
4
|
-
export interface UI_I_CreateDatastoreForm {
|
|
5
|
-
name: string
|
|
6
|
-
lunDisk: UI_I_CreateStorageLunDiskItem[]
|
|
7
|
-
nfsVersion: UI_T_NfsType
|
|
8
|
-
type_code: 1 | 2 | 4
|
|
9
|
-
readonly: boolean
|
|
10
|
-
server: string
|
|
11
|
-
folder: string
|
|
12
|
-
hosts: string[]
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export interface UI_I_ChangeStepsSchemes {
|
|
16
|
-
[key: string]: {
|
|
17
|
-
[key in UI_T_DatastoreType]?: number
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { API_UI_I_Error } from '~/lib/models/store/interfaces'
|
|
2
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
3
|
-
import Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
4
|
-
|
|
5
|
-
export const checkValidityName = async (
|
|
6
|
-
name: string,
|
|
7
|
-
wizard: Wizard,
|
|
8
|
-
project: UI_T_Project,
|
|
9
|
-
sendMessage: (message: string) => void
|
|
10
|
-
): Promise<void> => {
|
|
11
|
-
// TODO move to projects!!!
|
|
12
|
-
|
|
13
|
-
wizard.setLoader(true)
|
|
14
|
-
const kind = 10 // TODO move in global space
|
|
15
|
-
const url =
|
|
16
|
-
project === 'procurator'
|
|
17
|
-
? `/ui/ds/validate?name=${name}`
|
|
18
|
-
: `/ui/object/validate_name?name=${name}&kind=${kind}`
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
const { error } = await useMyFetch<null, API_UI_I_Error>(url, {
|
|
21
|
-
method: 'GET',
|
|
22
|
-
})
|
|
23
|
-
wizard.setLoader(false)
|
|
24
|
-
|
|
25
|
-
if (error.value && error.value.data.error_code !== 0) {
|
|
26
|
-
const existError = error.value.data?.error_message || error.value.data
|
|
27
|
-
sendMessage(existError)
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
sendMessage('')
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const validateNameAndGenerateDataId = (
|
|
34
|
-
name: string,
|
|
35
|
-
_errorMessage: string,
|
|
36
|
-
defaultDataId?: string
|
|
37
|
-
): string => {
|
|
38
|
-
let baseDataId = defaultDataId || 'storage-name-alert-error'
|
|
39
|
-
|
|
40
|
-
const patterns = [
|
|
41
|
-
{
|
|
42
|
-
regex: /^[a-zA-Z0-9_\-\.]+$/,
|
|
43
|
-
error_message:
|
|
44
|
-
/invalid name, must only contain letters, numbers, and '_', '-' '.' symbols/,
|
|
45
|
-
suffix: '-invalid-name-symbols',
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
regex: /^.{3,64}$/,
|
|
49
|
-
error_message:
|
|
50
|
-
/invalid name length, must be between: \d+ and \d+ characters/,
|
|
51
|
-
suffix: '-invalid-name-length',
|
|
52
|
-
},
|
|
53
|
-
]
|
|
54
|
-
|
|
55
|
-
// Проверка error_message на соответствие шаблонам
|
|
56
|
-
|
|
57
|
-
for (const pattern of patterns) {
|
|
58
|
-
if (!pattern.regex.test(name)) {
|
|
59
|
-
return `${baseDataId}${pattern.suffix}`
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return baseDataId
|
|
64
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="local-step">
|
|
3
|
-
<common-wizards-datastore-new-add-local-create-name
|
|
4
|
-
v-if="isShowCreateLocalNameBlock"
|
|
5
|
-
v-model="model.name"
|
|
6
|
-
:alert-messages="props.alertMessages"
|
|
7
|
-
:messages-fields="props.messagesFields"
|
|
8
|
-
@hide-alert="(e) => emits('hide-alert', e)"
|
|
9
|
-
/>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script lang="ts" setup>
|
|
14
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
15
|
-
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
16
|
-
import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
17
|
-
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
18
|
-
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastoreNew/add/lib/models/interfaces'
|
|
19
|
-
|
|
20
|
-
const props = defineProps<{
|
|
21
|
-
project: UI_T_Project
|
|
22
|
-
stepId: number
|
|
23
|
-
datastoreType: UI_T_DatastoreType
|
|
24
|
-
alertMessages: string[]
|
|
25
|
-
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
26
|
-
}>()
|
|
27
|
-
const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
28
|
-
const emits = defineEmits<{
|
|
29
|
-
(event: 'hide-alert', value: number): void
|
|
30
|
-
}>()
|
|
31
|
-
|
|
32
|
-
const isShowCreateLocalNameBlock = computed<boolean>(
|
|
33
|
-
() => props.project === 'procurator' && props.stepId === 1
|
|
34
|
-
)
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style lang="scss" scoped>
|
|
38
|
-
.local-step {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
overflow-y: auto;
|
|
42
|
-
overflow-x: hidden;
|
|
43
|
-
height: 100%;
|
|
44
|
-
}
|
|
45
|
-
</style>
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="create-datastore-name">
|
|
3
|
-
<atoms-alert
|
|
4
|
-
v-show="props.alertMessages.length"
|
|
5
|
-
test-id="create-storage-name-alert-error"
|
|
6
|
-
status="alert-danger"
|
|
7
|
-
:items="props.alertMessages"
|
|
8
|
-
@remove="onHideAlert"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<div class="clr-form-control clr-row">
|
|
12
|
-
<label for="datastore-name" class="clr-control-label clr-col-md-2">
|
|
13
|
-
{{ localization.common.datastoreName }}
|
|
14
|
-
</label>
|
|
15
|
-
|
|
16
|
-
<div class="clr-control-container" :class="nameErrorText && 'clr-error'">
|
|
17
|
-
<div class="flex-align-center">
|
|
18
|
-
<input
|
|
19
|
-
id="datastore-name"
|
|
20
|
-
v-model.trim="createDatastoreNameLocal"
|
|
21
|
-
data-id="datastore-name-input"
|
|
22
|
-
type="text"
|
|
23
|
-
class="clr-input"
|
|
24
|
-
@blur="initValidation(true)"
|
|
25
|
-
@input="initValidation(false)"
|
|
26
|
-
/>
|
|
27
|
-
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div class="clr-subtext" data-id="local-datastore-name-field-require">
|
|
31
|
-
{{ nameErrorText }}
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
37
|
-
|
|
38
|
-
<script lang="ts" setup>
|
|
39
|
-
import type {
|
|
40
|
-
UI_I_Localization,
|
|
41
|
-
UI_I_ArbitraryObject,
|
|
42
|
-
} from '~/lib/models/interfaces'
|
|
43
|
-
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
44
|
-
|
|
45
|
-
const props = defineProps<{
|
|
46
|
-
alertMessages: string[]
|
|
47
|
-
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
48
|
-
}>()
|
|
49
|
-
const createDatastoreNameLocal = defineModel<string>()
|
|
50
|
-
const emits = defineEmits<{
|
|
51
|
-
(event: 'hide-alert', value: number): void
|
|
52
|
-
}>()
|
|
53
|
-
|
|
54
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
55
|
-
|
|
56
|
-
/* Validation for Name input */
|
|
57
|
-
const isInitNameValidation = ref<boolean>(false)
|
|
58
|
-
const initValidation = (onlyBlur = false): void => {
|
|
59
|
-
onlyBlur && (isInitNameValidation.value = true)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const nameErrorText = computed<string>(() => {
|
|
63
|
-
if (
|
|
64
|
-
props.messagesFields?.datastoreName?.field &&
|
|
65
|
-
!createDatastoreNameLocal.value
|
|
66
|
-
) {
|
|
67
|
-
return props.messagesFields.datastoreName.field
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (!isInitNameValidation.value) return ''
|
|
71
|
-
return !createDatastoreNameLocal.value
|
|
72
|
-
? localization.value.common.specifyDatastoreName
|
|
73
|
-
: ''
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
const onHideAlert = (): void => {
|
|
77
|
-
emits('hide-alert', 1)
|
|
78
|
-
}
|
|
79
|
-
</script>
|
|
80
|
-
|
|
81
|
-
<style lang="scss" scoped>
|
|
82
|
-
.create-datastore-name {
|
|
83
|
-
&__alert-info {
|
|
84
|
-
:deep(.alert-text) {
|
|
85
|
-
font-size: 11px;
|
|
86
|
-
letter-spacing: normal;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
.clr-form-control {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-direction: row;
|
|
92
|
-
|
|
93
|
-
.clr-control-container {
|
|
94
|
-
min-height: 48px;
|
|
95
|
-
input {
|
|
96
|
-
width: 375px;
|
|
97
|
-
}
|
|
98
|
-
&.clr-error {
|
|
99
|
-
.clr-subtext,
|
|
100
|
-
.error-icon {
|
|
101
|
-
display: block;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
.clr-subtext,
|
|
105
|
-
.error-icon {
|
|
106
|
-
display: none;
|
|
107
|
-
}
|
|
108
|
-
.error-icon {
|
|
109
|
-
fill: #db2100;
|
|
110
|
-
width: 24px;
|
|
111
|
-
height: 24px;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="nfs-container">
|
|
3
|
-
<common-wizards-datastore-new-add-nfs-version
|
|
4
|
-
v-if="props.stepId === 4"
|
|
5
|
-
v-model="model.nfsVersion"
|
|
6
|
-
/>
|
|
7
|
-
|
|
8
|
-
<common-wizards-datastore-new-add-nfs-configuration
|
|
9
|
-
v-show="props.stepId === 5"
|
|
10
|
-
v-model="model"
|
|
11
|
-
:project="props.project"
|
|
12
|
-
:alert-messages="props.alertMessages"
|
|
13
|
-
:messages-fields="props.messagesFields"
|
|
14
|
-
@hide-alert="(e) => emits('hide-alert', e)"
|
|
15
|
-
/>
|
|
16
|
-
|
|
17
|
-
<common-wizards-datastore-new-add-nfs-accessibility
|
|
18
|
-
v-if="showHostAccessibility"
|
|
19
|
-
v-model="model.hosts"
|
|
20
|
-
:alert-messages="props.alertMessages"
|
|
21
|
-
:hosts="props.hosts"
|
|
22
|
-
@hide-alert="(e) => emits('hide-alert', e)"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script lang="ts" setup>
|
|
28
|
-
import type {
|
|
29
|
-
UI_I_Localization,
|
|
30
|
-
UI_I_ArbitraryObject,
|
|
31
|
-
} from '~/lib/models/interfaces'
|
|
32
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
33
|
-
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
34
|
-
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastoreNew/add/lib/models/interfaces'
|
|
35
|
-
|
|
36
|
-
const props = defineProps<{
|
|
37
|
-
project: UI_T_Project
|
|
38
|
-
stepId: number
|
|
39
|
-
alertMessages: string[]
|
|
40
|
-
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
41
|
-
hosts?: any
|
|
42
|
-
}>()
|
|
43
|
-
const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
44
|
-
const emits = defineEmits<{
|
|
45
|
-
(event: 'hide-alert', value: number): void
|
|
46
|
-
}>()
|
|
47
|
-
|
|
48
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
49
|
-
|
|
50
|
-
const showHostAccessibility = computed<boolean>(() => {
|
|
51
|
-
return props.project === 'sphere' && props.stepId === 6
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
54
|
-
|
|
55
|
-
<style lang="scss" scoped>
|
|
56
|
-
@import '~/assets/scss/common/mixins.scss';
|
|
57
|
-
.nfs-container {
|
|
58
|
-
@include flex($dir: column);
|
|
59
|
-
height: inherit;
|
|
60
|
-
&__desc {
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const kerberosOptionsFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
): UI_I_RadioOption[] => {
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
label: localization.common.dontUseKerberosAuthentication,
|
|
10
|
-
value: 'dont-use',
|
|
11
|
-
disabled: false,
|
|
12
|
-
testId: 'dont-use-value',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: localization.common.useKerberosAuthenticationKrb5,
|
|
16
|
-
value: 'use-only-krb5',
|
|
17
|
-
disabled: false,
|
|
18
|
-
testId: 'use-only-krb5-value',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: localization.common.useKerberosAuthenticationIntegrity,
|
|
22
|
-
value: 'use-integrity',
|
|
23
|
-
disabled: false,
|
|
24
|
-
testId: 'use-integrity-value',
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
}
|