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.
Files changed (98) hide show
  1. package/components/common/wizards/datastore/add/Add.vue +232 -362
  2. package/components/common/wizards/{datastoreNew → datastore}/add/lib/config/steps.ts +3 -0
  3. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +11 -30
  4. package/components/common/wizards/datastore/add/lib/models/types.ts +0 -7
  5. package/components/common/wizards/datastore/add/lib/utils.ts +14 -54
  6. package/components/common/wizards/{datastoreNew → datastore}/add/lib/validations.ts +2 -2
  7. package/components/common/wizards/datastore/add/local/Local.vue +19 -45
  8. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +31 -81
  9. package/components/common/wizards/datastore/add/nfs/Nfs.vue +25 -74
  10. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +15 -56
  11. package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces.ts +0 -4
  12. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +9 -66
  13. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +1 -1
  14. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +57 -214
  15. package/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces.ts +4 -11
  16. package/components/common/wizards/datastore/add/nfs/version/Version.vue +3 -19
  17. package/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions.ts +4 -4
  18. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +3 -10
  19. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +37 -95
  20. package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +32 -45
  21. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +64 -267
  22. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +5 -5
  23. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +1 -11
  24. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/types.ts +1 -14
  25. package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/Table.vue +2 -2
  26. package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable.ts +1 -1
  27. package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/tableKeys.ts +1 -1
  28. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +13 -13
  29. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +8 -8
  30. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +2 -2
  31. package/components/common/wizards/datastore/add/types/Types.vue +18 -17
  32. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +7 -16
  33. package/lib/models/enums.ts +1 -0
  34. package/package.json +1 -1
  35. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +0 -225
  36. package/components/common/wizards/datastore/add/local/createName/lib/config/defaultForm.ts +0 -15
  37. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -53
  38. package/components/common/wizards/datastore/add/nfs/configuration/lib/config/defaultForm.ts +0 -33
  39. package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +0 -100
  40. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +0 -124
  41. package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/serversListConfig.ts +0 -40
  42. package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/tableKeys.ts +0 -3
  43. package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces.ts +0 -11
  44. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +0 -55
  45. package/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces.ts +0 -4
  46. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +0 -144
  47. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/hostsTable.ts +0 -87
  48. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/tableKeys.ts +0 -11
  49. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/defaultForm.ts +0 -18
  50. package/components/common/wizards/datastore/add/sharedStorm/version/Version.vue +0 -39
  51. package/components/common/wizards/datastoreNew/add/Add.vue +0 -307
  52. package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +0 -19
  53. package/components/common/wizards/datastoreNew/add/lib/models/types.ts +0 -7
  54. package/components/common/wizards/datastoreNew/add/lib/utils.ts +0 -64
  55. package/components/common/wizards/datastoreNew/add/local/Local.vue +0 -45
  56. package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +0 -116
  57. package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +0 -63
  58. package/components/common/wizards/datastoreNew/add/nfs/_kerberosAuthentication/lib/config/radioOptions.ts +0 -27
  59. package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +0 -63
  60. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +0 -24
  61. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/interfaces.ts +0 -9
  62. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/types.ts +0 -5
  63. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +0 -85
  64. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
  65. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
  66. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
  67. package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +0 -236
  68. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/models/types.ts +0 -1
  69. package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +0 -5
  70. package/components/common/wizards/datastoreNew/add/nfs/version/Version.vue +0 -26
  71. package/components/common/wizards/datastoreNew/add/nfs/version/lib/config/versionOptions.ts +0 -22
  72. package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +0 -88
  73. package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +0 -140
  74. package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +0 -84
  75. package/components/common/wizards/datastoreNew/add/sharedStorm/_version/lib/config/versionOptions.ts +0 -21
  76. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +0 -276
  77. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +0 -23
  78. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +0 -48
  79. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts +0 -1
  80. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +0 -236
  81. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +0 -64
  82. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +0 -46
  83. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +0 -225
  84. package/components/common/wizards/datastoreNew/add/types/Types.vue +0 -83
  85. package/components/common/wizards/datastoreNew/add/types/lib/config/typeOptions.ts +0 -41
  86. /package/components/common/wizards/{datastoreNew → datastore}/add/lib/models/enums.ts +0 -0
  87. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/_kerberosAuthentication/KerberosAuthentication.vue +0 -0
  88. /package/components/common/wizards/datastore/add/nfs/{kerberosAuthentication → _kerberosAuthentication}/lib/config/radioOptions.ts +0 -0
  89. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/accessibility/tablesView/lib/models/interfaces.ts +0 -0
  90. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/DeletePopover.vue +0 -0
  91. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/ServersList.vue +0 -0
  92. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/serversListConfig.ts +0 -0
  93. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/tableKeys.ts +0 -0
  94. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/models/interfaces.ts +0 -0
  95. /package/components/common/wizards/datastore/add/nfs/configuration/{serversList → _serversList}/lib/models/types.ts +0 -0
  96. /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/_version/Version.vue +0 -0
  97. /package/components/common/wizards/datastore/add/sharedStorm/{version → _version}/lib/config/versionOptions.ts +0 -0
  98. /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/models/types.ts +0 -0
