bfg-common 1.4.46 → 1.4.48

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 (52) hide show
  1. package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces.ts +4 -0
  2. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +15 -6
  3. package/components/common/wizards/datastoreNew/add/Add.vue +464 -0
  4. package/components/common/wizards/datastoreNew/add/lib/config/steps.ts +135 -0
  5. package/components/common/wizards/datastoreNew/add/lib/models/enums.ts +5 -0
  6. package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +12 -0
  7. package/components/common/wizards/datastoreNew/add/lib/models/types.ts +7 -0
  8. package/components/common/wizards/datastoreNew/add/lib/utils.ts +31 -0
  9. package/components/common/wizards/datastoreNew/add/local/Local.vue +44 -0
  10. package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +116 -0
  11. package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +62 -0
  12. package/components/common/wizards/datastoreNew/add/nfs/_kerberosAuthentication/KerberosAuthentication.vue +55 -0
  13. package/components/common/wizards/datastoreNew/add/nfs/_kerberosAuthentication/lib/config/radioOptions.ts +27 -0
  14. package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +63 -0
  15. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +24 -0
  16. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/interfaces.ts +9 -0
  17. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/types.ts +5 -0
  18. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +85 -0
  19. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
  20. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
  21. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
  22. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces.ts +11 -0
  23. package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +236 -0
  24. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/DeletePopover.vue +100 -0
  25. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/ServersList.vue +123 -0
  26. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/config/serversListConfig.ts +40 -0
  27. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/config/tableKeys.ts +3 -0
  28. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/models/interfaces.ts +3 -0
  29. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/models/types.ts +1 -0
  30. package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +5 -0
  31. package/components/common/wizards/datastoreNew/add/nfs/version/Version.vue +26 -0
  32. package/components/common/wizards/datastoreNew/add/nfs/version/lib/config/versionOptions.ts +22 -0
  33. package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +88 -0
  34. package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +140 -0
  35. package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +83 -0
  36. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +262 -0
  37. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +23 -0
  38. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +48 -0
  39. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts +8 -0
  40. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/table/Table.vue +134 -0
  41. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/table/lib/config/hostsTable.ts +87 -0
  42. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/table/lib/config/tableKeys.ts +11 -0
  43. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +236 -0
  44. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +64 -0
  45. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +46 -0
  46. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +225 -0
  47. package/components/common/wizards/datastoreNew/add/sharedStorm/version/Version.vue +39 -0
  48. package/components/common/wizards/datastoreNew/add/sharedStorm/version/lib/config/versionOptions.ts +21 -0
  49. package/components/common/wizards/datastoreNew/add/types/Types.vue +78 -0
  50. package/components/common/wizards/datastoreNew/add/types/lib/config/typeOptions.ts +49 -0
  51. package/lib/models/interfaces.ts +1 -0
  52. package/package.json +1 -1
