bfg-common 1.3.460 → 1.3.462

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.
@@ -2385,5 +2385,8 @@
2385
2385
  "datastoreIsRequired": "Патрабуецца сховішча даных",
2386
2386
  "noBackupAvailable": "Няма даступнай рэзервовай копіі",
2387
2387
  "unpinMenu": "Адмацаваць меню",
2388
- "newBackupStorage": "Новае рэзервовае сховішча"
2388
+ "newBackupStorage": "Новае рэзервовае сховішча",
2389
+ "samba": "Samba",
2390
+ "sambaDesc": "Create an Samba datastore on an Samba share over the network.",
2391
+ "sambaHelpDesc": "NFS storage is a network file system. NFS versions 4.1 and 4.2 are supported"
2389
2392
  }
@@ -2389,5 +2389,8 @@
2389
2389
  "datastoreIsRequired": "Datastore is required",
2390
2390
  "noBackupAvailable": "No backup available",
2391
2391
  "unpinMenu": "Unpin Menu",
2392
- "newBackupStorage": "New Backup Storage"
2392
+ "newBackupStorage": "New Backup Storage",
2393
+ "samba": "Samba",
2394
+ "sambaDesc": "Create an Samba datastore on an Samba share over the network.",
2395
+ "sambaHelpDesc": "NFS storage is a network file system. NFS versions 4.1 and 4.2 are supported"
2393
2396
  }
@@ -2389,5 +2389,8 @@
2389
2389
  "datastoreIsRequired": "Պահանջվում է տվյալների պահեստ",
2390
2390
  "noBackupAvailable": "Պահուստավորում չկա",
2391
2391
  "unpinMenu": "Ապամրացնել ընտրացանկը",
2392
- "newBackupStorage": "Կրկնօրինակման նոր պահեստ"
2392
+ "newBackupStorage": "Կրկնօրինակման նոր պահեստ",
2393
+ "samba": "Samba",
2394
+ "sambaDesc": "Create an Samba datastore on an Samba share over the network.",
2395
+ "sambaHelpDesc": "NFS storage is a network file system. NFS versions 4.1 and 4.2 are supported"
2393
2396
  }
@@ -2388,5 +2388,8 @@
2388
2388
  "datastoreIsRequired": "Деректер қоймасы қажет",
2389
2389
  "noBackupAvailable": "Сақтық көшірме жоқ",
2390
2390
  "unpinMenu": "Мәзірді босату",
2391
- "newBackupStorage": "Жаңа сақтық көшірме қоймасы"
2391
+ "newBackupStorage": "Жаңа сақтық көшірме қоймасы",
2392
+ "samba": "Samba",
2393
+ "sambaDesc": "Create an Samba datastore on an Samba share over the network.",
2394
+ "sambaHelpDesc": "NFS storage is a network file system. NFS versions 4.1 and 4.2 are supported"
2392
2395
  }
@@ -2394,5 +2394,8 @@
2394
2394
  "datastoreIsRequired": "Требуется хранилище данных",
2395
2395
  "noBackupAvailable": "Резервная копия недоступна",
2396
2396
  "unpinMenu": "Открепить меню",
2397
- "newBackupStorage": "Новое хранилище резервных копий"
2397
+ "newBackupStorage": "Новое хранилище резервных копий",
2398
+ "samba": "Samba",
2399
+ "sambaDesc": "Create an Samba datastore on an Samba share over the network.",
2400
+ "sambaHelpDesc": "NFS storage is a network file system. NFS versions 4.1 and 4.2 are supported"
2398
2401
  }
@@ -2388,5 +2388,8 @@
2388
2388
  "datastoreIsRequired": "需要数据存储",
2389
2389
  "noBackupAvailable": "没有可用的备份",
2390
2390
  "unpinMenu": "取消固定菜单",
