bfg-common 1.3.452 → 1.3.453
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/nfs/configuration/Configuration.vue +12 -8
- package/components/common/wizards/datastoreNew/add/Add.vue +3 -0
- package/components/common/wizards/datastoreNew/add/lib/config/steps.ts +14 -1
- package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +8 -21
- package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +5 -6
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +4 -7
- package/package.json +1 -1
- package/components/common/wizards/datastoreNew/add/local/createName/lib/config/defaultForm.ts +0 -15
|
@@ -144,22 +144,26 @@
|
|
|
144
144
|
</template>
|
|
145
145
|
|
|
146
146
|
<script lang="ts" setup>
|
|
147
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
147
148
|
import { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
|
|
148
|
-
import {
|
|
149
|
+
import type {
|
|
150
|
+
UI_I_Localization,
|
|
151
|
+
UI_I_ArbitraryObject,
|
|
152
|
+
} from '~/lib/models/interfaces'
|
|
153
|
+
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
149
154
|
import {
|
|
150
155
|
UI_I_DataServersListItem,
|
|
151
156
|
UI_I_FormValidationConfiguration,
|
|
152
157
|
} from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces'
|
|
153
|
-
import {
|
|
154
|
-
UI_T_NfsType,
|
|
155
|
-
UI_T_WizardDatastoreMode,
|
|
156
|
-
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
158
|
+
import { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
157
159
|
import { UI_I_ConfigurationSendDataNfs } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
|
|
158
160
|
import { defaultFormFunc } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/config/defaultForm'
|
|
159
161
|
import { checkValidityName } from '~/components/common/wizards/datastore/add/lib/utils'
|
|
160
162
|
|
|
161
163
|
const props = defineProps<{
|
|
162
|
-
|
|
164
|
+
project: UI_T_Project
|
|
165
|
+
alertMessages: string[]
|
|
166
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
163
167
|
nfsVersion: UI_T_NfsType
|
|
164
168
|
nfsConfigurationSubmit: number
|
|
165
169
|
}>()
|
|
@@ -263,7 +267,7 @@ const dataServers = ref<UI_I_DataServersListItem[]>([])
|
|
|
263
267
|
// // if (nfsVersion === 'nfs-4.1') server.value = ''
|
|
264
268
|
// }
|
|
265
269
|
|
|
266
|
-
const alertInfo = ref<boolean>(props.
|
|
270
|
+
const alertInfo = ref<boolean>(props.project === 'procurator')
|
|
267
271
|
|
|
268
272
|
const resetValidation = (): void => {
|
|
269
273
|
isInitNameValidation.value =
|
|
@@ -295,7 +299,7 @@ const submit = async (): Promise<void> => {
|
|
|
295
299
|
|
|
296
300
|
emits('loading', true)
|
|
297
301
|
|
|
298
|
-
const { valid, msg } = await checkValidityName(name.value, props.
|
|
302
|
+
const { valid, msg } = await checkValidityName(name.value, props.project)
|
|
299
303
|
|
|
300
304
|
emits('loading', false)
|
|
301
305
|
|
|
@@ -142,6 +142,9 @@ const form = ref<any>({
|
|
|
142
142
|
lunDisk: [],
|
|
143
143
|
type_code: E_DatastoreTypeKode[datastoreType.value],
|
|
144
144
|
nfsVersion: 'nfs-3',
|
|
145
|
+
readonly: false,
|
|
146
|
+
server: '',
|
|
147
|
+
folder: '',
|
|
145
148
|
})
|
|
146
149
|
const datastoreForm = ref<UI_I_CreateDatastoreForm>({
|
|
147
150
|
local: {
|
|
@@ -66,7 +66,20 @@ export const stepsFunc = (
|
|
|
66
66
|
title: localization.nameAndConfiguration,
|
|
67
67
|
subTitle: localization.nameAndConfigurationDesc,
|
|
68
68
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
69
|
-
fields: {
|
|
69
|
+
fields: {
|
|
70
|
+
name: {
|
|
71
|
+
alert: '',
|
|
72
|
+
field: '',
|
|
73
|
+
},
|
|
74
|
+
folder: {
|
|
75
|
+
alert: '',
|
|
76
|
+
field: '',
|
|
77
|
+
},
|
|
78
|
+
server: {
|
|
79
|
+
alert: '',
|
|
80
|
+
field: '',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
70
83
|
isValid: true,
|
|
71
84
|
testId: 'select-name-and-configuration',
|
|
72
85
|
},
|
|
@@ -40,10 +40,7 @@ import type {
|
|
|
40
40
|
UI_I_Localization,
|
|
41
41
|
UI_I_ArbitraryObject,
|
|
42
42
|
} from '~/lib/models/interfaces'
|
|
43
|
-
import type { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
|
|
44
43
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
45
|
-
import type { UI_I_FormValidationDataStore } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
46
|
-
import { defaultFormFunc } from '~/components/common/wizards/datastoreNew/add/local/createName/lib/config/defaultForm'
|
|
47
44
|
|
|
48
45
|
const props = defineProps<{
|
|
49
46
|
alertMessages: string[]
|
|
@@ -55,35 +52,25 @@ const emits = defineEmits<{
|
|
|
55
52
|
}>()
|
|
56
53
|
|
|
57
54
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
58
|
-
const { $validation } = useNuxtApp()
|
|
59
|
-
|
|
60
|
-
const validation = $validation.call({})
|
|
61
|
-
const defaultForm: UI_I_FormValidationDataStore = defaultFormFunc(
|
|
62
|
-
localization.value
|
|
63
|
-
)
|
|
64
|
-
const form = ref<UI_I_FormValidationDataStore>(useDeepCopy(defaultForm))
|
|
65
|
-
|
|
66
|
-
const setForm = () => {
|
|
67
|
-
form.value = useDeepCopy(defaultForm)
|
|
68
|
-
validation.setForm(form)
|
|
69
|
-
}
|
|
70
|
-
setForm()
|
|
71
|
-
|
|
72
|
-
const validForm = ref<UI_I_ValidationTouchResult | null>(null)
|
|
73
55
|
|
|
74
56
|
/* Validation for Name input */
|
|
75
57
|
const isInitNameValidation = ref<boolean>(false)
|
|
76
58
|
const initValidation = (onlyBlur = false): void => {
|
|
77
|
-
validForm.value = validation.touch()
|
|
78
59
|
onlyBlur && (isInitNameValidation.value = true)
|
|
79
60
|
}
|
|
61
|
+
|
|
80
62
|
const nameErrorText = computed<string>(() => {
|
|
81
|
-
if (
|
|
63
|
+
if (
|
|
64
|
+
props.messagesFields?.datastoreName?.field &&
|
|
65
|
+
!createDatastoreNameLocal.value
|
|
66
|
+
) {
|
|
82
67
|
return props.messagesFields.datastoreName.field
|
|
83
68
|
}
|
|
84
69
|
|
|
85
70
|
if (!isInitNameValidation.value) return ''
|
|
86
|
-
return
|
|
71
|
+
return !createDatastoreNameLocal.value
|
|
72
|
+
? localization.value.specifyDatastoreName
|
|
73
|
+
: ''
|
|
87
74
|
})
|
|
88
75
|
|
|
89
76
|
const onHideAlert = (): void => {
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
<common-wizards-datastore-add-nfs-configuration
|
|
9
9
|
v-show="props.stepId === 5"
|
|
10
|
-
:
|
|
10
|
+
:project="props.project"
|
|
11
|
+
:alert-messages="props.alertMessages"
|
|
12
|
+
:messages-fields="props.selectedStep"
|
|
11
13
|
:nfs-version="model.nfsVersion"
|
|
12
14
|
:nfs-configuration-submit="nfsConfigurationSubmit"
|
|
13
15
|
@loading="(e) => emits('loading', e)"
|
|
@@ -35,10 +37,7 @@ import type {
|
|
|
35
37
|
} from '~/lib/models/interfaces'
|
|
36
38
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
37
39
|
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
38
|
-
import {
|
|
39
|
-
UI_T_DatastoreType,
|
|
40
|
-
UI_T_NfsType,
|
|
41
|
-
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
40
|
+
import { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
42
41
|
import { UI_I_ConfigurationSendDataNfs } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
|
|
43
42
|
|
|
44
43
|
const props = defineProps<{
|
|
@@ -85,7 +84,7 @@ const onChangeAccessibilityAndNext = (hosts: string[]): void => {
|
|
|
85
84
|
@import '~/assets/scss/common/mixins.scss';
|
|
86
85
|
.nfs-container {
|
|
87
86
|
@include flex($dir: column);
|
|
88
|
-
height:
|
|
87
|
+
height: inherit;
|
|
89
88
|
&__desc {
|
|
90
89
|
}
|
|
91
90
|
}
|
package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
data-id="device-selection-input"
|
|
22
22
|
type="text"
|
|
23
23
|
class="clr-input"
|
|
24
|
-
@blur="initValidation"
|
|
25
|
-
@input="
|
|
24
|
+
@blur="initValidation(true)"
|
|
25
|
+
@input="initValidation(false)"
|
|
26
26
|
/>
|
|
27
27
|
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
28
28
|
</div>
|
|
@@ -137,11 +137,8 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
137
137
|
const { $store } = useNuxtApp()
|
|
138
138
|
|
|
139
139
|
const isInitDatastoreNameValidation = ref<boolean>(false)
|
|
140
|
-
const initValidation = (): void => {
|
|
141
|
-
isInitDatastoreNameValidation.value = true
|
|
142
|
-
}
|
|
143
|
-
const onInput = (): void => {
|
|
144
|
-
if (!isInitDatastoreNameValidation.value) return
|
|
140
|
+
const initValidation = (onlyBlur: boolean): void => {
|
|
141
|
+
onlyBlur && (isInitDatastoreNameValidation.value = true)
|
|
145
142
|
}
|
|
146
143
|
|
|
147
144
|
const nameErrorText = computed<string>(() => {
|
package/package.json
CHANGED
package/components/common/wizards/datastoreNew/add/local/createName/lib/config/defaultForm.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
|
|
3
|
-
export const defaultFormFunc = (localization: UI_I_Localization): any => {
|
|
4
|
-
return {
|
|
5
|
-
name: {
|
|
6
|
-
value: '',
|
|
7
|
-
validations: [
|
|
8
|
-
{
|
|
9
|
-
value: 'required',
|
|
10
|
-
errorText: localization.specifyDatastoreName,
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
}
|