bfg-common 1.4.58 → 1.4.60

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 (98) hide show
  1. package/components/common/wizards/datastore/add/Add.vue +232 -362
  2. package/components/common/wizards/{datastoreNew → datastore}/add/lib/config/steps.ts +3 -0
  3. package/components/common/wizards/datastore/add/lib/models/interfaces.ts +11 -30
  4. package/components/common/wizards/datastore/add/lib/models/types.ts +0 -7
  5. package/components/common/wizards/datastore/add/lib/utils.ts +14 -54
  6. package/components/common/wizards/{datastoreNew → datastore}/add/lib/validations.ts +2 -2
  7. package/components/common/wizards/datastore/add/local/Local.vue +19 -45
  8. package/components/common/wizards/datastore/add/local/createName/CreateName.vue +31 -81
  9. package/components/common/wizards/datastore/add/nfs/Nfs.vue +25 -74
  10. package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +15 -56
  11. package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces.ts +0 -4
  12. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +9 -66
  13. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +1 -1
  14. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +57 -214
  15. package/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces.ts +4 -11
  16. package/components/common/wizards/datastore/add/nfs/version/Version.vue +3 -19
  17. package/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions.ts +4 -4
  18. package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +3 -10
  19. package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +37 -95
  20. package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +32 -45
  21. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +64 -267
  22. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +5 -5
  23. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +1 -11
  24. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/types.ts +1 -14
  25. package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/Table.vue +2 -2
  26. package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable.ts +1 -1
  27. package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/tableKeys.ts +1 -1
  28. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +13 -13
  29. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +8 -8
  30. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +2 -2
  31. package/components/common/wizards/datastore/add/types/Types.vue +18 -17
  32. package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +7 -16
  33. package/lib/models/enums.ts +1 -0
  34. package/package.json +1 -1
  35. package/components/common/wizards/datastore/add/lib/config/stepItems.ts +0 -225
  36. package/components/common/wizards/datastore/add/local/createName/lib/config/defaultForm.ts +0 -15
  37. package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -53
  38. package/components/common/wizards/datastore/add/nfs/configuration/lib/config/defaultForm.ts +0 -33
  39. package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +0 -100
  40. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +0 -124
  41. package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/serversListConfig.ts +0 -40
  42. package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/tableKeys.ts +0 -3
  43. package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces.ts +0 -11
  44. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +0 -55
  45. package/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces.ts +0 -4
  46. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +0 -144
  47. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/hostsTable.ts +0 -87
  48. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/tableKeys.ts +0 -11
  49. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/defaultForm.ts +0 -18
  50. package/components/common/wizards/datastore/add/sharedStorm/version/Version.vue +0 -39
  51. package/components/common/wizards/datastoreNew/add/Add.vue +0 -307
  52. package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +0 -19
  53. package/components/common/wizards/datastoreNew/add/lib/models/types.ts +0 -7
  54. package/components/common/wizards/datastoreNew/add/lib/utils.ts +0 -64
  55. package/components/common/wizards/datastoreNew/add/local/Local.vue +0 -45
  56. package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +0 -116
  57. package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +0 -63
  58. package/components/common/wizards/datastoreNew/add/nfs/_kerberosAuthentication/lib/config/radioOptions.ts +0 -27
  59. package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +0 -63
  60. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +0 -24
  61. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/interfaces.ts +0 -9
  62. package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/types.ts +0 -5
  63. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +0 -85
  64. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
  65. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
  66. package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
  67. package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +0 -236
  68. package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/models/types.ts +0 -1
  69. package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +0 -5
  70. package/components/common/wizards/datastoreNew/add/nfs/version/Version.vue +0 -26
  71. package/components/common/wizards/datastoreNew/add/nfs/version/lib/config/versionOptions.ts +0 -22
  72. package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +0 -88
  73. package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +0 -140
  74. package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +0 -84
  75. package/components/common/wizards/datastoreNew/add/sharedStorm/_version/lib/config/versionOptions.ts +0 -21
  76. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +0 -276
  77. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +0 -23
  78. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +0 -48
  79. package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts +0 -1
  80. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +0 -236
  81. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +0 -64
  82. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +0 -46
  83. package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +0 -225
  84. package/components/common/wizards/datastoreNew/add/types/Types.vue +0 -83
  85. package/components/common/wizards/datastoreNew/add/types/lib/config/typeOptions.ts +0 -41
  86. /package/components/common/wizards/{datastoreNew → datastore}/add/lib/models/enums.ts +0 -0
  87. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/_kerberosAuthentication/KerberosAuthentication.vue +0 -0
  88. /package/components/common/wizards/datastore/add/nfs/{kerberosAuthentication → _kerberosAuthentication}/lib/config/radioOptions.ts +0 -0
  89. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/accessibility/tablesView/lib/models/interfaces.ts +0 -0
  90. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/DeletePopover.vue +0 -0
  91. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/ServersList.vue +0 -0
  92. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/serversListConfig.ts +0 -0
  93. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/tableKeys.ts +0 -0
  94. /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/models/interfaces.ts +0 -0
  95. /package/components/common/wizards/datastore/add/nfs/configuration/{serversList → _serversList}/lib/models/types.ts +0 -0
  96. /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/_version/Version.vue +0 -0
  97. /package/components/common/wizards/datastore/add/sharedStorm/{version → _version}/lib/config/versionOptions.ts +0 -0
  98. /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/models/types.ts +0 -0
