bfg-common 1.4.47 → 1.4.49

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 (25) hide show
  1. package/components/common/wizards/datastoreNew/add/lib/config/steps.ts +13 -13
  2. package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +1 -1
  3. package/components/common/wizards/datastoreNew/add/lib/utils.ts +34 -1
  4. package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +0 -5
  5. package/components/common/wizards/datastoreNew/add/nfs/{kerberosAuthentication → _kerberosAuthentication}/KerberosAuthentication.vue +1 -1
  6. package/components/common/wizards/datastoreNew/add/nfs/{kerberosAuthentication → _kerberosAuthentication}/lib/config/radioOptions.ts +5 -5
  7. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +4 -4
  8. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +5 -5
  9. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +6 -6
  10. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +1 -1
  11. package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +7 -72
  12. package/components/common/wizards/datastoreNew/add/nfs/configuration/{serversList → _serversList}/DeletePopover.vue +1 -1
  13. package/components/common/wizards/datastoreNew/add/nfs/configuration/{serversList → _serversList}/ServersList.vue +0 -1
  14. package/components/common/wizards/datastoreNew/add/nfs/configuration/{serversList → _serversList}/lib/config/serversListConfig.ts +1 -2
  15. package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +1 -1
  16. package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +13 -65
  17. package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +1 -1
  18. package/components/common/wizards/datastoreNew/add/sharedStorm/{version → _version}/Version.vue +5 -16
  19. package/components/common/wizards/datastoreNew/add/sharedStorm/{version → _version}/lib/config/versionOptions.ts +4 -4
  20. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +14 -2
  21. package/components/common/wizards/datastoreNew/add/types/Types.vue +2 -2
  22. package/package.json +1 -1
  23. /package/components/common/wizards/datastoreNew/add/nfs/configuration/{serversList → _serversList}/lib/config/tableKeys.ts +0 -0
  24. /package/components/common/wizards/datastoreNew/add/nfs/configuration/{serversList → _serversList}/lib/models/interfaces.ts +0 -0
  25. /package/components/common/wizards/datastoreNew/add/nfs/configuration/{serversList → _serversList}/lib/models/types.ts +0 -0