@@ -2,7 +2,7 @@
2
2
  <div class="data-table-view">
3
3
  <div>
4
4
  <atoms-table-data-grid
5
- v-model:selected-row="selected"
5
+ v-model:selected-row="selectedHostsIdLocal"
6
6
  v-model:page-size="pagination.pageSize"
7
7
  v-model:page="pagination.page"
8
8
  type="checkbox"
@@ -14,8 +14,6 @@
14
14
  :total-pages="props.totalPages"
15
15
  :items-per-page="itemsPerPage"
16
16
  :loading="loading"
17
- @filtering="filtering"
18
- @sorting="sorting"
19
17
  >
20
18
  <template #icon="{ item }">
21
19
  <span :class="['datagrid-cell-icon', item.data.iconClassName]" />
@@ -35,77 +33,33 @@ import type {
35
33
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
36
34
  import type { UI_I_Localization } from '~/lib/models/interfaces'
37
35
  import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
36
+ import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
38
37
  import type { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
39
- import type {
38
+ import {
40
39
  I_CompatibleHostsTable,
41
40
  I_IncompatibleHostsTable,
42
41
  } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
43
- import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
44
42
  import * as compatibleTable from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable'
45
43
  import * as incompatibleTable from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/incompatibleTable'
46
44
 
47
45
  const props = defineProps<{
48
46
  dataTable: I_CompatibleHostsTable[] | I_IncompatibleHostsTable[]
49
- selectedRow: number[]
50
47
  tableType: T_HostsAccessibilityTab
51
48
  totalItems: number
52
49
  totalPages: number
53
- pagination: UI_I_Pagination
54
- }>()
55
- const emits = defineEmits<{
56
- (event: 'update:selected-row', value: number[]): void
57
- (event: 'pagination', value: UI_I_Pagination): void
58
- (event: 'sort', value: string): void
59
50
  }>()
51
+ const selectedHostsIdLocal = defineModel<string[]>()
60
52
 
61
53
  const localization = computed<UI_I_Localization>(() => useLocal())
62
54
 
63
55
  const loading = computed<boolean>(() => false)
64
56
 
65
- const selected = computed<number[]>({
66
- get() {
67
- return props.selectedRow
68
- },
69
- set(value) {
70
- emits('update:selected-row', value)
71
- },
72
- })
73
-
74
- const filtering = (e: [string, string][]): void => {
75
- console.log(e, 111)
76
- }
77
- const sorting = (e: [number, boolean]): void => {
78
- const [column, status] = e
79
- const direction = status ? 'desc' : 'asc'
80
-
81
- const sort = `${column}.${direction}`
82
-
83
- emits('sort', sort)
84
- }
85
-
86
57
  const pagination = ref<UI_I_Pagination>({
87
58
  page: 1,
88
59
  pageSize: 1,
89
60
  })
90
- watch(
91
- () => props.pagination,
92
- (newValue) => {
93
- pagination.value = newValue
94
- },
95
- { immediate: true }
96
- )
97
- watch(
98
- pagination,
99
- (newValue) => {
100
- emits('pagination', newValue)
101
- },
102
- { deep: true, immediate: true }
103
- )
104
- interface TablesView {
105
- 'compatible-hosts': any
106
- 'incompatible-hosts': any
107
- }
108
- const tables: TablesView = {
61
+
62
+ const tables: any = {
109
63
  'compatible-hosts': compatibleTable,
110
64
  'incompatible-hosts': incompatibleTable,
111
65
  }
@@ -113,20 +67,9 @@ const tables: TablesView = {
113
67
  const headItems = computed<UI_I_HeadItem[]>(() =>
114
68
  tables[props.tableType].headItems(localization.value)
115
69
  )
116
-
117
- const bodyItems = ref<UI_I_BodyItem[][]>([])
118
- watch(
119
- () => props.dataTable,
120
- (newValue) => {
121
- if (!newValue?.length) {
122
- bodyItems.value = []
123
- return
124
- }
125
-
126
- bodyItems.value = tables[props.tableType].bodyItems(newValue)
127
- },
128
- { deep: true, immediate: true }
129
- )
70
+ const bodyItems = computed<UI_I_BodyItem[][]>(() => {
71
+ return tables[props.tableType].bodyItems(props.dataTable)
72
+ })
130
73
  </script>
131
74
 
132
75
  <style lang="scss" scoped>
@@ -3,8 +3,8 @@ import type {
3
3
  UI_I_BodyItem,
4
4
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
5
  import type { UI_I_Localization } from '~/lib/models/interfaces'
6
- import type { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
7
6
  import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
7
+ import type { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
8
8
  import { compatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
9
9
  import {
10
10
  hostIconByState,
@@ -2,11 +2,11 @@
2
2
  <div class="configuration">
3
3
  <div>
4
4
  <atoms-alert
5
- v-show="errors.length"
6
- test-id="configuration-error"
5
+ v-show="props.alertMessages?.length"
6
+ test-id="configure-error-alert"
7
7
  status="alert-danger"
8
- :items="errors"
9
- @remove="onCloseAlertDanger"
8
+ :items="props.alertMessages"
9
+ @remove="onHideAlert"
10
10
  />
11
11
 
12
12
  <atoms-alert
@@ -30,12 +30,12 @@
30
30
  <div class="flex-align-center">
31
31
  <input
32
32
  id="configuration-name-input"
33
- v-model="form.name.value"
33
+ v-model="model.name"
34
34
  data-id="configuration-name-input"
35
35
  type="text"
36
36
  class="clr-input"
37
- @blur="onBlurInputName"
38
- @input="onInputName"
37
+ @blur="initValidation(true, ['name'])"
38
+ @input="initValidation(false, ['name'])"
39
39
  />
40
40
  <atoms-the-icon class="error-icon" name="info-circle" />
41
41
  </div>
@@ -58,12 +58,12 @@
58
58
  <div class="flex-align-center">
59
59
  <input
60
60
  id="configuration-folder-input"
61
- v-model="form.folder.value"
61
+ v-model="model.folder"
62
62
  data-id="configuration-folder-input"
63
63
  type="text"
64
64
  class="clr-input"
65
- @blur="onBlurInputFolder"
66
- @input="onInputFolder"
65
+ @blur="initValidation(true, ['folder'])"
66
+ @input="initValidation(false, ['folder'])"
67
67
  />
68
68
  <atoms-the-icon class="error-icon" name="info-circle" />
69
69
  </div>
@@ -90,13 +90,13 @@
90
90
  >
91
91
  <div class="flex-align-center input-action-wrapper">
92
92
  <input
93
- id="configuration-server-input"
94
- v-model="form.server.value"
95
- data-id="configuration-server-input"
93
+ id="configuration-folder-input"
94
+ v-model="model.server"
95
+ data-id="configuration-folder-input"
96
96
  type="text"
97
97
  class="clr-input"
98
- @blur="onBlurInputServer"
99
- @input="onInputServer"
98
+ @blur="initValidation(true, ['server'])"
99
+ @input="initValidation(false, ['server'])"
100
100
  />
101
101
  <atoms-the-icon class="error-icon" name="info-circle" />
102
102
  </div>
@@ -111,231 +111,74 @@
111
111
  E.g: nas, nas.it.com or 192.168.0.1
112
112
  </div>
113
113
  </div>
114
-
115
- <!-- <button-->
116
- <!-- v-show="props.nfsVersion === 'nfs-4.1' && false"-->
117
- <!-- class="btn btn-sm nd-mt-0"-->
118
- <!-- @click="onAddServerToList"-->
119
- <!-- >-->
120
- <!-- {{ localization.add }}-->
121
- <!-- </button>-->
122
- </div>
123
-
124
- <div
125
- v-show="props.nfsVersion === 'nfs-4.1' && false"
126
- class="configuration__servers-list"
127
- >
128
- <common-wizards-datastore-add-nfs-configuration-servers-list
129
- v-model:data-table="dataServers"
130
- />
131
- </div>
132
- </div>
133
-
134
- <div v-if="false" class="clr-form-control clr-row mt-1">
135
- <label for="" class="clr-control-label clr-col-md-2">{{
136
- localization.localization.accessMode
137
- }}</label>
138
-
139
- <div class="clr-col-md-10 clr-col-12 clr-checkbox-wrapper">
140
- <input
141
- id="playback-compression"
142
- v-model="accessMode"
143
- data-id="playback-compression-checkbox"
144
- type="checkbox"
145
- />
146
- <label for="playback-compression" class="clr-control-label">{{
147
- localization.localization.mountNfsReadOnly
148
- }}</label>
149
114
  </div>
150
115
  </div>
151
116
  </div>
152
117
  </template>
153
118
 
154
119
  <script lang="ts" setup>
155
- import type { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
156
- import type { UI_I_Localization } from '~/lib/models/interfaces'
157
- import type {
158
- UI_I_DataServersListItem,
159
- UI_I_FormValidationConfiguration,
160
- } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces'
120
+ import type { UI_T_Project } from '~/lib/models/types'
161
121
  import type {
162
- UI_T_NfsType,
163
- UI_T_WizardDatastoreMode,
164
- } from '~/components/common/wizards/datastore/add/lib/models/types'
165
- import type { UI_I_ConfigurationSendDataNfs } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
166
- import { defaultFormFunc } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/config/defaultForm'
167
- import { checkValidityName } from '~/components/common/wizards/datastore/add/lib/utils'
122
+ UI_I_Localization,
123
+ UI_I_ArbitraryObject,
124
+ } from '~/lib/models/interfaces'
125
+ import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
126
+ import type { UI_I_InitialValidationFields } from '~/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces'
168
127
 
169
128
  const props = defineProps<{
170
- mode: UI_T_WizardDatastoreMode
171
- nfsVersion: UI_T_NfsType
172
- nfsConfigurationSubmit: number
129
+ project: UI_T_Project
130
+ alertMessages: string[]
131
+ messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
173
132
  }>()
174
- const localization = computed<UI_I_Localization>(() => useLocal())
133
+ const model = defineModel<any>()
175
134
  const emits = defineEmits<{
176
- (event: 'loading', value: boolean): void
177
- (event: 'next', value: UI_I_ConfigurationSendDataNfs): void
135
+ (event: 'hide-alert', value: number): void
178
136
  }>()
179
- const { $validation } = useNuxtApp()
180
-
181
- const validation = $validation.call({})
182
- const defaultForm: UI_I_FormValidationConfiguration = defaultFormFunc(
183
- localization.value
184
- )
185
- const form = ref<UI_I_FormValidationConfiguration>(useDeepCopy(defaultForm))
186
- const setForm = () => {
187
- form.value = useDeepCopy(defaultForm)
188
- validation.setForm(form)
189
- }
190
- setForm()
191
-
192
- const validForm = ref<UI_I_ValidationTouchResult | null>(null)
193
-
194
- /* Validation for Name input */
195
- const isInitNameValidation = ref<boolean>(false)
196
- const onBlurInputName = (): void => {
197
- validForm.value = validation.touch()
198
- isInitNameValidation.value = true
199
- }
200
- const onInputName = (): void => {
201
- validForm.value = validation.touch()
202
- }
203
-
204
- const nameErrorText = computed<string>(() => {
205
- if (!isInitNameValidation.value) return ''
206
- return validForm.value?.errors?.name?.[0] || ''
207
- })
208
- /* Validation Name input end */
209
-
210
- /* Validation for Folder input */
211
- const isInitFolderValidation = ref<boolean>(false)
212
- const onBlurInputFolder = (): void => {
213
- validForm.value = validation.touch()
214
- isInitFolderValidation.value = true
215
- }
216
- const onInputFolder = (): void => {
217
- validForm.value = validation.touch()
218
- }
219
-
220
- const folderErrorText = computed<string>(() => {
221
- if (!isInitFolderValidation.value) return ''
222
- return validForm.value?.errors?.folder?.[0] || ''
223
- })
224
- /* Validation Folder input end */
225
137
 
226
- /* Validation for Server input */
227
- const isInitServerValidation = ref<boolean>(false)
228
- const onBlurInputServer = (): void => {
229
- validForm.value = validation.touch()
230
- isInitServerValidation.value = true
231
- }
232
- const onInputServer = (): void => {
233
- validForm.value = validation.touch()
234
- isInitServerValidation.value = true
235
- }
138
+ const localization = computed<UI_I_Localization>(() => useLocal())
236
139
 
237
- const serverErrorText = computed<string>(() => {
238
- // if (!isInitServerValidation.value || dataServers.value.length) return ''
239
- if (!isInitServerValidation.value) return ''
240
- return validForm.value?.errors?.server?.[0] || ''
140
+ const initValidationFields = ref<UI_I_InitialValidationFields>({
141
+ name: false,
142
+ folder: false,
143
+ server: false,
241
144
  })
242
-
243
- /* Validation Folder Server end */
244
-
245
- const accessMode = ref<boolean>(false)
246
-
247
- const dataServers = ref<UI_I_DataServersListItem[]>([])
248
- // const onAddServerToList = (): void => {
249
- // const { server } = form.value
250
- // // const { nfsVersion } = props
251
- //
252
- // if (!dataServers.value.length && !server.value) {
253
- // validForm.value = validation.touch()
254
- // isInitServerValidation.value = true
255
- //
256
- // return
257
- // }
258
- //
259
- // // if (dataServers.value.length && !server.value) return
260
- //
261
- // const data: UI_I_DataServersListItem = {
262
- // server_name: server.value,
263
- // }
264
- //
265
- // const hasEqualItem = !!dataServers.value.find(
266
- // (server: UI_I_DataServersListItem) => server.server_name === data.server_name
267
- // )
268
- //
269
- // !hasEqualItem && dataServers.value.push(data)
270
- //
271
- // // if (nfsVersion === 'nfs-4.1') server.value = ''
272
- // }
273
-
274
- const alertInfo = ref<boolean>(props.mode === 'procurator')
275
-
276
- const resetValidation = (): void => {
277
- isInitNameValidation.value =
278
- isInitFolderValidation.value =
279
- isInitServerValidation.value =
280
- false
281
- validForm.value = null
282
- errors.value = []
145
+ const initValidation = (onlyBlur = false, types: string[]): void => {
146
+ onlyBlur && types.forEach((type) => (initValidationFields.value[type] = true))
283
147
  }
284
148
 
285
- watch(
286
- () => props.nfsConfigurationSubmit,
287
- () => {
288
- submit()
289
- }
290
- )
291
- const submit = async (): Promise<void> => {
292
- const { name, server, folder } = form.value
293
-
294
- validForm.value = validation.touch()
295
- isInitNameValidation.value =
296
- isInitFolderValidation.value =
297
- isInitServerValidation.value =
298
- true
299
-
300
- if (nameErrorText.value || folderErrorText.value || serverErrorText.value) {
301
- return
149
+ /* Validation error text for Name input field */
150
+ const nameErrorText = computed<string>(() => {
151
+ if (props.messagesFields?.name?.field && !model.value.name) {
152
+ return props.messagesFields.name.field
302
153
  }
303
154
 
304
- emits('loading', true)
305
-
306
- const { valid, msg } = await checkValidityName(name.value, props.mode)
307
-
308
- emits('loading', false)
155
+ if (!initValidationFields.value.name) return ''
156
+ return !model.value.name ? localization.value.common.specifyDatastoreName : ''
157
+ })
309
158
 
310
- if (!valid) {
311
- showValidationErrors(msg)
312
- return
159
+ /* Validation error text for Folder input field */
160
+ const folderErrorText = computed<string>(() => {
161
+ if (props.messagesFields.folder?.field && !model.value.folder) {
162
+ return props.messagesFields.folder.field
313
163
  }
314
164
 
315
- // if (server.value) onAddServerToList()
316
-
317
- resetValidation()
165
+ if (!initValidationFields.value.folder) return ''
166
+ return !model.value.folder ? localization.value.common.specifyFolderName : ''
167
+ })
318
168
 
319
- const configurationData: UI_I_ConfigurationSendDataNfs = {
320
- name: name.value,
321
- folder: folder.value,
322
- server: server.value,
169
+ /* Validation error text for Server input field */
170
+ const serverErrorText = computed<string>(() => {
171
+ if (props.messagesFields.server?.field && !model.value.server) {
172
+ return props.messagesFields.server.field
323
173
  }
324
174
 
325
- emits('next', configurationData)
326
- // if (props.nfsVersion !== 'nfs-4.1') {
327
- // dataServers.value = []
328
- // }
329
- }
330
-
331
- const errors = ref<string[]>([])
332
-
333
- const showValidationErrors = (errorText: string): void => {
334
- errors.value = [errorText]
335
- }
336
- const onCloseAlertDanger = (): void => {
337
- errors.value = []
175
+ if (!initValidationFields.value.server) return ''
176
+ return !model.value.server ? localization.value.common.specifyServerName : ''
177
+ })
178
+ const onHideAlert = (): void => {
179
+ emits('hide-alert', 5)
338
180
  }
181
+ const alertInfo = ref<boolean>(props.project === 'procurator')
339
182
  </script>
340
183
 
341
184
  <style lang="scss" scoped>
@@ -1,12 +1,5 @@
1
- import type { UI_I_DataServersListItem } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces'
2
-
3
- // export interface I_ServerNfs {
4
- // server_name: string
5
- // }
6
- export interface UI_I_ConfigurationSendDataNfs {
7
- name: string
8
- folder: string
9
- server: UI_I_DataServersListItem[]
10
-
11
- // readonly: boolean
1
+ export interface UI_I_InitialValidationFields {
2
+ name: boolean
3
+ folder: boolean
4
+ server: boolean
12
5
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <section class="nfs-version">
3
3
  <common-select-radio-group
4
- v-model="selectedVersion"
4
+ v-model="selectedNfsVersionLocal"
5
5
  :options="nfsVersion"
6
6
  />
7
7
  </section>
@@ -13,30 +13,14 @@ import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/mode
13
13
  import type { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
14
14
  import { nfsVersionFunc } from '~/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions'
15
15
 
16
- const props = defineProps<{
17
- version: UI_T_NfsType
18
- }>()
19
- const emits = defineEmits<{
20
- (event: 'update:version', value: UI_T_NfsType): void
21
- }>()
16
+ const selectedNfsVersionLocal = defineModel<UI_T_NfsType>()
17
+
22
18
  const localization = computed<UI_I_Localization>(() => useLocal())
23
19
 
24
20
  const nfsVersion = ref<UI_I_RadioOption[]>(nfsVersionFunc(localization.value))
25
-
26
- const selectedVersion = computed<UI_T_NfsType>({
27
- get() {
28
- return props.version
29
- },
30
- set(newValue) {
31
- emits('update:version', newValue)
32
- },
33
- })
34
21
  </script>
35
22
 
36
23
  <style lang="scss" scoped>
37
24
  .nfs-version {
38
- //&__desc {
39
- // margin-left: 22px;
40
- //}
41
25
  }
42
26
  </style>
@@ -1,5 +1,5 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
1
+ import { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
3
3
  export const nfsVersionFunc = (
4
4
  localization: UI_I_Localization
5
5
  ): UI_I_RadioOption[] => {
@@ -8,14 +8,14 @@ export const nfsVersionFunc = (
8
8
  label: 'NFS 3',
9
9
  value: 'nfs-3',
10
10
  disabled: false,
11
- description: localization.common.nfsVersionDesc1,
11
+ description: localization.nfsVersionDesc1,
12
12
  testId: 'datastore-nfs-version-3',
13
13
  },
14
14
  {
15
15
  label: 'NFS 4.1',
16
16
  value: 'nfs-4.1',
17
17
  disabled: false,
18
- description: localization.common.nfsVersionDesc2,
18
+ description: localization.nfsVersionDesc2,
19
19
  testId: 'datastore-nfs-version-4.1',
20
20
  },
21
21
  ]
@@ -1,14 +1,8 @@
1
1
  <template>
2
2
  <div class="ready-complete">
3
- <div class="ready-complete__desc">{{ localization.common.readyCompleteDesc }}</div>
4
-
5
3
  <common-details-list :items="properties" class="ready-complete__list list">
6
4
  <template #default="{ item }">
7
- <common-details-item
8
- :has-children="true"
9
- :test-id="item.testId"
10
- open-by-default
11
- >
5
+ <common-details-item :has-children="true" open-by-default>
12
6
  <template #stackBlockKey>
13
7
  <span class="list__labels">
14
8
  {{ localization.common.chosenDatastoreName }}
@@ -55,13 +49,12 @@
55
49
  </template>
56
50
 
57
51
  <script lang="ts" setup>
58
- import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
59
- import type { UI_I_Localization } from '~/lib/models/interfaces'
52
+ import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
53
+ import { UI_I_Localization } from '~/lib/models/interfaces'
60
54
 
61
55
  const props = defineProps<{
62
56
  dataReadyView: UI_I_DetailsItem[]
63
57
  }>()
64
- // console.log(props)
65
58
 
66
59
  const localization = computed<UI_I_Localization>(() => useLocal())
67
60