@@ -1,63 +0,0 @@
1
- <template>
2
- <div class="host-accessibility">
3
- <atoms-alert
4
- v-show="props.alertMessages?.length"
5
- test-id="accessibility"
6
- status="alert-danger"
7
- :items="props.alertMessages"
8
- @remove="onHideAlert"
9
- />
10
-
11
- <div>
12
- <atoms-tabs
13
- v-model="activeTab"
14
- test-id="accessibility"
15
- :items="tabs"
16
- size="small"
17
- />
18
- </div>
19
- <div>
20
- <common-wizards-datastore-new-add-nfs-accessibility-tables-view
21
- v-model="modelHosts"
22
- :data-table="dataTable?.items || []"
23
- :total-items="dataTable?.total_items || 0"
24
- :total-pages="dataTable?.total_pages || 1"
25
- :table-type="activeTab"
26
- />
27
- </div>
28
- </div>
29
- </template>
30
-
31
- <script lang="ts" setup>
32
- import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
33
- import type { UI_I_Localization } from '~/lib/models/interfaces'
34
- import type { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
35
- import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces'
36
- import { hostAccessibilityTabsFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/config/tabsPannel'
37
-
38
- const props = defineProps<{
39
- alertMessages: string[]
40
- hosts?: UI_I_CreateDatastoreHosts
41
- }>()
42
- const modelHosts = defineModel<string[]>()
43
- const emits = defineEmits<{
44
- (event: 'hide-alert', value: number): void
45
- }>()
46
-
47
- const localization = computed<UI_I_Localization>(() => useLocal())
48
-
49
- const activeTab = ref<T_HostsAccessibilityTab>('compatible-hosts')
50
- const tabs = computed<UI_I_CollapseNavItem[]>(() =>
51
- hostAccessibilityTabsFunc(localization.value, [
52
- (props.hosts?.items?.length || 0) + '',
53
- '0',
54
- ])
55
- )
56
-
57
- const dataTable = computed<UI_I_CreateDatastoreHosts>(() => props.hosts)
58
- const onHideAlert = (): void => {
59
- emits('hide-alert', 6)
60
- }
61
- </script>
62
-
63
- <style lang="scss" scoped></style>
@@ -1,24 +0,0 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
3
-
4
- export const hostAccessibilityTabsFunc = (
5
- localization: UI_I_Localization,
6
- hosts: string[]
7
- ) => {
8
-
9
- const [compatibleHosts, incompatibleHost] = hosts
10
-
11
- const tabs: UI_I_CollapseNavItem[] = [
12
- {
13
- text: localization.common.compatibleHosts.replace('{0}', compatibleHosts || ''),
14
- value: 'compatible-hosts',
15
- disabled: false,
16
- },
17
- {
18
- text: localization.common.incompatibleHosts.replace('{0}', incompatibleHost || ''),
19
- value: 'incompatible-hosts',
20
- disabled: true,
21
- },
22
- ]
23
- return tabs
24
- }
@@ -1,9 +0,0 @@
1
- export interface I_CompatibleHostsTable {
2
- id: number,
3
- host: string,
4
- cluster: string
5
- }
6
-
7
- export interface I_IncompatibleHostsTable extends I_CompatibleHostsTable{
8
- host_incompatibility_reason: string
9
- }
@@ -1,5 +0,0 @@
1
- export type T_HostsAccessibilityTab = 'compatible-hosts' | 'incompatible-hosts'
2
-
3
- export type T_CompatibleHostsTableKeys = 'host' | 'cluster'
4
-
5
- export type T_IncompatibleHostsTableKeys = 'host' | 'cluster' | 'host_incompatibility_reason'
@@ -1,85 +0,0 @@
1
- <template>
2
- <div class="data-table-view">
3
- <div>
4
- <atoms-table-data-grid
5
- v-model:selected-row="selectedHostsIdLocal"
6
- v-model:page-size="pagination.pageSize"
7
- v-model:page="pagination.page"
8
- type="checkbox"
9
- class="data-table"
10
- test-id="accessibility-table"
11
- :head-items="headItems"
12
- :body-items="bodyItems"
13
- :total-items="props.totalItems"
14
- :total-pages="props.totalPages"
15
- :items-per-page="itemsPerPage"
16
- :loading="loading"
17
- >
18
- <template #icon="{ item }">
19
- <span :class="['datagrid-cell-icon', item.data.iconClassName]" />
20
- <span class="text-ellipsis">
21
- {{ item.text }}
22
- </span>
23
- </template>
24
- </atoms-table-data-grid>
25
- </div>
26
- </div>
27
- </template>
28
-
29
- <script lang="ts" setup>
30
- import type {
31
- UI_I_HeadItem,
32
- UI_I_BodyItem,
33
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
34
- import type { UI_I_Localization } from '~/lib/models/interfaces'
35
- import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
36
- import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
37
- import type { T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
38
- import {
39
- I_CompatibleHostsTable,
40
- I_IncompatibleHostsTable,
41
- } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
42
- import * as compatibleTable from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable'
43
- import * as incompatibleTable from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/incompatibleTable'
44
-
45
- const props = defineProps<{
46
- dataTable: I_CompatibleHostsTable[] | I_IncompatibleHostsTable[]
47
- tableType: T_HostsAccessibilityTab
48
- totalItems: number
49
- totalPages: number
50
- }>()
51
- const selectedHostsIdLocal = defineModel<string[]>()
52
-
53
- const localization = computed<UI_I_Localization>(() => useLocal())
54
-
55
- const loading = computed<boolean>(() => false)
56
-
57
- const pagination = ref<UI_I_Pagination>({
58
- page: 1,
59
- pageSize: 1,
60
- })
61
-
62
- const tables: any = {
63
- 'compatible-hosts': compatibleTable,
64
- 'incompatible-hosts': incompatibleTable,
65
- }
66
-
67
- const headItems = computed<UI_I_HeadItem[]>(() =>
68
- tables[props.tableType].headItems(localization.value)
69
- )
70
- const bodyItems = computed<UI_I_BodyItem[][]>(() => {
71
- return tables[props.tableType].bodyItems(props.dataTable)
72
- })
73
- </script>
74
-
75
- <style lang="scss" scoped>
76
- .data-table-view {
77
- height: inherit;
78
- .data-table {
79
- height: inherit;
80
- :deep(.datagrid-outer-wrapper) {
81
- height: inherit;
82
- }
83
- }
84
- }
85
- </style>
@@ -1,62 +0,0 @@
1
- import type {
2
- UI_I_HeadItem,
3
- UI_I_BodyItem,
4
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
- import type { UI_I_Localization } from '~/lib/models/interfaces'
6
- import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
7
- import type { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
8
- import { compatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
9
- import {
10
- hostIconByState,
11
- clusterIconByState,
12
- } from '~/components/common/lib/config/states'
13
-
14
- const getItems = (
15
- localization: UI_I_Localization
16
- ): [string, boolean, string, string][] => {
17
- return [
18
- [localization.common.host, true, '300px', compatibleHostsTableKeys[0]],
19
- [localization.common.cluster, true, '300px', compatibleHostsTableKeys[1]],
20
- ]
21
- }
22
-
23
- export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
24
- const result: UI_I_HeadItem[] = []
25
- getItems(localization).forEach((item) => {
26
- result.push(constructHeadItem('icon', item[0], item[3], false, item[2]))
27
- })
28
- return result
29
- }
30
-
31
- export const bodyItems = (
32
- data: I_CompatibleHostsTable[]
33
- ): UI_I_BodyItem[][] => {
34
- const bodyItems: UI_I_BodyItem[][] = []
35
- data.forEach((item: I_CompatibleHostsTable, key) => {
36
- const hostData = {
37
- // @ts-ignore
38
- iconClassName: `vsphere-icon-${hostIconByState[item.state]}`,
39
- }
40
- const clusterData = {
41
- iconClassName: `vsphere-icon-${clusterIconByState[1]}`,
42
- }
43
-
44
- bodyItems.push([
45
- {
46
- key: 'icon',
47
- text: item[compatibleHostsTableKeys[0]],
48
- data: hostData,
49
- id: item.id,
50
- testId: `host-table-item-${item.host}`,
51
- },
52
- {
53
- key: 'icon',
54
- text: item[compatibleHostsTableKeys[1]],
55
- data: clusterData,
56
- id: item.id,
57
- testId: `host-table-item-${item.host}`,
58
- },
59
- ])
60
- })
61
- return bodyItems
62
- }
@@ -1,68 +0,0 @@
1
- import type {
2
- UI_I_HeadItem,
3
- UI_I_BodyItem,
4
- } from '~/components/atoms/table/dataGrid/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
- import { E_NodeIconsByState } from '~/lib/models/enums'
8
- import { incompatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
9
- import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
10
-
11
- const getItems = (
12
- localization: UI_I_Localization
13
- ): [string, boolean, string, string][] => {
14
- return [
15
- [localization.common.host, true, 'auto', incompatibleHostsTableKeys[0]],
16
- [
17
- localization.common.hostIncompatibilityReason,
18
- true,
19
- 'auto',
20
- incompatibleHostsTableKeys[1],
21
- ],
22
- [localization.common.cluster, true, 'auto', incompatibleHostsTableKeys[2]],
23
- ]
24
- }
25
-
26
- export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
27
- const result: UI_I_HeadItem[] = []
28
- getItems(localization).forEach((item, i) => {
29
- const col = i === 0 || i === 2 ? 'icon' : `col${i}`
30
- result.push(constructHeadItem(col, item[0], item[3], false, item[2]))
31
- })
32
- return result
33
- }
34
-
35
- export const bodyItems = (
36
- data: I_IncompatibleHostsTable[]
37
- ): UI_I_BodyItem[][] => {
38
- const bodyItems: UI_I_BodyItem[][] = []
39
- data.forEach((item: I_IncompatibleHostsTable, key) => {
40
- const hostData = {
41
- iconClassName: E_NodeIconsByState.host_Normal,
42
- }
43
- const clusterData = {
44
- iconClassName: E_NodeIconsByState.host_Normal,
45
- }
46
-
47
- bodyItems.push([
48
- {
49
- key: 'icon',
50
- text: item[incompatibleHostsTableKeys[0]],
51
- data: hostData,
52
- id: key,
53
- },
54
- {
55
- key: 'col1',
56
- text: item[incompatibleHostsTableKeys[1]],
57
- id: key,
58
- },
59
- {
60
- key: 'icon',
61
- text: item[incompatibleHostsTableKeys[2]],
62
- data: clusterData,
63
- id: key,
64
- },
65
- ])
66
- })
67
- return bodyItems
68
- }
@@ -1,15 +0,0 @@
1
- import type {
2
- T_CompatibleHostsTableKeys,
3
- T_IncompatibleHostsTableKeys,
4
- } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/types'
5
-
6
- export const compatibleHostsTableKeys: T_CompatibleHostsTableKeys[] = [
7
- 'host',
8
- 'cluster',
9
- ]
10
-
11
- export const incompatibleHostsTableKeys: T_IncompatibleHostsTableKeys[] = [
12
- 'host',
13
- 'cluster',
14
- 'host_incompatibility_reason',
15
- ]
@@ -1,236 +0,0 @@
1
- <template>
2
- <div class="configuration">
3
- <div>
4
- <atoms-alert
5
- v-show="props.alertMessages?.length"
6
- test-id="configure-error-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>
@@ -1 +0,0 @@
1
- export type T_ServersTableItemsTuple = ['server_name']
@@ -1,5 +0,0 @@
1
- export interface UI_I_InitialValidationFields {
2
- name: boolean
3
- folder: boolean
4
- server: boolean
5
- }
@@ -1,26 +0,0 @@
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>
@@ -1,22 +0,0 @@
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
- }