@@ -16,7 +16,7 @@ export const stepsFunc = (
16
16
 
17
17
  {
18
18
  id: 1,
19
- title: localization.selectDatastoreName,
19
+ title: localization.common.selectDatastoreName,
20
20
  status: UI_E_WIZARD_STATUS.INACTIVE,
21
21
  fields: {
22
22
  datastoreName: {
@@ -29,8 +29,8 @@ export const stepsFunc = (
29
29
  },
30
30
  {
31
31
  id: 2,
32
- title: localization.nameAndDeviceSelection,
33
- subTitle: localization.nameAndDeviceSelectionDesc,
32
+ title: localization.common.nameAndDeviceSelection,
33
+ subTitle: localization.common.nameAndDeviceSelectionDesc,
34
34
  status: UI_E_WIZARD_STATUS.INACTIVE,
35
35
  fields: {
36
36
  datastoreName: {
@@ -48,8 +48,8 @@ export const stepsFunc = (
48
48
 
49
49
  {
50
50
  id: 3,
51
- title: localization.partitionConfiguration,
52
- subTitle: localization.partitionConfigurationDesc,
51
+ title: localization.common.partitionConfiguration,
52
+ subTitle: localization.common.partitionConfigurationDesc,
53
53
  status: UI_E_WIZARD_STATUS.INACTIVE,
54
54
  fields: {},
55
55
  isValid: true,
@@ -58,8 +58,8 @@ export const stepsFunc = (
58
58
 
59
59
  {
60
60
  id: 4,
61
- title: localization.nfsVersion,
62
- subTitle: localization.selectNfsVersion,
61
+ title: localization.common.nfsVersion,
62
+ subTitle: localization.common.selectNfsVersion,
63
63
  status: UI_E_WIZARD_STATUS.INACTIVE,
64
64
  fields: {},
65
65
  isValid: true,
@@ -67,8 +67,8 @@ export const stepsFunc = (
67
67
  },
68
68
  {
69
69
  id: 5,
70
- title: localization.nameAndConfiguration,
71
- subTitle: localization.nameAndConfigurationDesc,
70
+ title: localization.common.nameAndConfiguration,
71
+ subTitle: localization.common.nameAndConfigurationDesc,
72
72
  status: UI_E_WIZARD_STATUS.INACTIVE,
73
73
  fields: {
74
74
  name: {
@@ -90,8 +90,8 @@ export const stepsFunc = (
90
90
 
91
91
  {
92
92
  id: 6,
93
- title: localization.hostsAccessibility,
94
- subTitle: localization.hostsAccessibilityDesc,
93
+ title: localization.common.hostsAccessibility,
94
+ subTitle: localization.common.hostsAccessibilityDesc,
95
95
  status: UI_E_WIZARD_STATUS.INACTIVE,
96
96
  fields: {
97
97
  hostsAccessibility: {
@@ -117,8 +117,8 @@ export const stepsFunc = (
117
117
  // },
118
118
  {
119
119
  id: 11,
120
- title: localization.readyComplete,
121
- subTitle: localization.readyCompleteDesc,
120
+ title: localization.common.readyComplete,
121
+ subTitle: localization.common.readyCompleteDesc,
122
122
  status: UI_E_WIZARD_STATUS.INACTIVE,
123
123
  fields: {},
124
124
  isValid: true,
@@ -4,7 +4,7 @@ export interface UI_I_CreateDatastoreForm {
4
4
  name: string
5
5
  lunDisk: UI_I_CreateStorageLunDiskItem[]
6
6
  nfsVersion: UI_T_NfsType
7
- type_code: 1 | 2 | 4
7
+ type_code: 2 | 4
8
8
  readonly: boolean
9
9
  server: string
10
10
  folder: string
@@ -6,7 +6,7 @@ export const checkValidityName = async (
6
6
  name: string,
7
7
  wizard: Wizard,
8
8
  project: UI_T_Project,
9
- sendMessage: (message: string) => void,
9
+ sendMessage: (message: string) => void
10
10
  ): Promise<void> => {
11
11
  // TODO move to projects!!!
12
12
 
@@ -29,3 +29,36 @@ export const checkValidityName = async (
29
29
  }
30
30
  sendMessage('')
31
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
+ }
@@ -14,11 +14,6 @@
14
14
  @hide-alert="(e) => emits('hide-alert', e)"
15
15
  />
16
16
 
17
- <!-- <templates-home-datastore-actions-add-nfs-kerberos-authentication-->
18
- <!-- v-show="model.nfsVersion === 'nfs-4.1' && props.stepPosition === 3"-->
19
- <!-- :nfs-version="model.nfsVersion"-->
20
- <!-- />--><!-- TODO Он будет когда будем делать групповое -->
21
-
22
17
  <common-wizards-datastore-new-add-nfs-accessibility
23
18
  v-if="showHostAccessibility"
24
19
  v-model="model.hosts"
@@ -4,7 +4,7 @@
4
4
  v-show="isShowAlert"
5
5
  test-id="kerberos-authentication"
6
6
  status="alert-warning"
7
- :items="[localization.kerberosAuthenticationAlert]"
7
+ :items="[localization.common.kerberosAuthenticationAlert]"
8
8
  @remove="isShowAlert = false"
9
9
  />
10
10
 
@@ -1,24 +1,24 @@
1
- import { UI_I_Localization } from '~/lib/models/interfaces'
2
- import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
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
3
 
4
4
  export const kerberosOptionsFunc = (
5
5
  localization: UI_I_Localization
6
6
  ): UI_I_RadioOption[] => {
7
7
  return [
8
8
  {
9
- label: localization.dontUseKerberosAuthentication,
9
+ label: localization.common.dontUseKerberosAuthentication,
10
10
  value: 'dont-use',
11
11
  disabled: false,
12
12
  testId: 'dont-use-value',
13
13
  },
14
14
  {
15
- label: localization.useKerberosAuthenticationKrb5,
15
+ label: localization.common.useKerberosAuthenticationKrb5,
16
16
  value: 'use-only-krb5',
17
17
  disabled: false,
18
18
  testId: 'use-only-krb5-value',
19
19
  },
20
20
  {
21
- label: localization.useKerberosAuthenticationIntegrity,
21
+ label: localization.common.useKerberosAuthenticationIntegrity,
22
22
  value: 'use-integrity',
23
23
  disabled: false,
24
24
  testId: 'use-integrity-value',
@@ -1,5 +1,5 @@
1
- import { UI_I_Localization } from '~/lib/models/interfaces'
2
- import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
3
3
 
4
4
  export const hostAccessibilityTabsFunc = (
5
5
  localization: UI_I_Localization,
@@ -10,12 +10,12 @@ export const hostAccessibilityTabsFunc = (
10
10
 
11
11
  const tabs: UI_I_CollapseNavItem[] = [
12
12
  {
13
- text: localization.compatibleHosts.replace('{0}', compatibleHosts || ''),
13
+ text: localization.common.compatibleHosts.replace('{0}', compatibleHosts || ''),
14
14
  value: 'compatible-hosts',
15
15
  disabled: false,
16
16
  },
17
17
  {
18
- text: localization.incompatibleHosts.replace('{0}', incompatibleHost || ''),
18
+ text: localization.common.incompatibleHosts.replace('{0}', incompatibleHost || ''),
19
19
  value: 'incompatible-hosts',
20
20
  disabled: true,
21
21
  },
@@ -1,10 +1,10 @@
1
- import {
1
+ import type {
2
2
  UI_I_HeadItem,
3
3
  UI_I_BodyItem,
4
4
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
- import { UI_I_Localization } from '~/lib/models/interfaces'
5
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
6
6
  import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
7
- import { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
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,
@@ -15,8 +15,8 @@ const getItems = (
15
15
  localization: UI_I_Localization
16
16
  ): [string, boolean, string, string][] => {
17
17
  return [
18
- [localization.host, true, '300px', compatibleHostsTableKeys[0]],
19
- [localization.cluster, true, '300px', compatibleHostsTableKeys[1]],
18
+ [localization.common.host, true, '300px', compatibleHostsTableKeys[0]],
19
+ [localization.common.cluster, true, '300px', compatibleHostsTableKeys[1]],
20
20
  ]
21
21
  }
22
22
 
@@ -1,9 +1,9 @@
1
- import {
1
+ import type {
2
2
  UI_I_HeadItem,
3
3
  UI_I_BodyItem,
4
4
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
- import { UI_I_Localization } from '~/lib/models/interfaces'
6
- import { I_IncompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
5
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
6
+ import type { I_IncompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
7
7
  import { E_NodeIconsByState } from '~/lib/models/enums'
8
8
  import { incompatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
9
9
  import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
@@ -12,14 +12,14 @@ const getItems = (
12
12
  localization: UI_I_Localization
13
13
  ): [string, boolean, string, string][] => {
14
14
  return [
15
- [localization.host, true, 'auto', incompatibleHostsTableKeys[0]],
15
+ [localization.common.host, true, 'auto', incompatibleHostsTableKeys[0]],
16
16
  [
17
- localization.hostIncompatibilityReason,
17
+ localization.common.hostIncompatibilityReason,
18
18
  true,
19
19
  'auto',
20
20
  incompatibleHostsTableKeys[1],
21
21
  ],
22
- [localization.cluster, true, 'auto', incompatibleHostsTableKeys[2]],
22
+ [localization.common.cluster, true, 'auto', incompatibleHostsTableKeys[2]],
23
23
  ]
24
24
  }
25
25
 
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  T_CompatibleHostsTableKeys,
3
3
  T_IncompatibleHostsTableKeys,
4
4
  } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
@@ -11,12 +11,12 @@
11
11
 
12
12
  <atoms-alert
13
13
  v-show="alertInfo"
14
- test-id="configuration-info"
14
+ test-id="configure-information-alert"
15
15
  status="alert-info"
16
- :items="[localization.nameAndConfigurationAlertInfo]"
16
+ :items="[localization.common.nameAndConfigurationAlertInfo]"
17
17
  @remove="alertInfo = false"
18
18
  />
19
- <h6 class="nd-mt-0">{{ localization.nfsShareDetails }}</h6>
19
+ <h6 class="nd-mt-0">{{ localization.common.nfsShareDetails }}</h6>
20
20
 
21
21
  <div class="clr-form-control clr-row">
22
22
  <label for="" class="clr-control-label clr-col-md-2">
@@ -48,7 +48,7 @@
48
48
 
49
49
  <div class="clr-form-control clr-row">
50
50
  <label class="clr-control-label clr-col-md-2">
51
- {{ localization.folder }}
51
+ {{ localization.common.folder }}
52
52
  </label>
53
53
 
54
54
  <div
@@ -111,41 +111,6 @@
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="model.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.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.mountNfsReadOnly }}
148
- </label>
149
114
  </div>
150
115
  </div>
151
116
  </div>
@@ -158,7 +123,6 @@ import type {
158
123
  UI_I_ArbitraryObject,
159
124
  } from '~/lib/models/interfaces'
160
125
  import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
161
- import type { UI_I_DataServersListItem } from '~/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/lib/models/interfaces'
162
126
  import type { UI_I_InitialValidationFields } from '~/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces'
163
127
 
164
128
  const props = defineProps<{
@@ -189,7 +153,7 @@ const nameErrorText = computed<string>(() => {
189
153
  }
190
154
 
191
155
  if (!initValidationFields.value.name) return ''
192
- return !model.value.name ? localization.value.specifyDatastoreName : ''
156
+ return !model.value.name ? localization.value.common.specifyDatastoreName : ''
193
157
  })
194
158
 
195
159
  /* Validation error text for Folder input field */
@@ -199,7 +163,7 @@ const folderErrorText = computed<string>(() => {
199
163
  }
200
164
 
201
165
  if (!initValidationFields.value.folder) return ''
202
- return !model.value.folder ? localization.value.specifyFolderName : ''
166
+ return !model.value.folder ? localization.value.common.specifyFolderName : ''
203
167
  })
204
168
 
205
169
  /* Validation error text for Server input field */
@@ -208,38 +172,9 @@ const serverErrorText = computed<string>(() => {
208
172
  return props.messagesFields.server.field
209
173
  }
210
174
 
211
- // if (!initValidationFields.value.server || dataServers.value.length) return ''
212
175
  if (!initValidationFields.value.server) return ''
213
- return !model.value.server ? localization.value.specifyServerName : ''
176
+ return !model.value.server ? localization.value.common.specifyServerName : ''
214
177
  })
215
-
216
- const accessMode = ref<boolean>(false)
217
- const dataServers = ref<UI_I_DataServersListItem[]>([])
218
- // const onAddServerToList = (): void => {
219
- // const { server } = form.value
220
- // // const { nfsVersion } = props
221
- //
222
- // if (!dataServers.value.length && !server.value) {
223
- // validForm.value = validation.touch()
224
- // isInitServerValidation.value = true
225
- //
226
- // return
227
- // }
228
- //
229
- // // if (dataServers.value.length && !server.value) return
230
- //
231
- // const data: UI_I_DataServersListItem = {
232
- // server_name: server.value,
233
- // }
234
- //
235
- // const hasEqualItem = !!dataServers.value.find(
236
- // (server: UI_I_DataServersListItem) => server.server_name === data.server_name
237
- // )
238
- //
239
- // !hasEqualItem && dataServers.value.push(data)
240
- //
241
- // // if (nfsVersion === 'nfs-4.1') server.value = ''
242
- // }
243
178
  const onHideAlert = (): void => {
244
179
  emits('hide-alert', 5)
245
180
  }
@@ -5,7 +5,7 @@
5
5
  class="popover__item"
6
6
  data-id="delete-popover-text"
7
7
  @click="onClickItem"
8
- >{{ localization.removeMember }}</span
8
+ >{{ localization.common.removeMember }}</span
9
9
  >
10
10
  </slot>
11
11
  </div>
@@ -66,7 +66,6 @@ const pagination = ref<UI_I_Pagination>({
66
66
  pageSize: 34,
67
67
  })
68
68
 
69
- // const columnKeys = ref<UI_I_ColumnKey[]>(serversTable.columnKeys(localization.value))
70
69
  const headItems = computed<UI_I_HeadItem[]>(() =>
71
70
  serversTable.headItems(localization.value)
72
71
  )
@@ -6,14 +6,13 @@ import {
6
6
  constructHeadItem,
7
7
  } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
8
8
  import { UI_I_Localization } from '~/lib/models/interfaces'
9
- import { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
10
9
  import { serversTableItemsKeys } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/tableKeys'
11
10
 
12
11
  const getItems = (
13
12
  localization: UI_I_Localization
14
13
  ): [string, boolean, string, string][] => {
15
14
  return [
16
- [localization.serversToBeAdded, true, '96px', serversTableItemsKeys[0]],
15
+ [localization.common.serversToBeAdded, true, '96px', serversTableItemsKeys[0]],
17
16
  ]
18
17
  }
19
18
 
@@ -5,7 +5,7 @@
5
5
  <common-details-item :has-children="true" open-by-default>
6
6
  <template #stackBlockKey>
7
7
  <span class="list__labels">
8
- {{ localization.chosenDatastoreName }}
8
+ {{ localization.common.chosenDatastoreName }}
9
9
  </span>
10
10
  </template>
11
11
 
@@ -28,24 +28,24 @@ const nfsDetailsFunc = (
28
28
 
29
29
  const details: UI_I_DetailsItem[] = [
30
30
  {
31
- label: localization.vmfsVersion,
31
+ label: localization.common.vmfsVersion,
32
32
  value: '',
33
33
  items: [
34
34
  {
35
- label: localization.version,
35
+ label: localization.common.version,
36
36
  value: nfsVersion.toUpperCase(),
37
37
  items: [],
38
- testId: 'view-selected-nfs-version-in-complete'
38
+ testId: 'view-selected-nfs-version-in-complete',
39
39
  },
40
40
  ],
41
41
  actions: [],
42
42
  },
43
43
  {
44
- label: localization.nameAndConfiguration,
44
+ label: localization.common.nameAndConfiguration,
45
45
  value: '',
46
46
  items: [
47
47
  {
48
- label: localization.datastoreName,
48
+ label: localization.common.datastoreName,
49
49
  value: name,
50
50
  items: [],
51
51
  testId: 'view-storage-name-in-complete',
@@ -57,10 +57,10 @@ const nfsDetailsFunc = (
57
57
  testId: 'view-server-name-in-complete',
58
58
  },
59
59
  {
60
- label: localization.folder,
60
+ label: localization.common.folder,
61
61
  value: folder,
62
62
  items: [],
63
- testId: 'view-folder-name-in-complete'
63
+ testId: 'view-folder-name-in-complete',
64
64
  },
65
65
  // {
66
66
  // label: localization.accessMode,
@@ -79,15 +79,15 @@ const nfsDetailsFunc = (
79
79
  .map((host) => host.host)
80
80
  : []
81
81
  details.push({
82
- label: localization.hostsAccessibility,
82
+ label: localization.common.hostsAccessibility,
83
83
  value: '',
84
84
  items: [
85
85
  {
86
- label: localization.hosts,
86
+ label: localization.common.hosts,
87
87
  value: '',
88
88
  data: hostsNames,
89
89
  items: [],
90
- testId: ''
90
+ testId: '',
91
91
  },
92
92
  ],
93
93
  actions: [],
@@ -96,30 +96,6 @@ const nfsDetailsFunc = (
96
96
 
97
97
  return details
98
98
  }
99
-
100
- const localDetailsFunc = (
101
- localization: UI_I_Localization,
102
- data: UI_I_CreateDatastoreForm
103
- ): UI_I_DetailsItem[] => {
104
- const { name } = data
105
-
106
- return [
107
- {
108
- label: localization.selectName,
109
- value: '',
110
- items: [
111
- {
112
- label: localization.datastoreName,
113
- value: name,
114
- items: [],
115
- testId: 'view-storage-name-in-complete'
116
- },
117
- ],
118
- actions: [],
119
- },
120
- ]
121
- }
122
-
123
99
  const sharedStormDetailsFunc = (
124
100
  localization: UI_I_Localization,
125
101
  data: UI_I_CreateDatastoreForm
@@ -128,17 +104,17 @@ const sharedStormDetailsFunc = (
128
104
 
129
105
  return [
130
106
  {
131
- label: localization.nameAndDeviceSelection,
107
+ label: localization.common.nameAndDeviceSelection,
132
108
  value: '',
133
109
  items: [
134
110
  {
135
- label: localization.datastoreName,
111
+ label: localization.common.datastoreName,
136
112
  value: name,
137
113
  items: [],
138
114
  testId: 'view-storage-name-in-complete',
139
115
  },
140
116
  {
141
- label: localization.diskLun,
117
+ label: localization.common.diskLun,
142
118
  value: constructLunDiskItems(lunDisk),
143
119
  items: [],
144
120
  testId: 'view-selected-lun-disks-in-complete',
@@ -146,33 +122,6 @@ const sharedStormDetailsFunc = (
146
122
  ],
147
123
  actions: [],
148
124
  },
149
- // {
150
- // label: localization.partitionConfiguration,
151
- // value: '',
152
- // items: [
153
- // {
154
- // label: localization.method,
155
- // value: 'None',
156
- // items: [],
157
- // },
158
- // {
159
- // label: localization.partitionFormat,
160
- // value: 'None',
161
- // items: [],
162
- // },
163
- // {
164
- // label: localization.blockSize,
165
- // value: 'None',
166
- // items: [],
167
- // },
168
- // {
169
- // label: localization.spaceReclamationGranularity,
170
- // value: 'None',
171
- // items: [],
172
- // },
173
- // ],
174
- // actions: [],
175
- // }, /* TODO данные с нее пока никуда не вставляем */
176
125
  ]
177
126
  }
178
127
 
@@ -183,7 +132,6 @@ export const constructDataReadyViewFunc = (
183
132
  nfsHosts: UI_I_CreateDatastoreHosts
184
133
  ): UI_I_DetailsItem[] => {
185
134
  const details = {
186
- 1: localDetailsFunc,
187
135
  2: sharedStormDetailsFunc,
188
136
  4: nfsDetailsFunc,
189
137
  }
@@ -17,7 +17,7 @@
17
17
 
18
18
  <!-- <templates-home-datastore-actions-add-vmfs-version-->
19
19
  <!-- v-show="props.stepPosition === 2"-->
20
- <!-- v-models:version="vmfsVersion"-->
20
+ <!-- v-models="vmfsVersion"-->
21
21
  <!-- />-->
22
22
  <!-- TODO в shared-storm пока верси не будет -->
23
23
 
@@ -1,36 +1,25 @@
1
1
  <template>
2
2
  <section class="nfs-version">
3
3
  <common-select-radio-group
4
- v-model="selectedVersion"
4
+ v-model="selectedVersionLocal"
5
5
  :options="vmfsVersion"
6
6
  />
7
7
  </section>
8
8
  </template>
9
9
 
10
10
  <script lang="ts" setup>
11
- import { UI_I_Localization } from '~/lib/models/interfaces'
12
- import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
13
- import { UI_T_VmfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
11
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
12
+ import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
13
+ import type { UI_T_VmfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
14
14
  import { vmfsVersionFunc } from '~/components/common/wizards/datastore/add/sharedStorm/version/lib/config/versionOptions'
15
15
 
16
16
  const props = defineProps<{
17
17
  version: UI_T_VmfsType
18
18
  }>()
19
+ const selectedVersionLocal = defineModel<UI_T_VmfsType>({required: true})
19
20
  const localization = computed<UI_I_Localization>(() => useLocal())
20
- const emits = defineEmits<{
21
- (event: 'update:version', value: UI_T_VmfsType): void
22
- }>()
23
21
 
24
22
  const vmfsVersion = ref<UI_I_RadioOption[]>(vmfsVersionFunc(localization.value))
25
-
26
- const selectedVersion = computed<UI_T_VmfsType>({
27
- get() {
28
- return props.version
29
- },
30
- set(newValue) {
31
- emits('update:version', newValue)
32
- },
33
- })
34
23
  </script>
35
24
 
36
25
  <style lang="scss" scoped>
@@ -1,5 +1,5 @@
1
- import { UI_I_Localization } from '~/lib/models/interfaces'
2
- import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
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
3
 
4
4
  export const vmfsVersionFunc = (
5
5
  localization: UI_I_Localization
@@ -9,13 +9,13 @@ export const vmfsVersionFunc = (
9
9
  label: 'VMFS 6',
10
10
  value: 'vmfs-6',
11
11
  disabled: false,
12
- description: localization.vmfsVersionDesc1,
12
+ description: localization.common.vmfsVersionDesc1,
13
13
  },
14
14
  {
15
15
  label: 'VMFS 5',
16
16
  value: 'vmfs-5',
17
17
  disabled: false,
18
- description: localization.vmfsVersionDesc2,
18
+ description: localization.common.vmfsVersionDesc2,
19
19
  },
20
20
  ]
21
21
  }
@@ -2,7 +2,7 @@
2
2
  <div class="device-selection-step">
3
3
  <atoms-alert
4
4
  v-show="props.alertMessages?.length"
5
- test-id="device-selection-alert-error"
5
+ :test-id="errorAlertDataId"
6
6
  status="alert-danger"
7
7
  :items="props.alertMessages"
8
8
  @remove="onHideAlert"
@@ -110,8 +110,9 @@ import type {
110
110
  } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
111
111
  import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
112
112
  import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces'
113
- import { UI_T_DatastoreType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
113
+ import type { UI_T_DatastoreType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
114
114
  import { hostsOptionsFunc } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions'
115
+ import { validateNameAndGenerateDataId } from '~/components/common/wizards/datastoreNew/add/lib/utils'
115
116
 
116
117
  const props = defineProps<{
117
118
  project: UI_T_Project
@@ -146,6 +147,17 @@ const nameErrorText = computed<string>(() => {
146
147
  return !model.value.name ? localization.value.common.specifyDatastoreName : ''
147
148
  })
148
149
 
150
+ const defaultDataId = ref<string>('device-selection-alert-error')
151
+ const errorAlertDataId = computed<string>(() => {
152
+ return !model.value.lunDisk.length
153
+ ? `${defaultDataId.value}-not-selected-lundisk`
154
+ : validateNameAndGenerateDataId(
155
+ model.value.name,
156
+ props.alertMessages[0],
157
+ defaultDataId
158
+ )
159
+ })
160
+
149
161
  const alertInfo = ref<boolean>(true)
150
162
  const onHideAlertInfo = (): void => {
151
163
  alertInfo.value = false
@@ -2,7 +2,7 @@
2
2
  <section class="datastore-types">
3
3
  <div class="header-row">
4
4
  <span class="datastore-types__subtitle">
5
- {{ localization.specifyDatastoreType }}
5
+ {{ localization.common.specifyDatastoreType }}
6
6
  </span>
7
7
  <div id="type-select-help-icon" class="signpost-container relative">
8
8
  <atoms-the-icon
@@ -19,7 +19,7 @@
19
19
  test-id="select-datastore-type"
20
20
  @hide="isShowTypeHelp = false"
21
21
  >
22
- <p class="help-desc">{{ localization.datastoreTypeHelpDesc }}</p>
22
+ <p class="help-desc">{{ localization.common.datastoreTypeHelpDesc }}</p>
23
23
  </atoms-tooltip-signpost>
24
24
  </div>
25
25
  </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.47",
4
+ "version": "1.4.49",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",