bfg-common 1.5.67 → 1.5.69

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.
@@ -36,15 +36,13 @@ import {
36
36
  stepsFunc,
37
37
  stepsSchemeInitial,
38
38
  } from '~/components/common/wizards/datastore/add/lib/config/steps'
39
-
40
39
  import type { UI_I_Localization } from '~/lib/models/interfaces'
41
40
  import type { UI_T_Project } from '~/lib/models/types'
42
- import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
41
+ import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
43
42
  import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
44
43
  import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
45
44
  import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/models/interfaces'
46
45
  import type { UI_I_ChangeStepsSchemes } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
47
- import { E_DatastoreTypeKode } from '~/components/common/wizards/datastore/add/lib/models/enums'
48
46
  import { constructDataReadyViewFunc } from '~/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails'
49
47
  import * as validation from '~/components/common/wizards/datastore/add/lib/validations'
50
48
 
@@ -75,15 +73,15 @@ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
75
73
 
76
74
  const title = computed<string>(() => localization.value.common.addHost)
77
75
 
78
- // const datastoreType = ref<UI_T_DatastoreType>(
76
+ // const datastoreType = ref<UI_T_DatastoreTypeCode>(
79
77
  // props.project === 'procurator' ? 'local' : 'shared-storm'
80
78
  // )