2391
- "newBackupStorage": "新的备份存储"
2391
+ "newBackupStorage": "新的备份存储",
2392
+ "samba": "Samba",
2393
+ "sambaDesc": "Create an Samba datastore on an Samba share over the network.",
2394
+ "sambaHelpDesc": "NFS storage is a network file system. NFS versions 4.1 and 4.2 are supported"
2392
2395
  }
@@ -124,6 +124,7 @@ const datastoreType = ref<UI_T_DatastoreType>(
124
124
  const form = ref<UI_I_CreateDatastoreForm>({
125
125
  name: '',
126
126
  lunDisk: [],
127
+ hosts: [],
127
128
  type_code: E_DatastoreTypeKode[datastoreType.value],
128
129
  nfsVersion: 'nfs-3',
129
130
  readonly: false,
@@ -259,6 +260,29 @@ const checkNfsServerSync = (
259
260
  }
260
261
  }
261
262
 
263
+ const checkHostsAccessibilitySync = (
264
+ localization: UI_I_Localization,
265
+ hosts: any,
266
+ wizard: Wizard,
267
+ value: UI_I_WizardStep[]
268
+ ): UI_I_ValidationReturn => {
269
+ let stepHasError = false
270
+
271
+ if (!hosts.length) {
272
+ stepHasError = wizard.setValidation(6, 'hostsAccessibility', {
273
+ fieldMessage: '',
274
+ alertMessage: localization.selectLeastEntityContinue,
275
+ })
276
+ } else if (wizard.hasMessage(6, 'hostsAccessibility')) {
277
+ value = wizard.removeValidation(6, 'hostsAccessibility', value)
278
+ }
279
+
280
+ return {
281
+ newValue: value,
282
+ stepHasError,
283
+ }
284
+ }
285
+
262
286
  const validationFunc = async (
263
287
  value: UI_I_WizardStep[],
264
288
  currentStep: UI_I_WizardStep,
@@ -330,6 +354,19 @@ const validationFunc = async (
330
354
  serverValidation.stepHasError
331
355
  }
332
356
 
357
+ if (wizard.isValidateForStep(6, currentStep.id, nextStep.id)) {
358
+ const nameValidation = await checkHostsAccessibilitySync(
359
+ localization.value,
360
+ form.value.hosts,
361
+ wizard,
362
+ value
363
+ )
364
+
365
+ value = nameValidation.newValue
366
+
367
+ stepHasError = nameValidation.stepHasError
368
+ }
369
+
333
370
  return {
334
371
  newValue: value,
335
372
  stepHasError,
@@ -356,12 +393,21 @@ watch(
356
393
  wizard.changeScheme(2)
357
394
  }
358
395
  }
396
+ if (props.project === 'sphere') {
397
+ if (newValue === 'shared-storm') {
398
+ wizard.changeScheme(3)
399
+ }
400
+
401
+ if (newValue === 'nfs') {
402
+ wizard.changeScheme(4)
403
+ }
404
+ }
359
405
  },
360
406
  { deep: true, immediate: true }
361
407
  )
362
408
 
363
409
  const dataReadyView = computed<UI_I_DetailsItem>(() =>
364
- constructDataReadyViewFunc(localization.value, form.value)
410
+ constructDataReadyViewFunc(localization.value, form.value, props.project)
365
411
  )
366
412
  const onNextStep = (_force = false): void => {}
367
413
 
@@ -89,117 +89,27 @@ export const stepsFunc = (
89
89
  title: localization.hostsAccessibility,
90
90
  subTitle: localization.hostsAccessibilityDesc,
91
91
  status: UI_E_WIZARD_STATUS.INACTIVE,
92
- fields: {},
92
+ fields: {
93
+ hostsAccessibility: {
94
+ alert: '',
95
+ field: '',
96
+ },
97
+ },
93
98
  isValid: true,
94
99
  testId: 'select-hosts-accessibility',
95
100
  },
96
101
 
97
- // {
98
- // id: 1,
99
- // title: localization.selectTargetDevice,
100
- // subTitle: localization.selectTargetDeviceForNewConnection,
101
- // status: UI_E_WIZARD_STATUS.INACTIVE,
102
- // fields: {
103
- // [UI_E_ValidationFields.TARGET_DEVICE_STANDARD_SWITCH]: {
104
- // alert: '',
105
- // field: '',
106
- // },
107
- // [UI_E_ValidationFields.TARGET_DEVICE_NETWORK]: {
108
- // alert: '',
109
- // field: '',
110
- // },
111
- // [UI_E_ValidationFields.TARGET_DEVICE_SWITCH]: {
112
- // alert: '',
113
- // field: '',
114
- // },
115
- // [UI_E_ValidationFields.TARGET_DEVICE_MTU]: {
116
- // alert: '',
117
- // field: '',
118
- // },
119
- // },
120
- // isValid: true,
121
- // testId: 'select-target-device',
122
- // },
123
- // {
124
- // id: 2,
125
- // title: localization.createStandardSwitch,
126
- // subTitle: localization.assignFreePhysicalNetworkAdaptersToTheNewSwitch,
127
- // status: UI_E_WIZARD_STATUS.INACTIVE,
128
- // fields: {},
129
- // isValid: true,
130
- // testId: 'create-standard-switch',
131
- // },
132
- // {
133
- // id: 3,
134
- // title: localization.portProperties,
135
- // subTitle: localization.specifyVMkernelPortSettings,
136
- // status: UI_E_WIZARD_STATUS.INACTIVE,
137
- // fields: {
138
- // [UI_E_ValidationFields.PORT_PROPERTIES_NETWORK]: {
139
- // field: '',
140
- // alert: '',
141
- // },
142
- // [UI_E_ValidationFields.PORT_PROPERTIES_VLAN]: {
143
- // field: '',
144
- // alert: '',
145
- // },
146
- // [UI_E_ValidationFields.PORT_PROPERTIES_MTU]: {
147
- // field: '',
148
- // alert: '',
149
- // },
150
- // },
151
- // isValid: true,
152
- // testId: 'port-properties',
153
- // },
154
- // {
155
- // id: 4,
156
- // title: localization.ipV4Settings,
157
- // subTitle: localization.specifyVMkernelIPv4Settings,
158
- // status: UI_E_WIZARD_STATUS.INACTIVE,
159
- // fields: {
160
- // [UI_E_ValidationFields.IPV_SETTINGS_IPV]: {
161
- // field: '',
162
- // alert: '',
163
- // },
164
- // [UI_E_ValidationFields.IPV_SETTINGS_MASK]: {
165
- // field: '',
166
- // alert: '',
167
- // },
168
- // [UI_E_ValidationFields.IPV_SETTINGS_GATEWAY]: {
169
- // field: '',
170
- // alert: '',
171
- // },
172
- // },
173
- // isValid: true,
174
- // testId: 'ipv4-settings',
175
- // },
176
- // {
177
- // id: 5,
178
- // title: localization.connectionSettings,
179
- // subTitle:
180
- // localization.useNetworkLabelsToIdentifyMigrationCompatibleTwoHosts,
181
- // status: UI_E_WIZARD_STATUS.INACTIVE,
182
- // fields: {
183
- // [UI_E_ValidationFields.CONNECTION_SETTINGS_NETWORK]: {
184
- // field: '',
185
- // alert: '',
186
- // },
187
- // [UI_E_ValidationFields.CONNECTION_SETTINGS_VLAN]: {
188
- // field: '',
189
- // alert: '',
190
- // },
191
- // },
192
- // isValid: true,
193
- // testId: 'connection-settings',
194
- // },
195
- // {
196
- // id: 6,
197
- // title: localization.addPhysicalNetworkAdapter,
198
- // subTitle: localization.assignPhysicalNetworkAdaptersToTheSwitch,
102
+ // { // TODO Пока что не будет чут попоже
103
+ // id: 7,
104
+ // title: localization.kerberosAuthentication,
105
+ // subTitle: localization.kerberosAuthenticationDesc.replace(
106
+ // '{0}',
107
+ // 'version'?.toUpperCase() || ''
108
+ // ),
199
109
  // status: UI_E_WIZARD_STATUS.INACTIVE,
200
110
  // fields: {},
201
111
  // isValid: true,
202
- // testId: 'add-physical-network-adapter',
112
+ // testId: 'select-kerberos-authentication',
203
113
  // },
204
114
  {
205
115
  id: 11,
@@ -216,5 +126,6 @@ export const stepsSchemeInitial: number[][] = [
216
126
  [0, 1, 11], // Procurator Scheme for "local" type
217
127
  [0, 2, 3, 11], // Procurator Scheme for "shared-storm" type
218
128
  [0, 4, 5, 11], // Procurator Scheme for "nfs" type
219
- [0, 2, 11], // Sphere
129
+ [0, 2, 11], // Sphere Scheme for "shared-storm" type
130
+ [0, 4, 5, 6, 11], // Sphere Scheme for "nfs" type
220
131
  ]
@@ -20,10 +20,12 @@
20
20
  <!-- :nfs-version="model.nfsVersion"-->
21
21
  <!-- />--><!-- TODO Он будет когда будем делать групповое -->
22
22
 
23
- <common-wizards-datastore-add-nfs-accessibility
23
+ <common-wizards-datastore-new-add-nfs-accessibility
24
24
  v-if="showHostAccessibility"
25
- :host-accessibility-submit="props.hostAccessibilitySubmit"
25
+ v-model="model"
26
+ :alert-messages="props.alertMessages"
26
27
  :hosts="props.hosts"
28
+ @hide-alert="(e) => emits('hide-alert', e)"
27
29
  @next="onChangeAccessibilityAndNext"
28
30
  />
29
31
  </div>
@@ -45,7 +47,6 @@ const props = defineProps<{
45
47
  datastoreType: UI_T_DatastoreType
46
48
  alertMessages: string[]
47
49
  messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
48
- hostAccessibilitySubmit: number
49
50
  hosts?: any
50
51
  }>()
51
52
  const model = defineModel<any>()
@@ -1,11 +1,11 @@
1
1
  <template>
2
- <div>
2
+ <div class="host-accessibility">
3
3
  <atoms-alert
4
- v-show="errors.length"
4
+ v-show="props.alertMessages?.length"
5
5
  test-id="accessibility"
6
6
  status="alert-danger"
7
- :items="errors"
8
- @remove="removeValidationErrors"
7
+ :items="props.alertMessages"
8
+ @remove="onHideAlert"
9
9
  />
10
10
 
11
11
  <div>
@@ -32,22 +32,24 @@
32
32
  </template>
33
33
 
34
34
  <script lang="ts" setup>
35
- import { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
36
- import { UI_I_Localization } from '~/lib/models/interfaces'
37
- import { UI_I_Pagination } from '~/lib/models/table/interfaces'
38
- import { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
35
+ import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
36
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
37
+ import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
38
+ import type { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
39
39
  import { hostAccessibilityTabsFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/config/tabsPannel'
40
- // import { hostsAccessibilityTablesFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems'
41
40
 
42
41
  const props = defineProps<{
43
- hostAccessibilitySubmit: number
42
+ alertMessages: string[]
44
43
  hosts?: any
45
44
  }>()
46
- const localization = computed<UI_I_Localization>(() => useLocal())
45
+ const model = defineModel<any>()
47
46
  const emits = defineEmits<{
47
+ (event: 'hide-alert', value: number): void
48
48
  (event: 'next', value: string[]): void
49
49
  }>()
50
50
 
51
+ const localization = computed<UI_I_Localization>(() => useLocal())
52
+
51
53
  const activeTab = ref<T_HostsAccessibilityTab>('compatible-hosts')
52
54
  const tabs = computed<UI_I_CollapseNavItem[]>(() =>
53
55
  hostAccessibilityTabsFunc(localization.value, [
@@ -75,30 +77,16 @@ const sortTable = (event: string): void => {
75
77
  sort.value = event
76
78
  }
77
79
 
78
- const errors = ref<string[]>([])
79
-
80
- const showValidationErrors = (text: string): void => {
81
- errors.value = [text]
82
- }
83
- const removeValidationErrors = (): void => {
84
- errors.value = []
85
- }
86
80
  const submit = async () => {
87
81
  if (!selectedHosts.value.length) {
88
- const text = localization.value.selectLeastEntityContinue
89
- showValidationErrors(text)
90
82
  return
91
83
  }
92
84
 
93
- removeValidationErrors()
94
85
  emits('next', selectedHosts.value)
95
86
  }
96
- watch(
97
- () => props.hostAccessibilitySubmit,
98
- () => {
99
- submit()
100
- }
101
- )
87
+ const onHideAlert = (): void => {
88
+ emits('hide-alert', 6)
89
+ }
102
90
  </script>
103
91
 
104
92
  <style lang="scss" scoped></style>
@@ -135,9 +135,9 @@
135
135
  data-id="playback-compression-checkbox"
136
136
  type="checkbox"
137
137
  />
138
- <label for="playback-compression" class="clr-control-label">{{
139
- localization.mountNfsReadOnly
140
- }}</label>
138
+ <label for="playback-compression" class="clr-control-label">
139
+ {{ localization.mountNfsReadOnly }}
140
+ </label>
141
141
  </div>
142
142
  </div>
143
143
  </div>
@@ -1,5 +1,6 @@
1
1
  import type { UI_I_Localization } from '~/lib/models/interfaces'
2
2
  import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
3
+ import type { UI_T_Project } from '~/lib/models/types'
3
4
  import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
4
5
  import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastoreNew/add/lib/models/interfaces'
5
6
  const constructLunDiskItems = (
@@ -18,7 +19,7 @@ const constructLunDiskItems = (
18
19
  const nfsDetailsFunc = (
19
20
  localization: UI_I_Localization,
20
21
  data: UI_I_CreateDatastoreForm,
21
- isSphereWizard: boolean
22
+ project: UI_T_Project
22
23
  ): UI_I_DetailsItem[] => {
23
24
  const { name, server, folder, nfsVersion, hosts } = data
24
25
  // const accessMode = readonly ? 'Read-only' : 'Read-write'
@@ -65,7 +66,7 @@ const nfsDetailsFunc = (
65
66
  },
66
67
  ]
67
68
 
68
- if (isSphereWizard) {
69
+ if (project === 'sphere') {
69
70
  details.push({
70
71
  label: localization.hostsAccessibility,
71
72
  value: '',
@@ -162,7 +163,8 @@ const sharedStormDetailsFunc = (
162
163
 
163
164
  export const constructDataReadyViewFunc = (
164
165
  localization: UI_I_Localization,
165
- data: UI_I_CreateDatastoreForm
166
+ data: UI_I_CreateDatastoreForm,
167
+ project: UI_T_Project
166
168
  ): UI_I_DetailsItem[] => {
167
169
  const details = {
168
170
  1: localDetailsFunc,
@@ -170,5 +172,5 @@ export const constructDataReadyViewFunc = (
170
172
  4: nfsDetailsFunc,
171
173
  }
172
174
 
173
- return details[data.type_code](localization, data, false)
175
+ return details[data.type_code](localization, data, project)
174
176
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.460",
4
+ "version": "1.3.462",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -1,191 +0,0 @@
1
- import type { UI_I_VerticalStepItem } from '~/components/atoms/lib/models/interfaces'
2
- import type { UI_I_Localization } from '~/lib/models/interfaces'
3
- import type {
4
- UI_T_WizardDatastoreMode,
5
- UI_T_DatastoreType,
6
- UI_T_NfsType,
7
- } from '~/components/common/wizards/datastore/add/lib/models/types'
8
-
9
- const stepFromSharedStorm = (
10
- localization: UI_I_Localization,
11
- mode: UI_T_WizardDatastoreMode
12
- ): UI_I_VerticalStepItem[] => {
13
- const steps = [
14
- // { text: localization.type, disabled: false, complete: false },
15
- {
16
- text: localization.nameAndDeviceSelection,
17
- disabled: true,
18
- complete: false,
19
- },
20
- // {
21
- // text: localization.vmfsVersion,
22
- // disabled: true,
23
- // complete: false,
24
- // }, <!-- TODO в shared-storm пока верси не будет -->
25
- // {
26
- // text: localization.partitionConfiguration,
27
- // disabled: true,
28
- // complete: false,
29
- // },
30
- ]
31
- // TODO refactoring
32
- if (mode === 'procurator') {
33
- steps.push({
34
- text: localization.partitionConfiguration,
35
- disabled: true,
36
- complete: false,
37
- })
38
- }
39
- steps.push({
40
- text: localization.readyComplete,
41
- disabled: true,
42
- complete: false,
43
- })
44
- return steps
45
- }
46
-
47
- const stepFromNfs = (
48
- localization: UI_I_Localization,
49
- mode: UI_T_WizardDatastoreMode
50
- ): UI_I_VerticalStepItem[] => {
51
- const steps = [
52
- { text: localization.type, disabled: false, complete: false },
53
- { text: localization.nfsVersion, disabled: true, complete: false },
54
- {
55
- text: localization.nameAndConfiguration,
56
- disabled: true,
57
- complete: false,
58
- },
59
- // {
60
- // text: localization.kerberosAuthentication,
61
- // disabled: true,
62
- // complete: false,
63
- // permissions: ['nfs-4.1'],
64
- // },// TODO Пока что не будет чут попоже
65
- // { text: localization.hostsAccessibility, disabled: true, complete: false }, // Он будет когда будем делать групповое
66
- // { text: localization.readyComplete, disabled: true, complete: false },
67
- ]
68
-
69
- if (mode === 'sphere') {
70
- steps.push({
71
- text: localization.hostsAccessibility,
72
- disabled: true,
73
- complete: false,
74
- })
75
- }
76
-
77
- steps.push({
78
- text: localization.readyComplete,
79
- disabled: true,
80
- complete: false,
81
- })
82
-
83
- return steps
84
-
85
- // console.log(position, 'position')
86
-
87
- // nfsItems = nfsItems.filter((item) => {
88
- // // return item.permissions
89
- // // ? type !== null
90
- // // ? item.permissions.includes(type)
91
- // // : true
92
- // // : false
93
- // return item.permissions ? item.permissions.includes(type) : true
94
- // })
95
- // nfsItems.forEach((x, key) => {
96
- // if (key <= position) {
97
- // // console.log(key, 'key')
98
- // x.complete = true
99
- // x.disabled = false
100
- // }
101
- // })
102
-
103
- // console.log(type, 'typeeeeee')
104
- }
105
-
106
- // const stemFromVvol = (localization: UI_I_Localization): UI_I_VerticalStepItem[] => {
107
- // return [
108
- // { text: localization.type, disabled: false, complete: false },
109
- // {
110
- // text: localization.nameAndContainerSelection,
111
- // disabled: true,
112
- // complete: false,
113
- // },
114
- // { text: localization.hostsAccessibility, disabled: true, complete: false },
115
- // { text: localization.readyComplete, disabled: true, complete: false },
116
- // ]
117
- // }
118
- const stemFromLocal = (
119
- localization: UI_I_Localization,
120
- mode: UI_T_WizardDatastoreMode
121
- ): UI_I_VerticalStepItem[] => {
122
- const isModeProcurator = mode === 'procurator'
123
- return [
124
- { text: localization.type, disabled: false, complete: false },
125
- {
126
- text: localization[
127
- isModeProcurator ? 'selectDatastoreName' : 'nameAndDeviceSelection'
128
- ],
129
- disabled: true,
130
- complete: false,
131
- },
132
- { text: localization.readyComplete, disabled: true, complete: false },
133
- ]
134
- }
135
-
136
- export const stepItemsFunc = (
137
- localization: UI_I_Localization,
138
- type: UI_T_DatastoreType,
139
- mode: UI_T_WizardDatastoreMode
140
- ): UI_I_VerticalStepItem[] => {
141
- const handlers = {
142
- 'shared-storm': stepFromSharedStorm,
143
- nfs: stepFromNfs,
144
- local: stemFromLocal,
145
- }
146
-
147
- return handlers[type](localization, mode)
148
- }
149
-
150
- interface SubTitles {
151
- 'shared-storm': string[]
152
- nfs: string[]
153
- local: string[]
154
- }
155
-
156
- export const subTitleFunc = (
157
- localization: UI_I_Localization,
158
- type: UI_T_DatastoreType,
159
- position: number,
160
- version?: UI_T_NfsType
161
- ): string => {
162
- position = position - 1
163
-
164
- if (type === 'nfs' && version === 'nfs-3' && position === 2) {
165
- position = position + 1
166
- }
167
-
168
- const description: string[] = [
169
- localization.selectNfsVersion,
170
- localization.nameAndConfigurationDesc,
171
- // localization.kerberosAuthenticationDesc.replace(
172
- // '{0}',
173
- // version?.toUpperCase() || ''
174
- // ),
175
- // localization.hostsAccessibilityDesc,
176
- ]
177
-
178
- const sharedStormDesc: string[] = [
179
- localization.nameAndDeviceSelectionDesc,
180
- // localization.vmfsVersionDesc,
181
- localization.partitionConfigurationDesc,
182
- ]
183
-
184
- const subTitles: SubTitles = {
185
- nfs: description,
186
- 'shared-storm': sharedStormDesc,
187
- local: [],
188
- }
189
-
190
- return subTitles[type][position]
191
- }
@@ -1,53 +0,0 @@
1
- import {
2
- I_CompatibleHostsTable,
3
- I_IncompatibleHostsTable,
4
- } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
5
- import { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
6
- import { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
7
-
8
- const compatibleHostsTable: API_UI_I_DataTable<I_CompatibleHostsTable[]> = {
9
- items: [
10
- {
11
- id: 1,
12
- host: 'esxi0.иридиум',
13
- cluster: 'Cluster00',
14
- },
15
- {
16
- id: 2,
17
- host: ' esxi0.иридиум',
18
- cluster: 'Cluster00',
19
- },
20
- {
21
- id: 3,
22
- host: 'esxi3.иридиум',
23
- cluster: 'Cluster00',
24
- },
25
- {
26
- id: 4,
27
- host: 'esxi4.иридиум',
28
- cluster: 'Cluster00',
29
- },
30
- {
31
- id: 5,
32
- host: 'esxi1.иридиум',
33
- cluster: 'Cluster01',
34
- },
35
- ],
36
- total_items: 5,
37
- total_pages: 1,
38
- }
39
- const incompatibleHostsTable: API_UI_I_DataTable<I_IncompatibleHostsTable[]> = {
40
- items: [],
41
- total_items: 0,
42
- total_pages: 1,
43
- }
44
-
45
- export { incompatibleHostsTable, compatibleHostsTable }
46
- export const hostsAccessibilityTablesFunc = (type: T_HostsAccessibilityTab) => {
47
- const hostItems = {
48
- 'compatible-hosts': compatibleHostsTable,
49
- 'incompatible-hosts': incompatibleHostsTable,
50
- }
51
-
52
- return hostItems[type]
53
- }