bfg-common 1.5.75 → 1.5.77

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 (37) hide show
  1. package/components/common/wizards/datastore/add/Add.vue +1 -1
  2. package/components/common/wizards/datastore/add/New.vue +20 -40
  3. package/components/common/wizards/datastore/add/Old.vue +29 -29
  4. package/components/common/wizards/datastore/add/lib/config/steps.ts +23 -19
  5. package/components/common/wizards/datastore/add/lib/models/types.ts +2 -2
  6. package/components/common/wizards/datastore/add/nfs/Nfs.vue +0 -5
  7. package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +0 -14
  8. package/components/common/wizards/datastore/add/steps/_kerberosAuthentication/KerberosAuthentication.vue +1 -0
  9. package/components/common/wizards/datastore/add/steps/_local/Local.vue +2 -1
  10. package/components/common/wizards/datastore/add/{nfs/version/Version.vue → steps/_nfsVersion/NfsVersion.vue} +1 -0
  11. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/PartitionConfiguration.vue +245 -0
  12. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/graphicTooltip/graphicTooltip.vue +64 -0
  13. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/lib/config/selectOptions.ts +46 -0
  14. package/components/common/wizards/datastore/add/steps/_partitionConfiguration/sizeGraphic/sizeGraphic.vue +225 -0
  15. package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibility.vue +60 -0
  16. package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityNew.vue +27 -0
  17. package/components/common/wizards/datastore/add/steps/hostAccessibility/HostAccessibilityOld.vue +60 -0
  18. package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/config/tabsPannel.ts +31 -0
  19. package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/interfaces.ts +9 -0
  20. package/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/types.ts +5 -0
  21. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/TablesView.vue +85 -0
  22. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/compatibleTable.ts +62 -0
  23. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
  24. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/config/tableKeys.ts +15 -0
  25. package/components/common/wizards/datastore/add/steps/hostAccessibility/tablesView/lib/models/interfaces.ts +11 -0
  26. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigure.vue +237 -0
  27. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureNew.vue +30 -0
  28. package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureOld.vue +237 -0
  29. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/DeletePopover.vue +100 -0
  30. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/ServersList.vue +123 -0
  31. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/config/serversListConfig.ts +40 -0
  32. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/config/tableKeys.ts +3 -0
  33. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/models/interfaces.ts +3 -0
  34. package/components/common/wizards/datastore/add/steps/nameAndConfigure/_serversList/lib/models/types.ts +1 -0
  35. package/components/common/wizards/datastore/add/steps/nameAndConfigure/lib/models/interfaces.ts +5 -0
  36. package/package.json +1 -1
  37. /package/components/common/wizards/datastore/add/{nfs/version → steps/_nfsVersion}/lib/config/versionOptions.ts +0 -0
@@ -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
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.75",
4
+ "version": "1.5.77",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",