81
- const datastoreType = ref<UI_T_DatastoreType>('shared-storm')
79
+ const datastoreType = ref<UI_T_DatastoreTypeCode>(2)
82
80
  const form = ref<UI_I_CreateDatastoreForm>({
83
81
  name: 'Datastore',
84
82
  lunDisk: [],
85
83
  hosts: props.hostId ? [props?.hostId] : [],
86
- type_code: E_DatastoreTypeKode[datastoreType.value],
84
+ type_code: 2,
87
85
  nfsVersion: 'nfs-4.1',
88
86
  readonly: false,
89
87
  server: '',
@@ -199,16 +197,15 @@ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> =>
199
197
  // Choosing Scheme
200
198
  watch(
201
199
  datastoreType,
202
- (newValue: UI_T_DatastoreType) => {
200
+ (newValue: UI_T_DatastoreTypeCode) => {
203
201
  const schemes: UI_I_ChangeStepsSchemes = {
204
202
  procurator: {
205
- local: 0,
206
- 'shared-storm': 1,
207
- nfs: 2,
203
+ '2': 0,
204
+ '4': 1,
208
205
  },
209
206
  sphere: {
210
- 'shared-storm': 3,
211
- nfs: !props.hostId ? 4 : 2,
207
+ '2': 2,
208
+ '4': !props.hostId ? 3 : 1,
212
209
  },
213
210
  }
214
211
 
@@ -13,7 +13,7 @@
13
13
  >
14
14
  <template #content="{ selectedStep, isLoading }">
15
15
  <ui-wizard-block
16
- v-if="selectedStep.id === dynamicSteps.nameAndLocation"
16
+ v-if="selectedStep.id === dynamicSteps.type"
17
17
  :sub-title-height="height0"
18
18
  >
19
19
  <template #subTitle>
@@ -24,11 +24,9 @@
24
24
  </div>
25
25
  </template>
26
26
  <template #content>
27
- <common-wizards-datastore-add-types
28
- v-if="selectedStep.id === 0"
29
- v-model="form"
30
- v-model:datastore-type="datastoreType"
31
- :project="props.project"
27
+ <common-wizards-datastore-add-steps-type-mode
28
+ v-if="selectedStep.id === dynamicSteps.type"
29
+ v-model="formModelLocal.type_code"
32
30
  />
33
31
  </template>
34
32
  </ui-wizard-block>
@@ -179,13 +177,15 @@ import type {
179
177
  import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
180
178
  import type { UI_I_Localization } from '~/lib/models/interfaces'
181
179
  import type { UI_T_Project } from '~/lib/models/types'
182
- import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
180
+ import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
183
181
  import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
184
182
  import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
185
183
  import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/models/interfaces'
186
184
  import { E_DatastoreTypeKode } from '~/components/common/wizards/datastore/add/lib/models/enums'
187
185
  import { constructDataReadyViewFunc } from '~/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails'
186
+ import { dynamicSteps } from '~/components/common/wizards/datastore/add/lib/config/steps'
188
187
 
188
+ const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
189
189
  const props = defineProps<{
190
190
  project: UI_T_Project
191
191
  wizard: Wizard
@@ -233,10 +233,10 @@ const { height: height3 } = useElementSize(subTitleBlock3)
233
233
  const subTitleBlock4 = ref<HTMLElement | null>(null)
234
234
  const { height: height4 } = useElementSize(subTitleBlock4)
235
235
 
236
- // const datastoreType = ref<UI_T_DatastoreType>(
236
+ // const datastoreType = ref<UI_T_DatastoreTypeCode>(
237
237
  // props.project === 'procurator' ? 'local' : 'shared-storm'
238
238
  // )
239
- const datastoreType = ref<UI_T_DatastoreType>('shared-storm')
239
+ const datastoreType = ref<UI_T_DatastoreTypeCode>('shared-storm')
240
240
  const form = ref<UI_I_CreateDatastoreForm>({
241
241
  name: 'Datastore',
242
242
  lunDisk: [],
@@ -13,22 +13,9 @@
13
13
  @submit="onFinish"
14
14
  >
15
15
  <template #modalBody="{ selectedStep }">
16
- <common-wizards-datastore-add-types
17
- v-if="selectedStep.id === 0"
18
- v-model="form"
19
- v-model:datastore-type="datastoreType"
20
- :project="props.project"
21
- />
22
-
23
- <common-wizards-datastore-add-local
24
- v-if="selectedStep.id === 1"
25
- v-model="form"
26
- :project="props.project"
27
- :step-id="selectedStep.id"
28
- :datastore-type="datastoreType"
29
- :alert-messages="alertMessages[1]"
30
- :messages-fields="selectedStep.fields"
31
- @hide-alert="onHideAlert"
16
+ <common-wizards-datastore-add-steps-type-mode
17
+ v-if="selectedStep.id === dynamicSteps.type"
18
+ v-model="formModelLocal.type_code"
32
19
  />
33
20
 
34
21
  <common-wizards-datastore-add-shared-storm
@@ -70,13 +57,15 @@ import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/inter
70
57
  import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
71
58
  import type { UI_I_Localization } from '~/lib/models/interfaces'
72
59
  import type { UI_T_Project } from '~/lib/models/types'
73
- import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
60
+ import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
74
61
  import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
75
62
  import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
76
63
  import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/models/interfaces'
77
64
  import { E_DatastoreTypeKode } from '~/components/common/wizards/datastore/add/lib/models/enums'
78
65
  import { constructDataReadyViewFunc } from '~/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails'
66
+ import { dynamicSteps } from '~/components/common/wizards/datastore/add/lib/config/steps'
79
67
 
68
+ const formModelLocal = defineModel<UI_I_CreateDatastoreForm>({ required: true })
80
69
  const props = defineProps<{
81
70
  project: UI_T_Project
82
71
  wizard: Wizard
@@ -97,10 +86,10 @@ const emits = defineEmits<{
97
86
 
98
87
  const localization = computed<UI_I_Localization>(() => useLocal())
99
88
 
100
- // const datastoreType = ref<UI_T_DatastoreType>(
89
+ // const datastoreType = ref<UI_T_DatastoreTypeCode>(
101
90
  // props.project === 'procurator' ? 'local' : 'shared-storm'
102
91
  // )
103
- const datastoreType = ref<UI_T_DatastoreType>('shared-storm')
92
+ const datastoreType = ref<UI_T_DatastoreTypeCode>('shared-storm')
104
93
  const form = ref<UI_I_CreateDatastoreForm>({
105
94
  name: 'Datastore',
106
95
  lunDisk: [],
@@ -0,0 +1,13 @@
1
+ import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
2
+ export const datastoreDefaultFormFunc = (): UI_I_CreateDatastoreForm => {
3
+ return {
4
+ name: 'Datastore',
5
+ lunDisk: [],
6
+ hosts: [],
7
+ type_code: 2,
8
+ nfsVersion: 'nfs-4.1',
9
+ readonly: false,
10
+ server: '',
11
+ folder: '',
12
+ }
13
+ }
@@ -2,11 +2,20 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
2
  import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
3
3
  import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
4
4
 
5
+ export const dynamicSteps = {
6
+ type: 0,
7
+ connectionSettings: 1,
8
+ hostSummary: 2,
9
+ assignLicense: 3,
10
+ lockdownMode: 4,
11
+ vmLocation: 5,
12
+ readyComplete: 6,
13
+ }
5
14
  export const stepsFunc = (
6
15
  localization: UI_I_Localization
7
16
  ): UI_I_WizardStep[] => [
8
17
  {
9
- id: 0,
18
+ id: dynamicSteps.type,
10
19
  title: localization.common.type,
11
20
  status: UI_E_WIZARD_STATUS.SELECTED,
12
21
  fields: {},
@@ -14,19 +23,20 @@ export const stepsFunc = (
14
23
  testId: 'create-datastore-select-type',
15
24
  },
16
25
 
17
- {
18
- id: 1,
19
- title: localization.common.selectDatastoreName,
20
- status: UI_E_WIZARD_STATUS.INACTIVE,
21
- fields: {
22
- datastoreName: {
23
- alert: '',
24
- field: '',
25
- },
26
- },
27
- isValid: true,
28
- testId: 'select-datastore-name',
29
- },
26
+ // {
27
+ // // TODO Этот шаг использовался раньше, сейчас не используется
28
+ // id: dynamicSteps.local,
29
+ // title: localization.common.selectDatastoreName,
30
+ // status: UI_E_WIZARD_STATUS.INACTIVE,
31
+ // fields: {
32
+ // datastoreName: {
33
+ // alert: '',
34
+ // field: '',
35
+ // },
36
+ // },
37
+ // isValid: true,
38
+ // testId: 'select-datastore-name',
39
+ // },
30
40
  {
31
41
  id: 2,
32
42
  title: localization.common.nameAndDeviceSelection,
@@ -130,9 +140,8 @@ export const stepsFunc = (
130
140
  ]
131
141
 
132
142
  export const stepsSchemeInitial: number[][] = [
133
- [0, 1, 11], // Procurator Scheme for "local" type
134
- [0, 2, 11], // Procurator Scheme for "shared-storm" type
135
- [0, 4, 11], // Procurator Scheme for "nfs" type
136
- [0, 2, 11], // Sphere Scheme for "shared-storm" type
137
- [0, 4, 5, 11], // Sphere Scheme for "nfs" type
143
+ [dynamicSteps.type, 2, 11], // Procurator Scheme for "shared-storm" type
144
+ [dynamicSteps.type, 4, 11], // Procurator Scheme for "nfs" type
145
+ [dynamicSteps.type, 2, 11], // Sphere Scheme for "shared-storm" type
146
+ [dynamicSteps.type, 4, 5, 11], // Sphere Scheme for "nfs" type
138
147
  ]
@@ -1,6 +1,6 @@
1
1
  import type { UI_T_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
2
2
  import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
3
- import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
3
+ import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
4
4
  export interface UI_I_CreateDatastoreForm {
5
5
  name: string
6
6
  lunDisk: UI_I_CreateStorageLunDiskItem[]
@@ -14,6 +14,6 @@ export interface UI_I_CreateDatastoreForm {
14
14
 
15
15
  export interface UI_I_ChangeStepsSchemes {
16
16
  [key: string]: {
17
- [key in UI_T_DatastoreType]?: number
17
+ [key in UI_T_DatastoreTypeCode]?: number
18
18
  }
19
19
  }
@@ -1,4 +1,4 @@
1
- export type UI_T_DatastoreType = 'local' | 'shared-storm' | 'nfs'
1
+ export type UI_T_DatastoreTypeCode = 2 | 4
2
2
  export type UI_T_NfsType = 'nfs-3' | 'nfs-4.1'
3
3
  export type UI_T_VmfsType = 'vmfs-6' | 'vmfs-5'
4
4
  export type UI_T_KerberosAuthentication =
@@ -31,7 +31,7 @@ import type {
31
31
  import type { UI_T_Project } from '~/lib/models/types'
32
32
  import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
33
33
  import type {
34
- UI_T_DatastoreType,
34
+ UI_T_DatastoreTypeCode,
35
35
  UI_T_VmfsType,
36
36
  } from '~/components/common/wizards/datastore/add/lib/models/types'
37
37
  import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
@@ -41,7 +41,7 @@ import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datas
41
41
  const props = defineProps<{
42
42
  project: UI_T_Project
43
43
  stepId: number
44
- datastoreType: UI_T_DatastoreType
44
+ datastoreType: UI_T_DatastoreTypeCode
45
45
  alertMessages: string[]
46
46
  messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
47
47
  hosts?: UI_I_CreateDatastoreHosts
@@ -110,7 +110,7 @@ import type {
110
110
  } from '~/components/common/wizards/datastore/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/datastore/add/nfs/accessibility/tablesView/lib/models/interfaces'
113
- import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
113
+ import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
114
114
  import { hostsOptionsFunc } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions'
115
115
  import { validateNameAndGenerateDataId } from '~/components/common/wizards/datastore/add/lib/utils'
116
116
 
@@ -119,7 +119,7 @@ const props = defineProps<{
119
119
  stepId: number
120
120
  alertMessages: string[]
121
121
  messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
122
- datastoreType: UI_T_DatastoreType
122
+ datastoreType: UI_T_DatastoreTypeCode
123
123
  hosts?: UI_I_CreateDatastoreHosts | undefined
124
124
  isMainFilter?: boolean
125
125
  hostId?: string
@@ -13,14 +13,14 @@
13
13
  <script lang="ts" setup>
14
14
  import type { UI_T_Project } from '~/lib/models/types'
15
15
  import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
16
- import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
16
+ import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
17
17
  import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
18
18
  import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
19
19
 
20
20
  const props = defineProps<{
21
21
  project: UI_T_Project
22
22
  stepId: number
23
- datastoreType: UI_T_DatastoreType
23
+ datastoreType: UI_T_DatastoreTypeCode
24
24
  alertMessages: string[]
25
25
  messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
26
26
  }>()
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <common-wizards-datastore-add-steps-type-mode-new
3
+ v-if="isNewView"
4
+ v-model="formDatastoreTypeMode"
5
+ :options="datastoreTypeOptions"
6
+ />
7
+
8
+ <common-wizards-datastore-add-steps-type-mode-old
9
+ v-else
10
+ v-model="formDatastoreTypeMode"
11
+ :options="datastoreTypeOptions"
12
+ />
13
+ </template>
14
+
15
+ <script lang="ts" setup>
16
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
17
+ import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
18
+ import { datastoreTypesFunc } from '~/components/common/wizards/datastore/add/types/lib/config/typeOptions'
19
+
20
+ const formDatastoreTypeMode = defineModel<number>({ required: true })
21
+
22
+ const localization = computed<UI_I_Localization>(() => useLocal())
23
+ const { $store }: any = useNuxtApp()
24
+
25
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
26
+
27
+ const datastoreTypeOptions = ref<UI_I_RadioOption[]>(
28
+ datastoreTypesFunc(localization.value)
29
+ )
30
+ // const onChangeType = (): void => {
31
+ // model.value.name = 'Datastore' // default value is 'Datastore' every time
32
+ // }
33
+ </script>
34
+
35
+ <style lang="scss" scoped></style>
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <section class="datastore-type">
3
+ <div class="datastore-type__radio-container">
4
+ <ui-radio
5
+ v-for="(option, key) in props.options"
6
+ :key="key"
7
+ v-model="datastoreTypeModeLocal"
8
+ :label="option.label"
9
+ :test-id="option.testId"
10
+ :value="option.value"
11
+ size="md"
12
+ >
13
+ <template #description>
14
+ <span class="lockdown-mode__radio-description">
15
+ {{ option.description }}
16
+ </span>
17
+ </template>
18
+ </ui-radio>
19
+ </div>
20
+ </section>
21
+ </template>
22
+
23
+ <script lang="ts" setup>
24
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
25
+ import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
26
+
27
+ const datastoreTypeModeLocal = defineModel<number>({ required: true })
28
+ const props = defineProps<{
29
+ options: UI_I_RadioOption[]
30
+ }>()
31
+
32
+ const localization = computed<UI_I_Localization>(() => useLocal())
33
+ </script>
34
+
35
+ <style>
36
+ :root {
37
+ --radio-btn-active-label-bg-color: #f0f8fd;
38
+ --radio-btn-active-label-border-color: #008fd6;
39
+ }
40
+ :root.dark-theme {
41
+ --radio-btn-active-label-bg-color: #2ba2de14;
42
+ --radio-btn-active-label-border-color: #2ba2de;
43
+ }
44
+ </style>
45
+ <style lang="scss" scoped>
46
+ .datastore-type {
47
+ container-type: inline-size;
48
+ margin-top: 16px;
49
+
50
+ &__radio {
51
+ &-container {
52
+ display: grid;
53
+ grid-template-columns: 1fr 1fr 1fr;
54
+ gap: 12px;
55
+ }
56
+ &-description {
57
+ color: #9da6ad;
58
+ }
59
+ }
60
+ :deep(input[type='radio']) {
61
+ & ~ .radio-label {
62
+ width: 100%;
63
+ height: 100%;
64
+ background-color: var(--select-bg);
65
+ border: 1px solid var(--line-color);
66
+ border-radius: 8px;
67
+ padding: 12px;
68
+ }
69
+
70
+ &:not(:checked) {
71
+ & ~ .radio-label:hover {
72
+ border-color: var(--select-border);
73
+ }
74
+ }
75
+
76
+ &:checked {
77
+ & ~ .radio-label {
78
+ background-color: var(--radio-btn-active-label-bg-color);
79
+ border-color: var(--radio-btn-active-label-border-color);
80
+ }
81
+ }
82
+ }
83
+ }
84
+
85
+ @container (max-width:600px) {
86
+ .lockdown-mode__radio-container {
87
+ grid-template-columns: 1fr;
88
+ }
89
+ }
90
+ </style>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <section class="datastore-types">
3
+ <div class="header-row">
4
+ <span class="datastore-types__subtitle">
5
+ {{ localization.common.specifyDatastoreType }}
6
+ </span>
7
+ <div id="type-select-help-icon" class="signpost-container relative">
8
+ <atoms-the-icon
9
+ data-id="toggle-type-select-help-icon"
10
+ fill="#0072a3"
11
+ width="24px"
12
+ height="24px"
13
+ name="info-circle"
14
+ @click="isShowTypeHelp = !isShowTypeHelp"
15
+ />
16
+ <atoms-tooltip-signpost
17
+ v-if="isShowTypeHelp"
18
+ elem-id="type-select-help-icon"
19
+ test-id="select-datastore-type"
20
+ @hide="isShowTypeHelp = false"
21
+ >
22
+ <p class="help-desc">
23
+ {{ localization.common.datastoreTypeHelpDesc }}
24
+ </p>
25
+ </atoms-tooltip-signpost>
26
+ </div>
27
+ </div>
28
+
29
+ <common-select-radio-group
30
+ v-model="datastoreTypeModeLocal"
31
+ :options="props.options"
32
+ @change="onChangeType"
33
+ />
34
+ </section>
35
+ </template>
36
+
37
+ <script lang="ts" setup>
38
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
39
+ import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
40
+
41
+ const datastoreTypeModeLocal = defineModel<number>({ required: true })
42
+ const props = defineProps<{
43
+ options: UI_I_RadioOption[]
44
+ }>()
45
+
46
+ const localization = computed<UI_I_Localization>(() => useLocal())
47
+
48
+ const onChangeType = (): void => {
49
+ // model.value.name = 'Datastore' // default value is 'Datastore' every time
50
+ }
51
+
52
+ const isShowTypeHelp = ref<boolean>(false)
53
+ </script>
54
+
55
+ <style lang="scss" scoped>
56
+ .datastore-types {
57
+ .signpost-container {
58
+ display: flex;
59
+ cursor: pointer;
60
+
61
+ .help-desc-container {
62
+ max-width: 350px;
63
+ }
64
+ }
65
+ .header-row {
66
+ display: flex;
67
+ align-items: center;
68
+ gap: 10px;
69
+ }
70
+ }
71
+ </style>
@@ -0,0 +1,41 @@
1
+ import { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import { UI_T_Project } from '~/lib/models/types'
3
+ import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
4
+
5
+ export const datastoreTypesFunc = (
6
+ localization: UI_I_Localization,
7
+ _project?: UI_T_Project
8
+ ): UI_I_RadioOption[] => {
9
+ return [
10
+ {
11
+ label: localization.common.stormSharedStorage,
12
+ value: 2,
13
+ disabled: false,
14
+ description: localization.common.sharedStormDesc,
15
+ isTooltip: false,
16
+ tooltipContent: localization.common.stormSharedStorageHelpDesc,
17
+ testId: 'datastore-type-shared-storm',
18
+ },
19
+ {
20
+ label: localization.common.nfs,
21
+ value: 4,
22
+ disabled: false,
23
+ description: localization.common.nfsDesc,
24
+ isTooltip: false,
25
+ tooltipContent: localization.common.nfsHelpDesc,
26
+ testId: 'datastore-type-nfs',
27
+ },
28
+ ]
29
+
30
+ // if (project === 'procurator') {
31
+ // types.unshift({
32
+ // label: localization.common.localStorage,
33
+ // value: 1,
34
+ // disabled: false,
35
+ // description: localization.common.localDesc,
36
+ // isTooltip: false,
37
+ // tooltipContent: localization.common.localStorageHelpDesc,
38
+ // testId: 'datastore-type-local',
39
+ // })
40
+ // }
41
+ }
@@ -38,7 +38,7 @@
38
38
  import type { UI_I_Localization } from '~/lib/models/interfaces'
39
39
  import type { UI_T_Project } from '~/lib/models/types'
40
40
  import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
41
- import type { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
41
+ import type { UI_T_DatastoreTypeCode } from '~/components/common/wizards/datastore/add/lib/models/types'
42
42
  import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastore/add/lib/models/interfaces'
43
43
  import { E_DatastoreTypeKode } from '~/components/common/wizards/datastore/add/lib/models/enums'
44
44
  import { datastoreTypesFunc } from '~/components/common/wizards/datastore/add/types/lib/config/typeOptions'
@@ -47,7 +47,7 @@ const props = defineProps<{
47
47
  project: UI_T_Project
48
48
  }>()
49
49
  const selectedDatastoreTypeLocal =
50
- defineModel<UI_T_DatastoreType>('datastoreType')
50
+ defineModel<UI_T_DatastoreTypeCode>('datastoreType')
51
51
  const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
52
52
 
53
53
  const localization = computed<UI_I_Localization>(() => useLocal())
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.67",
4
+ "version": "1.5.69",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",