bfg-common 1.5.217 → 1.5.218
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.
- package/components/common/backup/lib/utils/getBackupOrBackupStorageId.ts +29 -0
- package/components/common/backup/storage/actions/add/Add.vue +51 -0
- package/components/common/backup/storage/actions/add/temp/Add.vue +527 -0
- package/components/common/backup/storage/actions/add/temp/lib/config/stepItems.ts +236 -0
- package/components/common/backup/storage/actions/add/temp/lib/models/interfaces.ts +58 -0
- package/components/common/backup/storage/actions/add/temp/lib/models/types.ts +14 -0
- package/components/common/backup/storage/actions/add/temp/lib/utils.ts +71 -0
- package/components/common/backup/storage/actions/add/temp/local/Local.vue +83 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/Accessibility.vue +104 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/config/tabsPannel.ts +25 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/models/interfaces.ts +9 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/lib/models/types.ts +5 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/TablesView.vue +141 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/hostsTableItems.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/backup/storage/actions/add/temp/local/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/local/createName/CreateName.vue +160 -0
- package/components/common/backup/storage/actions/add/temp/local/createName/lib/config/defaultForm.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/nfs/Nfs.vue +106 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/Accessibility.vue +104 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/config/tabsPannel.ts +25 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/interfaces.ts +9 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/types.ts +5 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/TablesView.vue +141 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/Configuration.vue +469 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/lib/config/defaultForm.ts +51 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/lib/models/interfaces.ts +14 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/DeletePopover.vue +99 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/ServersList.vue +125 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/config/serversListConfig.ts +40 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/config/tableKeys.ts +3 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/models/interfaces.ts +13 -0
- package/components/common/backup/storage/actions/add/temp/nfs/configuration/serversList/lib/models/types.ts +1 -0
- package/components/common/backup/storage/actions/add/temp/nfs/kerberosAuthentication/KerberosAuthentication.vue +55 -0
- package/components/common/backup/storage/actions/add/temp/nfs/kerberosAuthentication/lib/config/radioOptions.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/nfs/version/Version.vue +42 -0
- package/components/common/backup/storage/actions/add/temp/nfs/version/lib/config/versionOptions.ts +22 -0
- package/components/common/backup/storage/actions/add/temp/readyComplete/ReadyComplete.vue +85 -0
- package/components/common/backup/storage/actions/add/temp/readyComplete/lib/config/propertiesDetails.ts +165 -0
- package/components/common/backup/storage/actions/add/temp/readyComplete/lib/models/interfaces.ts +4 -0
- package/components/common/backup/storage/actions/add/temp/samba/Samba.vue +95 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/Accessibility.vue +104 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/config/tabsPannel.ts +25 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/models/interfaces.ts +9 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/lib/models/types.ts +5 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/TablesView.vue +141 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/backup/storage/actions/add/temp/samba/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/Configuration.vue +470 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/lib/config/defaultForm.ts +51 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/lib/models/interfaces.ts +14 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/DeletePopover.vue +99 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/ServersList.vue +124 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/config/serversListConfig.ts +40 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/config/tableKeys.ts +3 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/models/interfaces.ts +13 -0
- package/components/common/backup/storage/actions/add/temp/samba/configuration/serversList/lib/models/types.ts +1 -0
- package/components/common/backup/storage/actions/add/temp/samba/kerberosAuthentication/KerberosAuthentication.vue +55 -0
- package/components/common/backup/storage/actions/add/temp/samba/kerberosAuthentication/lib/config/radioOptions.ts +27 -0
- package/components/common/backup/storage/actions/add/temp/sharedStorm/SharedStorm.vue +106 -0
- package/components/common/backup/storage/actions/add/temp/sharedStorm/storage/Storage.vue +71 -0
- package/components/common/backup/storage/actions/add/temp/sharedStorm/storage/lib/config/defaultForm.ts +15 -0
- package/components/common/backup/storage/actions/add/temp/types/Types.vue +79 -0
- package/components/common/backup/storage/actions/add/temp/types/lib/config/typeOptions.ts +62 -0
- package/components/common/backup/storage/actions/delete/Delete.vue +65 -0
- package/components/common/backup/storage/actions/delete/lib/models/interfaces.ts +5 -0
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
- package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +3 -3
- package/components/common/selectLanguage/lib/config/config.ts +6 -6
- package/package.json +2 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="errors.length"
|
|
5
|
+
test-id="accessibility"
|
|
6
|
+
status="alert-danger"
|
|
7
|
+
:items="errors"
|
|
8
|
+
@remove="removeValidationErrors"
|
|
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-backup-storage-actions-add-temp-nfs-accessibility-tables-view
|
|
21
|
+
v-model:selected-row="selectedHosts"
|
|
22
|
+
:data-table="dataTable?.items || []"
|
|
23
|
+
:total-items="dataTable?.total_items || 0"
|
|
24
|
+
:total-pages="dataTable?.total_pages || 1"
|
|
25
|
+
:pagination="pagination"
|
|
26
|
+
:table-type="activeTab"
|
|
27
|
+
@pagination="updatePagination"
|
|
28
|
+
@sort="sortTable"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script lang="ts" setup>
|
|
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/backup/storage/actions/add/temp/nfs/accessibility/lib/models/types'
|
|
39
|
+
import { hostAccessibilityTabsFunc } from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/config/tabsPannel'
|
|
40
|
+
// import { hostsAccessibilityTablesFunc } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems'
|
|
41
|
+
|
|
42
|
+
const props = defineProps<{
|
|
43
|
+
hostAccessibilitySubmit: number
|
|
44
|
+
hosts?: any
|
|
45
|
+
}>()
|
|
46
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
47
|
+
const emits = defineEmits<{
|
|
48
|
+
(event: 'next', value: string[]): void
|
|
49
|
+
}>()
|
|
50
|
+
|
|
51
|
+
const activeTab = ref<T_HostsAccessibilityTab>('compatible-hosts')
|
|
52
|
+
const tabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
53
|
+
hostAccessibilityTabsFunc(localization.value, [
|
|
54
|
+
(props.hosts?.items?.length || 0) + '',
|
|
55
|
+
'0',
|
|
56
|
+
])
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
// const dataTable = computed(() => hostsAccessibilityTablesFunc(activeTab.value))
|
|
60
|
+
// TODO refactoring
|
|
61
|
+
const dataTable = computed<any>(() => props.hosts)
|
|
62
|
+
|
|
63
|
+
const pagination = ref<UI_I_Pagination>({
|
|
64
|
+
page: 1,
|
|
65
|
+
pageSize: 35,
|
|
66
|
+
})
|
|
67
|
+
const sort = ref<string | null>(null)
|
|
68
|
+
|
|
69
|
+
const selectedHosts = ref<string[]>([])
|
|
70
|
+
|
|
71
|
+
const updatePagination = (event: UI_I_Pagination): void => {
|
|
72
|
+
pagination.value = event
|
|
73
|
+
}
|
|
74
|
+
const sortTable = (event: string): void => {
|
|
75
|
+
sort.value = event
|
|
76
|
+
}
|
|
77
|
+
|
|
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
|
+
const submit = async (): Promise<void> => {
|
|
87
|
+
if (!selectedHosts.value.length) {
|
|
88
|
+
const text = localization.value.common.selectLeastEntityContinue
|
|
89
|
+
showValidationErrors(text)
|
|
90
|
+
return
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
removeValidationErrors()
|
|
94
|
+
emits('next', selectedHosts.value)
|
|
95
|
+
}
|
|
96
|
+
watch(
|
|
97
|
+
() => props.hostAccessibilitySubmit,
|
|
98
|
+
() => {
|
|
99
|
+
submit()
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<style lang="scss" scoped></style>
|
package/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/config/tabsPannel.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
): UI_I_CollapseNavItem[] => {
|
|
8
|
+
const [compatibleHosts, incompatibleHost] = hosts
|
|
9
|
+
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
text: localization.common.compatibleHosts.replace('{0}', compatibleHosts || ''),
|
|
13
|
+
value: 'compatible-hosts',
|
|
14
|
+
disabled: false,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
text: localization.common.incompatibleHosts.replace(
|
|
18
|
+
'{0}',
|
|
19
|
+
incompatibleHost || ''
|
|
20
|
+
),
|
|
21
|
+
value: 'incompatible-hosts',
|
|
22
|
+
disabled: true,
|
|
23
|
+
},
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="data-table-view">
|
|
3
|
+
<div>
|
|
4
|
+
<atoms-table-data-grid
|
|
5
|
+
v-model:selected-row="selected"
|
|
6
|
+
v-model:page-size="paginationLocal.pageSize"
|
|
7
|
+
v-model:page="paginationLocal.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
|
+
@filtering="filtering"
|
|
18
|
+
@sorting="sorting"
|
|
19
|
+
>
|
|
20
|
+
<template #icon="{ item }">
|
|
21
|
+
<span :class="['datagrid-cell-icon', item.data.iconClassName]" />
|
|
22
|
+
<span class="text-ellipsis">
|
|
23
|
+
{{ item.text }}
|
|
24
|
+
</span>
|
|
25
|
+
</template>
|
|
26
|
+
</atoms-table-data-grid>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script lang="ts" setup>
|
|
32
|
+
import type {
|
|
33
|
+
UI_I_HeadItem,
|
|
34
|
+
UI_I_BodyItem,
|
|
35
|
+
} from '~/components/atoms/table/dataGrid/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 { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
|
|
39
|
+
import type { UI_T_HostsAccessibilityTab } from '~/components/common/wizards/datastore/add/steps/hostAccessibility/lib/models/types'
|
|
40
|
+
import type {
|
|
41
|
+
I_CompatibleHostsTable,
|
|
42
|
+
I_IncompatibleHostsTable,
|
|
43
|
+
} from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/interfaces'
|
|
44
|
+
import * as compatibleTable from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/compatibleTable'
|
|
45
|
+
import * as incompatibleTable from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/incompatibleTable'
|
|
46
|
+
|
|
47
|
+
const props = defineProps<{
|
|
48
|
+
dataTable: I_CompatibleHostsTable[] | I_IncompatibleHostsTable[]
|
|
49
|
+
selectedRow: number[]
|
|
50
|
+
tableType: UI_T_HostsAccessibilityTab
|
|
51
|
+
totalItems: number
|
|
52
|
+
totalPages: number
|
|
53
|
+
pagination: UI_I_Pagination
|
|
54
|
+
}>()
|
|
55
|
+
const emits = defineEmits<{
|
|
56
|
+
(event: 'update:selected-row', value: number[]): void
|
|
57
|
+
(event: 'pagination', value: UI_I_Pagination): void
|
|
58
|
+
(event: 'sort', value: string): void
|
|
59
|
+
}>()
|
|
60
|
+
|
|
61
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
62
|
+
|
|
63
|
+
const loading = computed<boolean>(() => false)
|
|
64
|
+
|
|
65
|
+
const selected = computed<number[]>({
|
|
66
|
+
get() {
|
|
67
|
+
return props.selectedRow
|
|
68
|
+
},
|
|
69
|
+
set(value) {
|
|
70
|
+
emits('update:selected-row', value)
|
|
71
|
+
},
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
const filtering = (e: [string, string][]): void => {
|
|
75
|
+
console.log(e, 111)
|
|
76
|
+
}
|
|
77
|
+
const sorting = (e: [number, boolean]): void => {
|
|
78
|
+
const [column, status] = e
|
|
79
|
+
const direction = status ? 'desc' : 'asc'
|
|
80
|
+
|
|
81
|
+
const sort = `${column}.${direction}`
|
|
82
|
+
|
|
83
|
+
emits('sort', sort)
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const paginationLocal = ref<UI_I_Pagination>({
|
|
87
|
+
page: 1,
|
|
88
|
+
pageSize: 1,
|
|
89
|
+
})
|
|
90
|
+
watch(
|
|
91
|
+
() => props.pagination,
|
|
92
|
+
(newValue) => {
|
|
93
|
+
paginationLocal.value = newValue
|
|
94
|
+
},
|
|
95
|
+
{ immediate: true }
|
|
96
|
+
)
|
|
97
|
+
watch(
|
|
98
|
+
paginationLocal,
|
|
99
|
+
(newValue) => {
|
|
100
|
+
emits('pagination', newValue)
|
|
101
|
+
},
|
|
102
|
+
{ deep: true, immediate: true }
|
|
103
|
+
)
|
|
104
|
+
const tables: {
|
|
105
|
+
'compatible-hosts': any
|
|
106
|
+
'incompatible-hosts': any
|
|
107
|
+
} = {
|
|
108
|
+
'compatible-hosts': compatibleTable,
|
|
109
|
+
'incompatible-hosts': incompatibleTable,
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
113
|
+
tables[props.tableType].headItems(localization.value)
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
const bodyItems = ref<UI_I_BodyItem[][]>([])
|
|
117
|
+
watch(
|
|
118
|
+
() => props.dataTable,
|
|
119
|
+
(newValue) => {
|
|
120
|
+
if (!newValue?.length) {
|
|
121
|
+
bodyItems.value = []
|
|
122
|
+
return
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
bodyItems.value = tables[props.tableType].bodyItems(newValue)
|
|
126
|
+
},
|
|
127
|
+
{ deep: true, immediate: true }
|
|
128
|
+
)
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<style lang="scss" scoped>
|
|
132
|
+
.data-table-view {
|
|
133
|
+
height: inherit;
|
|
134
|
+
.data-table {
|
|
135
|
+
height: inherit;
|
|
136
|
+
:deep(.datagrid-outer-wrapper) {
|
|
137
|
+
height: inherit;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
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 {
|
|
7
|
+
hostIconByState,
|
|
8
|
+
clusterIconByState,
|
|
9
|
+
} from '~/components/common/lib/config/states'
|
|
10
|
+
import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
11
|
+
import type { I_CompatibleHostsTable } from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/interfaces'
|
|
12
|
+
import { compatibleHostsTableKeys } from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/tableKeys'
|
|
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) => {
|
|
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
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { API_UI_I_DataTable } from '~/lib/models/table/interfaces'
|
|
2
|
+
import type {
|
|
3
|
+
I_CompatibleHostsTable,
|
|
4
|
+
I_IncompatibleHostsTable,
|
|
5
|
+
} from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/interfaces'
|
|
6
|
+
import type { T_HostsAccessibilityTab } from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/types'
|
|
7
|
+
|
|
8
|
+
const compatibleHostsTable: API_UI_I_DataTable<I_CompatibleHostsTable[]> = {
|
|
9
|
+
items: [],
|
|
10
|
+
total_items: 5,
|
|
11
|
+
total_pages: 1,
|
|
12
|
+
}
|
|
13
|
+
const incompatibleHostsTable: API_UI_I_DataTable<I_IncompatibleHostsTable[]> = {
|
|
14
|
+
items: [],
|
|
15
|
+
total_items: 0,
|
|
16
|
+
total_pages: 1,
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { incompatibleHostsTable, compatibleHostsTable }
|
|
20
|
+
export const hostsAccessibilityTablesFunc = (type: T_HostsAccessibilityTab) => {
|
|
21
|
+
const hostItems = {
|
|
22
|
+
'compatible-hosts': compatibleHostsTable,
|
|
23
|
+
'incompatible-hosts': incompatibleHostsTable,
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return hostItems[type]
|
|
27
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { E_NodeIconsByState } from '~/lib/models/enums'
|
|
7
|
+
import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
8
|
+
import type { I_IncompatibleHostsTable } from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/interfaces'
|
|
9
|
+
import { incompatibleHostsTableKeys } from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/tablesView/lib/config/tableKeys'
|
|
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
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
T_CompatibleHostsTableKeys,
|
|
3
|
+
T_IncompatibleHostsTableKeys,
|
|
4
|
+
} from '~/components/common/backup/storage/actions/add/temp/nfs/accessibility/lib/models/types'
|
|
5
|
+
|
|
6
|
+
export const compatibleHostsTableKeys: T_CompatibleHostsTableKeys[] = [
|
|
7
|
+
'name',
|
|
8
|
+
'cluster',
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
export const incompatibleHostsTableKeys: T_IncompatibleHostsTableKeys[] = [
|
|
12
|
+
'name',
|
|
13
|
+
'cluster',
|
|
14
|
+
'host_incompatibility_reason',
|
|
15
|
+
]
|