@@ -0,0 +1,236 @@
1
+ <template>
2
+ <div class="configuration">
3
+ <div>
4
+ <atoms-alert
5
+ v-show="props.alertMessages?.length"
6
+ test-id="configure-information-alert"
7
+ status="alert-danger"
8
+ :items="props.alertMessages"
9
+ @remove="onHideAlert"
10
+ />
11
+
12
+ <atoms-alert
13
+ v-show="alertInfo"
14
+ test-id="configure-information-alert"
15
+ status="alert-info"
16
+ :items="[localization.common.nameAndConfigurationAlertInfo]"
17
+ @remove="alertInfo = false"
18
+ />
19
+ <h6 class="nd-mt-0">{{ localization.common.nfsShareDetails }}</h6>
20
+
21
+ <div class="clr-form-control clr-row">
22
+ <label for="" class="clr-control-label clr-col-md-2">
23
+ {{ localization.common.name }}
24
+ </label>
25
+
26
+ <div
27
+ class="clr-control-container"
28
+ :class="nameErrorText && 'clr-error'"
29
+ >
30
+ <div class="flex-align-center">
31
+ <input
32
+ id="configuration-name-input"
33
+ v-model="model.name"
34
+ data-id="configuration-name-input"
35
+ type="text"
36
+ class="clr-input"
37
+ @blur="initValidation(true, ['name'])"
38
+ @input="initValidation(false, ['name'])"
39
+ />
40
+ <atoms-the-icon class="error-icon" name="info-circle" />
41
+ </div>
42
+
43
+ <div class="clr-subtext" data-id="nfs-datastore-name-field-require">
44
+ {{ nameErrorText }}
45
+ </div>
46
+ </div>
47
+ </div>
48
+
49
+ <div class="clr-form-control clr-row">
50
+ <label class="clr-control-label clr-col-md-2">
51
+ {{ localization.common.folder }}
52
+ </label>
53
+
54
+ <div
55
+ class="clr-control-container"
56
+ :class="folderErrorText && 'clr-error'"
57
+ >
58
+ <div class="flex-align-center">
59
+ <input
60
+ id="configuration-folder-input"
61
+ v-model="model.folder"
62
+ data-id="configuration-folder-input"
63
+ type="text"
64
+ class="clr-input"
65
+ @blur="initValidation(true, ['folder'])"
66
+ @input="initValidation(false, ['folder'])"
67
+ />
68
+ <atoms-the-icon class="error-icon" name="info-circle" />
69
+ </div>
70
+
71
+ <div
72
+ v-if="folderErrorText"
73
+ class="clr-subtext"
74
+ data-id="folder-name-field-require"
75
+ >
76
+ {{ folderErrorText }}
77
+ </div>
78
+ <div v-else class="clr-subtext">E.g: /vols/vol0/datastore-001</div>
79
+ </div>
80
+ </div>
81
+
82
+ <div class="nd-mt-0 clr-form-control clr-row">
83
+ <label class="clr-control-label clr-col-md-2">
84
+ {{ localization.common.server }}
85
+ </label>
86
+
87
+ <div
88
+ class="clr-control-container"
89
+ :class="serverErrorText && 'clr-error'"
90
+ >
91
+ <div class="flex-align-center input-action-wrapper">
92
+ <input
93
+ id="configuration-folder-input"
94
+ v-model="model.server"
95
+ data-id="configuration-folder-input"
96
+ type="text"
97
+ class="clr-input"
98
+ @blur="initValidation(true, ['server'])"
99
+ @input="initValidation(false, ['server'])"
100
+ />
101
+ <atoms-the-icon class="error-icon" name="info-circle" />
102
+ </div>
103
+ <div
104
+ v-if="serverErrorText"
105
+ class="clr-subtext"
106
+ data-id="server-name-field-require"
107
+ >
108
+ {{ serverErrorText }}
109
+ </div>
110
+ <div v-else class="clr-subtext">
111
+ E.g: nas, nas.it.com or 192.168.0.1
112
+ </div>
113
+ </div>
114
+ </div>
115
+ </div>
116
+ </div>
117
+ </template>
118
+
119
+ <script lang="ts" setup>
120
+ import type { UI_T_Project } from '~/lib/models/types'
121
+ import type {
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/datastoreNew/add/nfs/configuration/lib/models/interfaces'
127
+
128
+ const props = defineProps<{
129
+ project: UI_T_Project
130
+ alertMessages: string[]
131
+ messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
132
+ }>()
133
+ const model = defineModel<any>()
134
+ const emits = defineEmits<{
135
+ (event: 'hide-alert', value: number): void
136
+ }>()
137
+
138
+ const localization = computed<UI_I_Localization>(() => useLocal())
139
+
140
+ const initValidationFields = ref<UI_I_InitialValidationFields>({
141
+ name: false,
142
+ folder: false,
143
+ server: false,
144
+ })
145
+ const initValidation = (onlyBlur = false, types: string[]): void => {
146
+ onlyBlur && types.forEach((type) => (initValidationFields.value[type] = true))
147
+ }
148
+
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
153
+ }
154
+
155
+ if (!initValidationFields.value.name) return ''
156
+ return !model.value.name ? localization.value.common.specifyDatastoreName : ''
157
+ })
158
+
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
163
+ }
164
+
165
+ if (!initValidationFields.value.folder) return ''
166
+ return !model.value.folder ? localization.value.common.specifyFolderName : ''
167
+ })
168
+
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
173
+ }
174
+
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)
180
+ }
181
+ const alertInfo = ref<boolean>(props.project === 'procurator')
182
+ </script>
183
+
184
+ <style lang="scss" scoped>
185
+ @import '~/assets/scss/common/mixins.scss';
186
+ .configuration {
187
+ @include flex($dir: column, $just: space-between);
188
+ height: 100%;
189
+ & > h6 {
190
+ font-weight: 500;
191
+ font-size: 14px;
192
+ padding-top: 6px;
193
+ }
194
+
195
+ &__alert-info {
196
+ :deep(.alert-text) {
197
+ font-size: 11px;
198
+ letter-spacing: normal;
199
+ }
200
+ }
201
+ .clr-form-control {
202
+ margin-top: 0;
203
+ display: flex;
204
+ flex-direction: row;
205
+
206
+ .clr-control-container {
207
+ min-height: 48px;
208
+ &.clr-error {
209
+ .clr-subtext,
210
+ .error-icon {
211
+ display: block;
212
+ }
213
+ }
214
+ .error-icon {
215
+ display: none;
216
+ }
217
+ .error-icon {
218
+ fill: #db2100;
219
+ width: 24px;
220
+ height: 24px;
221
+ }
222
+ }
223
+ }
224
+ &__servers-list {
225
+ height: 170px;
226
+ }
227
+ }
228
+ .flex-align-center {
229
+ &.input-action-wrapper {
230
+ width: 260px;
231
+ }
232
+ input {
233
+ width: 210px;
234
+ }
235
+ }
236
+ </style>
@@ -0,0 +1,100 @@
1
+ <template>
2
+ <div class="popover">
3
+ <slot>
4
+ <span
5
+ class="popover__item"
6
+ data-id="delete-popover-text"
7
+ @click="onClickItem"
8
+ >{{ localization.common.removeMember }}</span
9
+ >
10
+ </slot>
11
+ </div>
12
+ </template>
13
+
14
+ <script lang="ts" setup>
15
+ import { UI_I_Localization } from '~/lib/models/interfaces'
16
+
17
+ const emits = defineEmits<{
18
+ (event: 'hide'): void
19
+ (event: 'click-item'): void
20
+ }>()
21
+
22
+ const localization = computed<UI_I_Localization>(() => useLocal())
23
+ const onClickItem = (): void => {
24
+ emits('click-item')
25
+ }
26
+ const hide = (): void => {
27
+ emits('hide')
28
+ }
29
+ const windowClick = (): void => {
30
+ hide()
31
+ }
32
+
33
+ onMounted(() => {
34
+ setTimeout(() => {
35
+ window.addEventListener('click', windowClick)
36
+ })
37
+ })
38
+ onUnmounted(() => {
39
+ window.removeEventListener('click', windowClick)
40
+ })
41
+ </script>
42
+
43
+ <style lang="scss" scoped>
44
+ @import '~/assets/scss/common/mixins.scss';
45
+
46
+ .popover {
47
+ @include flex($align: center, $just: space-between);
48
+ height: 38px;
49
+ background: var(--block-view-bg-color2);
50
+ padding: 0.3rem;
51
+ margin-left: 0.3rem;
52
+ border: 0.05rem solid var(--block-border-color);
53
+ box-shadow: 0 0.05rem 0.15rem hsl(0deg 0% 55% / 25%);
54
+ transform: translateY(-50%);
55
+ border-radius: 0.15rem;
56
+ font-weight: 400;
57
+ white-space: nowrap;
58
+ z-index: 600;
59
+ &:before,
60
+ &:after {
61
+ content: '';
62
+ position: absolute;
63
+ top: 50%;
64
+ right: 100%;
65
+ width: 0;
66
+ height: 0;
67
+ }
68
+ &:before {
69
+ margin-top: -0.3rem;
70
+ border-bottom: 0.3rem solid transparent;
71
+ border-top: 0.3rem solid transparent;
72
+ border-left: 0;
73
+ border-right: 0.3rem solid var(--block-border-color);
74
+ }
75
+ &:after {
76
+ margin-top: -0.25rem;
77
+ border-right: 0.25rem solid var(--block-view-bg-color2);
78
+ border-top: 0.25rem solid transparent;
79
+ border-bottom: 0.25rem solid transparent;
80
+ }
81
+ &__item {
82
+ @include text($fs: 14px, $c: var(--global-font-color3));
83
+ line-height: 1.15rem;
84
+ padding: 0.05rem 1.2rem 0;
85
+ &:hover {
86
+ background-color: var(--popover-hover-bg-color);
87
+ cursor: pointer;
88
+ }
89
+ }
90
+ }
91
+ </style>
92
+
93
+ <style>
94
+ :root {
95
+ --popover-hover-bg-color: #e8e8e8;
96
+ }
97
+ :root.dark-theme {
98
+ --popover-hover-bg-color: #28404d;
99
+ }
100
+ </style>
@@ -0,0 +1,123 @@
1
+ <template>
2
+ <div class="servers-list">
3
+ <atoms-table-data-grid
4
+ v-model:selected-row="selectedDisk"
5
+ v-model:page-size="pagination.pageSize"
6
+ v-model:page="pagination.page"
7
+ type="any"
8
+ class="data-table"
9
+ test-id="servers-list-table"
10
+ :head-items="headItems"
11
+ :body-items="bodyItems"
12
+ :total-items="1"
13
+ :total-pages="1"
14
+ off-select-by-row
15
+ :loading="loading"
16
+ hide-footer
17
+ >
18
+ <template #type="{ item }">
19
+ <div class="data-table__action-icon">
20
+ <atoms-popover
21
+ test-id="servers-list"
22
+ @click="onShowTooltipForRemove(item)"
23
+ >
24
+ <template #elem>
25
+ <atoms-the-icon name="ellipsis-vertical" />
26
+ </template>
27
+ <template #content>
28
+ <common-wizards-datastore-add-nfs-configuration-servers-list-delete-popover
29
+ v-if="showTooltip && item[0].id === selectedServerForRemove"
30
+ class="data-table__popover"
31
+ @hide="showTooltip = false"
32
+ @click-item="onRemoveServerFromList(item)"
33
+ />
34
+ </template>
35
+ </atoms-popover>
36
+ </div>
37
+ </template>
38
+ </atoms-table-data-grid>
39
+ </div>
40
+ </template>
41
+
42
+ <script lang="ts" setup>
43
+ import {
44
+ UI_I_HeadItem,
45
+ UI_I_BodyItem,
46
+ } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
47
+ import { UI_I_Localization } from '~/lib/models/interfaces'
48
+ import { UI_I_Pagination } from '~/lib/models/table/interfaces'
49
+ import { UI_I_DataServersListItem } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces'
50
+ import * as serversTable from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/serversListConfig'
51
+
52
+ const props = defineProps<{
53
+ dataTable: UI_I_DataServersListItem[] | []
54
+ loading?: boolean
55
+ }>()
56
+ const emits = defineEmits<{
57
+ (event: 'update:data-table', value: UI_I_DataServersListItem[]): void
58
+ }>()
59
+
60
+ const localization = computed<UI_I_Localization>(() => useLocal())
61
+
62
+ const selectedDisk = ref<number | null>(null)
63
+
64
+ const pagination = ref<UI_I_Pagination>({
65
+ page: 1,
66
+ pageSize: 34,
67
+ })
68
+
69
+ const headItems = computed<UI_I_HeadItem[]>(() =>
70
+ serversTable.headItems(localization.value)
71
+ )
72
+
73
+ const bodyItems = ref<UI_I_BodyItem[][]>([])
74
+ watch(
75
+ () => props.dataTable,
76
+ (newValue) => {
77
+ if (!newValue?.length) {
78
+ bodyItems.value = []
79
+ return
80
+ }
81
+
82
+ bodyItems.value = serversTable.bodyItems(newValue)
83
+ },
84
+ { deep: true, immediate: true }
85
+ )
86
+
87
+ const selectedServerForRemove = ref<number | null>(null)
88
+ const showTooltip = ref<boolean>(false)
89
+ const onShowTooltipForRemove = (server: UI_I_BodyItem[]): void => {
90
+ selectedServerForRemove.value = server[0].id
91
+ showTooltip.value = true
92
+ }
93
+ const onRemoveServerFromList = (removeItem: UI_I_BodyItem[]): void => {
94
+ const { text } = removeItem[0]
95
+
96
+ const serverList = props.dataTable.filter(
97
+ (server: UI_I_DataServersListItem) => server.server_name !== text
98
+ )
99
+ emits('update:data-table', serverList)
100
+ showTooltip.value = false
101
+ }
102
+ </script>
103
+
104
+ <style lang="scss" scoped>
105
+ .servers-list {
106
+ height: inherit;
107
+ .data-table {
108
+ &__action-icon {
109
+ width: 16px;
110
+ height: 16px;
111
+ cursor: pointer;
112
+ position: relative;
113
+ fill: var(--ellipsis-vertical-icon-color);
114
+ }
115
+
116
+ height: inherit;
117
+ :deep(.datagrid-outer-wrapper) {
118
+ height: inherit;
119
+ padding-top: 0;
120
+ }
121
+ }
122
+ }
123
+ </style>
@@ -0,0 +1,40 @@
1
+ import {
2
+ UI_I_HeadItem,
3
+ UI_I_BodyItem,
4
+ } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
+ import {
6
+ constructHeadItem,
7
+ } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
8
+ import { UI_I_Localization } from '~/lib/models/interfaces'
9
+ import { serversTableItemsKeys } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/tableKeys'
10
+
11
+ const getItems = (
12
+ localization: UI_I_Localization
13
+ ): [string, boolean, string, string][] => {
14
+ return [
15
+ [localization.common.serversToBeAdded, true, '96px', serversTableItemsKeys[0]],
16
+ ]
17
+ }
18
+
19
+ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
20
+ const result: UI_I_HeadItem[] = []
21
+ getItems(localization).forEach((item) => {
22
+ const col = 'type'
23
+ result.push(constructHeadItem(col, item[0], item[3], false, item[2]))
24
+ })
25
+ return result
26
+ }
27
+
28
+ export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
29
+ const bodyItems: UI_I_BodyItem[][] = []
30
+ data.forEach((server, key) => {
31
+ bodyItems.push([
32
+ {
33
+ key: 'col0',
34
+ text: server[serversTableItemsKeys[0]],
35
+ id: key,
36
+ },
37
+ ])
38
+ })
39
+ return bodyItems
40
+ }
@@ -0,0 +1,3 @@
1
+ import { T_ServersTableItemsTuple } from '~/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/types'
2
+
3
+ export const serversTableItemsKeys: T_ServersTableItemsTuple = ['server_name']
@@ -0,0 +1,3 @@
1
+ export interface UI_I_DataServersListItem {
2
+ server_name: string
3
+ }
@@ -0,0 +1 @@
1
+ export type T_ServersTableItemsTuple = ['server_name']
@@ -0,0 +1,5 @@
1
+ export interface UI_I_InitialValidationFields {
2
+ name: boolean
3
+ folder: boolean
4
+ server: boolean
5
+ }
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <section class="nfs-version">
3
+ <common-select-radio-group
4
+ v-model="selectedNfsVersionLocal"
5
+ :options="nfsVersion"
6
+ />
7
+ </section>
8
+ </template>
9
+
10
+ <script lang="ts" setup>
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_NfsType } from '~/components/common/wizards/datastore/add/lib/models/types'
14
+ import { nfsVersionFunc } from '~/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions'
15
+
16
+ const selectedNfsVersionLocal = defineModel<UI_T_NfsType>()
17
+
18
+ const localization = computed<UI_I_Localization>(() => useLocal())
19
+
20
+ const nfsVersion = ref<UI_I_RadioOption[]>(nfsVersionFunc(localization.value))
21
+ </script>
22
+
23
+ <style lang="scss" scoped>
24
+ .nfs-version {
25
+ }
26
+ </style>
@@ -0,0 +1,22 @@
1
+ import { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
3
+ export const nfsVersionFunc = (
4
+ localization: UI_I_Localization
5
+ ): UI_I_RadioOption[] => {
6
+ return [
7
+ {
8
+ label: 'NFS 3',
9
+ value: 'nfs-3',
10
+ disabled: false,
11
+ description: localization.nfsVersionDesc1,
12
+ testId: 'datastore-nfs-version-3',
13
+ },
14
+ {
15
+ label: 'NFS 4.1',
16
+ value: 'nfs-4.1',
17
+ disabled: false,
18
+ description: localization.nfsVersionDesc2,
19
+ testId: 'datastore-nfs-version-4.1',
20
+ },
21
+ ]
22
+ }
@@ -0,0 +1,88 @@
1
+ <template>
2
+ <div class="ready-complete">
3
+ <common-details-list :items="properties" class="ready-complete__list list">
4
+ <template #default="{ item }">
5
+ <common-details-item :has-children="true" open-by-default>
6
+ <template #stackBlockKey>
7
+ <span class="list__labels">
8
+ {{ localization.common.chosenDatastoreName }}
9
+ </span>
10
+ </template>
11
+
12
+ <template #stackChildren>
13
+ <template
14
+ v-for="(item2, key2) in item.items"
15
+ :key="`${item2}_${key2}`"
16
+ >
17
+ <common-details-item
18
+ :has-children="false"
19
+ :test-id="item2.testId"
20
+ class="list__default-style"
21
+ >
22
+ <template #stackBlockKey>
23
+ <div>
24
+ {{ item2.label }}
25
+ </div>
26
+ </template>
27
+ <template #stackBlockContent>
28
+ <div v-if="item2.data">
29
+ <div
30
+ v-for="item3 in item2.data"
31
+ :key="item3"
32
+ class="flex-align-center"
33
+ >
34
+ <div class="vsphere-icon-host"></div>
35
+ <span>{{ item3 }}</span>
36
+ </div>
37
+ </div>
38
+ <span v-else>
39
+ {{ item2.value }}
40
+ </span>
41
+ </template>
42
+ </common-details-item>
43
+ </template>
44
+ </template>
45
+ </common-details-item>
46
+ </template>
47
+ </common-details-list>
48
+ </div>
49
+ </template>
50
+
51
+ <script lang="ts" setup>
52
+ import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
53
+ import { UI_I_Localization } from '~/lib/models/interfaces'
54
+
55
+ const props = defineProps<{
56
+ dataReadyView: UI_I_DetailsItem[]
57
+ }>()
58
+
59
+ const localization = computed<UI_I_Localization>(() => useLocal())
60
+
61
+ const properties = computed<UI_I_DetailsItem[]>(() => props.dataReadyView)
62
+ </script>
63
+
64
+ <style lang="scss" scoped>
65
+ @import '~/assets/scss/common/mixins.scss';
66
+ .ready-complete {
67
+ &__list {
68
+ @include flex($dir: column);
69
+ padding: 12px 0;
70
+ row-gap: 15px;
71
+ }
72
+ }
73
+ .list {
74
+ &__labels {
75
+ @include text($fs: 13px, $fw: 700);
76
+ }
77
+ :deep(.list__default-style) {
78
+ .stack-block {
79
+ &__label {
80
+ align-items: flex-start;
81
+ }
82
+ &-content {
83
+ white-space: pre-line;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ </style>