bfg-common 1.3.440 → 1.3.442
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/vm/actions/editSettings/EditSettings.vue +30 -30
- package/components/common/wizards/datastoreNew/add/Add.vue +611 -0
- package/components/common/wizards/datastoreNew/add/lib/config/stepItems.ts +191 -0
- package/components/common/wizards/datastoreNew/add/lib/config/steps.ts +202 -0
- package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +38 -0
- package/components/common/wizards/datastoreNew/add/lib/models/types.ts +14 -0
- package/components/common/wizards/datastoreNew/add/lib/utils.ts +72 -0
- package/components/common/wizards/datastoreNew/add/local/Local.vue +44 -0
- package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +129 -0
- package/components/common/wizards/datastoreNew/add/local/createName/lib/config/defaultForm.ts +15 -0
- package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +99 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +104 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +24 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/interfaces.ts +9 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/types.ts +5 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +142 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +62 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +53 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +68 -0
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +15 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +385 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/config/defaultForm.ts +33 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +12 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/DeletePopover.vue +100 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/ServersList.vue +124 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/lib/config/serversListConfig.ts +41 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/lib/config/tableKeys.ts +3 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/lib/models/interfaces.ts +11 -0
- package/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/lib/models/types.ts +1 -0
- package/components/common/wizards/datastoreNew/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +55 -0
- package/components/common/wizards/datastoreNew/add/nfs/kerberosAuthentication/lib/config/radioOptions.ts +27 -0
- package/components/common/wizards/datastoreNew/add/nfs/version/Version.vue +42 -0
- package/components/common/wizards/datastoreNew/add/nfs/version/lib/config/versionOptions.ts +20 -0
- package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +88 -0
- package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +175 -0
- package/components/common/wizards/datastoreNew/add/readyComplete/lib/models/interfaces.ts +4 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +90 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +424 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/defaultForm.ts +18 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +14 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +58 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts +14 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/table/Table.vue +134 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/table/lib/config/hostsTable.ts +87 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/table/lib/config/tableKeys.ts +11 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +232 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +64 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +46 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +225 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/version/Version.vue +39 -0
- package/components/common/wizards/datastoreNew/add/sharedStorm/version/lib/config/versionOptions.ts +21 -0
- package/components/common/wizards/datastoreNew/add/types/Types.vue +71 -0
- package/components/common/wizards/datastoreNew/add/types/lib/config/typeOptions.ts +49 -0
- package/lib/models/interfaces.ts +1 -0
- package/lib/utils/sendTask.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UI_I_Validation } from '~/lib/models/plugins/validation/interfaces'
|
|
2
|
+
|
|
3
|
+
export interface UI_I_FormValidationConfiguration {
|
|
4
|
+
name: UI_I_Validation
|
|
5
|
+
folder: UI_I_Validation
|
|
6
|
+
server: UI_I_Validation
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface UI_I_DataServersListItem {
|
|
10
|
+
server_name: string
|
|
11
|
+
}
|
package/components/common/wizards/datastoreNew/add/nfs/configuration/serversList/lib/models/types.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type T_ServersTableItemsTuple = ['server_name']
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="kerberos-auth">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="isShowAlert"
|
|
5
|
+
test-id="kerberos-authentication"
|
|
6
|
+
status="alert-warning"
|
|
7
|
+
:items="[localization.kerberosAuthenticationAlert]"
|
|
8
|
+
@remove="isShowAlert = false"
|
|
9
|
+
/>
|
|
10
|
+
|
|
11
|
+
<div class="kerberos-auth__inner">
|
|
12
|
+
<div v-for="item in kerberosTypes" :key="item.value" class="radio">
|
|
13
|
+
<input
|
|
14
|
+
:id="item.label"
|
|
15
|
+
v-model="kerberosType"
|
|
16
|
+
:data-id="item.testId"
|
|
17
|
+
type="radio"
|
|
18
|
+
:value="item.value"
|
|
19
|
+
/>
|
|
20
|
+
<label :for="item.label">
|
|
21
|
+
{{ item.label }}
|
|
22
|
+
</label>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script lang="ts" setup>
|
|
29
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
30
|
+
import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
31
|
+
import { UI_T_KerberosAuthentication } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
32
|
+
import { kerberosOptionsFunc } from '~/components/common/wizards/datastore/add/nfs/kerberosAuthentication/lib/config/radioOptions'
|
|
33
|
+
|
|
34
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
35
|
+
|
|
36
|
+
const kerberosType = ref<UI_T_KerberosAuthentication>('dont-use')
|
|
37
|
+
const isShowAlert = ref<boolean>(true)
|
|
38
|
+
|
|
39
|
+
const kerberosTypes = readonly<UI_I_RadioOption[]>(
|
|
40
|
+
kerberosOptionsFunc(localization.value)
|
|
41
|
+
)
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="scss" scoped>
|
|
45
|
+
.kerberos-auth {
|
|
46
|
+
&__inner {
|
|
47
|
+
margin-top: 12px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
input[type='radio']:focus:checked + label::before,
|
|
52
|
+
input[type='radio']:focus + label::before {
|
|
53
|
+
box-shadow: inset 0 0 0 0.25rem #0094d2;
|
|
54
|
+
}
|
|
55
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
3
|
+
|
|
4
|
+
export const kerberosOptionsFunc = (
|
|
5
|
+
localization: UI_I_Localization
|
|
6
|
+
): UI_I_RadioOption[] => {
|
|
7
|
+
return [
|
|
8
|
+
{
|
|
9
|
+
label: localization.dontUseKerberosAuthentication,
|
|
10
|
+
value: 'dont-use',
|
|
11
|
+
disabled: false,
|
|
12
|
+
testId: 'dont-use-value',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
label: localization.useKerberosAuthenticationKrb5,
|
|
16
|
+
value: 'use-only-krb5',
|
|
17
|
+
disabled: false,
|
|
18
|
+
testId: 'use-only-krb5-value',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: localization.useKerberosAuthenticationIntegrity,
|
|
22
|
+
value: 'use-integrity',
|
|
23
|
+
disabled: false,
|
|
24
|
+
testId: 'use-integrity-value',
|
|
25
|
+
},
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="nfs-version">
|
|
3
|
+
<common-select-radio-group
|
|
4
|
+
v-model="selectedVersion"
|
|
5
|
+
:options="nfsVersion"
|
|
6
|
+
/>
|
|
7
|
+
</section>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
12
|
+
import { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
13
|
+
import { 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 props = defineProps<{
|
|
17
|
+
version: UI_T_NfsType
|
|
18
|
+
}>()
|
|
19
|
+
const emits = defineEmits<{
|
|
20
|
+
(event: 'update:version', value: UI_T_NfsType): void
|
|
21
|
+
}>()
|
|
22
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
23
|
+
|
|
24
|
+
const nfsVersion = ref<UI_I_RadioOption[]>(nfsVersionFunc(localization.value))
|
|
25
|
+
|
|
26
|
+
const selectedVersion = computed<UI_T_NfsType>({
|
|
27
|
+
get() {
|
|
28
|
+
return props.version
|
|
29
|
+
},
|
|
30
|
+
set(newValue) {
|
|
31
|
+
emits('update:version', newValue)
|
|
32
|
+
},
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang="scss" scoped>
|
|
37
|
+
.nfs-version {
|
|
38
|
+
//&__desc {
|
|
39
|
+
// margin-left: 22px;
|
|
40
|
+
//}
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: 'NFS 4.1',
|
|
15
|
+
value: 'nfs-4.1',
|
|
16
|
+
disabled: false,
|
|
17
|
+
description: localization.nfsVersionDesc2,
|
|
18
|
+
},
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -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.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
|
+
class="list__default-style"
|
|
20
|
+
>
|
|
21
|
+
<template #stackBlockKey>
|
|
22
|
+
<div>
|
|
23
|
+
{{ item2.label }}
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<template #stackBlockContent>
|
|
27
|
+
<div v-if="item2.data">
|
|
28
|
+
<div
|
|
29
|
+
v-for="item3 in item2.data"
|
|
30
|
+
:key="item3"
|
|
31
|
+
class="flex-align-center"
|
|
32
|
+
>
|
|
33
|
+
<div class="vsphere-icon-host"></div>
|
|
34
|
+
<span>{{ item3 }}</span>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<span v-else>
|
|
38
|
+
{{ item2.value }}
|
|
39
|
+
</span>
|
|
40
|
+
</template>
|
|
41
|
+
</common-details-item>
|
|
42
|
+
</template>
|
|
43
|
+
</template>
|
|
44
|
+
</common-details-item>
|
|
45
|
+
</template>
|
|
46
|
+
</common-details-list>
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<script lang="ts" setup>
|
|
51
|
+
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
52
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
53
|
+
|
|
54
|
+
const props = defineProps<{
|
|
55
|
+
dataReadyView: UI_I_DetailsItem[]
|
|
56
|
+
}>()
|
|
57
|
+
// console.log(props)
|
|
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>
|
package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
3
|
+
import { UI_I_LunDisk } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
4
|
+
import { UI_T_DatastoreType } from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
5
|
+
// import { UI_I_ReadyDataForLocal } from '~/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces'
|
|
6
|
+
|
|
7
|
+
const constructLunDiskItems = (disks: any): string => {
|
|
8
|
+
const { $binary } = useNuxtApp()
|
|
9
|
+
|
|
10
|
+
let result = ''
|
|
11
|
+
disks.forEach((disk: UI_I_LunDisk) => {
|
|
12
|
+
const capacity = $binary.round(disk.capacity)
|
|
13
|
+
result += `${disk.name} - ${capacity} \n`
|
|
14
|
+
})
|
|
15
|
+
return result
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const nfsDetailsFunc = (
|
|
19
|
+
localization: UI_I_Localization,
|
|
20
|
+
data: any,
|
|
21
|
+
isSphereWizard: boolean
|
|
22
|
+
): UI_I_DetailsItem[] => {
|
|
23
|
+
const { name, server, folder, version, hosts } = data
|
|
24
|
+
// const accessMode = readonly ? 'Read-only' : 'Read-write'
|
|
25
|
+
|
|
26
|
+
const details: UI_I_DetailsItem[] = [
|
|
27
|
+
{
|
|
28
|
+
label: localization.vmfsVersion,
|
|
29
|
+
value: '',
|
|
30
|
+
items: [
|
|
31
|
+
{
|
|
32
|
+
label: localization.version,
|
|
33
|
+
value: version.toUpperCase(),
|
|
34
|
+
items: [],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
actions: [],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: localization.nameAndConfiguration,
|
|
41
|
+
value: '',
|
|
42
|
+
items: [
|
|
43
|
+
{
|
|
44
|
+
label: localization.datastoreName,
|
|
45
|
+
value: name,
|
|
46
|
+
items: [],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: localization.server,
|
|
50
|
+
value: server,
|
|
51
|
+
items: [],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: localization.folder,
|
|
55
|
+
value: folder,
|
|
56
|
+
items: [],
|
|
57
|
+
},
|
|
58
|
+
// {
|
|
59
|
+
// label: localization.accessMode,
|
|
60
|
+
// value: accessMode,
|
|
61
|
+
// items: [],
|
|
62
|
+
// },
|
|
63
|
+
],
|
|
64
|
+
actions: [],
|
|
65
|
+
},
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
if (isSphereWizard) {
|
|
69
|
+
details.push({
|
|
70
|
+
label: localization.hostsAccessibility,
|
|
71
|
+
value: '',
|
|
72
|
+
items: [
|
|
73
|
+
{
|
|
74
|
+
label: localization.hosts,
|
|
75
|
+
value: '',
|
|
76
|
+
data: hosts,
|
|
77
|
+
items: [],
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
actions: [],
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return details
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const localDetailsFunc = (
|
|
88
|
+
localization: UI_I_Localization,
|
|
89
|
+
event: any
|
|
90
|
+
): UI_I_DetailsItem[] => {
|
|
91
|
+
const { name } = event
|
|
92
|
+
|
|
93
|
+
return [
|
|
94
|
+
{
|
|
95
|
+
label: localization.selectName,
|
|
96
|
+
value: '',
|
|
97
|
+
items: [
|
|
98
|
+
{
|
|
99
|
+
label: localization.datastoreName,
|
|
100
|
+
value: name,
|
|
101
|
+
items: [],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
actions: [],
|
|
105
|
+
},
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const sharedStormDetailsFunc = (
|
|
110
|
+
localization: UI_I_Localization,
|
|
111
|
+
data: { name: string; lunDisk: string[] } // пока так ставляем тип но надо будет поменять когда будем добавлять осталние настройки
|
|
112
|
+
): UI_I_DetailsItem[] => {
|
|
113
|
+
const { name, lunDisk } = data
|
|
114
|
+
|
|
115
|
+
return [
|
|
116
|
+
{
|
|
117
|
+
label: localization.nameAndDeviceSelection,
|
|
118
|
+
value: '',
|
|
119
|
+
items: [
|
|
120
|
+
{
|
|
121
|
+
label: localization.datastoreName,
|
|
122
|
+
value: name,
|
|
123
|
+
items: [],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
label: localization.diskLun,
|
|
127
|
+
value: constructLunDiskItems(lunDisk),
|
|
128
|
+
items: [],
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
actions: [],
|
|
132
|
+
},
|
|
133
|
+
// {
|
|
134
|
+
// label: localization.partitionConfiguration,
|
|
135
|
+
// value: '',
|
|
136
|
+
// items: [
|
|
137
|
+
// {
|
|
138
|
+
// label: localization.method,
|
|
139
|
+
// value: 'None',
|
|
140
|
+
// items: [],
|
|
141
|
+
// },
|
|
142
|
+
// {
|
|
143
|
+
// label: localization.partitionFormat,
|
|
144
|
+
// value: 'None',
|
|
145
|
+
// items: [],
|
|
146
|
+
// },
|
|
147
|
+
// {
|
|
148
|
+
// label: localization.blockSize,
|
|
149
|
+
// value: 'None',
|
|
150
|
+
// items: [],
|
|
151
|
+
// },
|
|
152
|
+
// {
|
|
153
|
+
// label: localization.spaceReclamationGranularity,
|
|
154
|
+
// value: 'None',
|
|
155
|
+
// items: [],
|
|
156
|
+
// },
|
|
157
|
+
// ],
|
|
158
|
+
// actions: [],
|
|
159
|
+
// }, /* TODO данные с нее пока никуда не вставляем */
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export const constructDataReadyViewFunc = (
|
|
164
|
+
localization: UI_I_Localization,
|
|
165
|
+
type: UI_T_DatastoreType,
|
|
166
|
+
data: any
|
|
167
|
+
): UI_I_DetailsItem[] => {
|
|
168
|
+
const details = {
|
|
169
|
+
local: localDetailsFunc,
|
|
170
|
+
'shared-storm': sharedStormDetailsFunc,
|
|
171
|
+
nfs: nfsDetailsFunc,
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return details[type](localization, data, false)
|
|
175
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="vmfs-container">
|
|
3
|
+
<common-wizards-datastore-new-add-shared-storm-device-selection
|
|
4
|
+
v-show="props.stepId === 2"
|
|
5
|
+
v-model="model"
|
|
6
|
+
:step-id="props.stepId"
|
|
7
|
+
:alert-messages="props.alertMessages"
|
|
8
|
+
:messages-fields="props.messagesFields"
|
|
9
|
+
:datastore-type="props.datastoreType"
|
|
10
|
+
:project="props.project"
|
|
11
|
+
:datacenter-hosts="props.datacenterHosts"
|
|
12
|
+
:is-main-filter="props.isMainFilter"
|
|
13
|
+
:host-id="props.hostId"
|
|
14
|
+
@hide-alert="(e) => emits('hide-alert', e)"
|
|
15
|
+
@loading="(e) => emits('loading', e)"
|
|
16
|
+
@main-filter="emits('main-filter', $event)"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<!-- <templates-home-datastore-actions-add-vmfs-version-->
|
|
20
|
+
<!-- v-show="props.stepPosition === 2"-->
|
|
21
|
+
<!-- v-models:version="vmfsVersion"-->
|
|
22
|
+
<!-- />-->
|
|
23
|
+
<!-- TODO в shared-storm пока верси не будет -->
|
|
24
|
+
|
|
25
|
+
<common-wizards-datastore-add-shared-storm-partition-configuration
|
|
26
|
+
v-show="props.project === 'procurator' && props.stepId === 3"
|
|
27
|
+
:vmfs-version="vmfsVersion"
|
|
28
|
+
:selected-lun-disk-size="lunDiskTotalCapacity"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import {
|
|
35
|
+
UI_I_Localization,
|
|
36
|
+
UI_I_ArbitraryObject,
|
|
37
|
+
} from '~/lib/models/interfaces'
|
|
38
|
+
import { UI_T_Project } from '~/lib/models/types'
|
|
39
|
+
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
40
|
+
import {
|
|
41
|
+
UI_T_DatastoreType,
|
|
42
|
+
UI_T_VmfsType,
|
|
43
|
+
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
44
|
+
import {
|
|
45
|
+
UI_I_SelectHostOptions,
|
|
46
|
+
// UI_I_CreateStorageLunDiskItem,
|
|
47
|
+
} from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
48
|
+
|
|
49
|
+
const props = defineProps<{
|
|
50
|
+
project: UI_T_Project
|
|
51
|
+
stepId: number
|
|
52
|
+
datastoreType: UI_T_DatastoreType
|
|
53
|
+
alertMessages: string[]
|
|
54
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
55
|
+
datacenterHosts?: UI_I_SelectHostOptions[]
|
|
56
|
+
isMainFilter?: boolean
|
|
57
|
+
hostId?: string
|
|
58
|
+
}>()
|
|
59
|
+
const model = defineModel<any>()
|
|
60
|
+
const emits = defineEmits<{
|
|
61
|
+
// (event: 'submit', value: { name: string; lunDisk: string[] }): void
|
|
62
|
+
(event: 'hide-alert', value: boolean): void
|
|
63
|
+
(event: 'loading', value: boolean): void
|
|
64
|
+
(event: 'main-filter', value: string): void
|
|
65
|
+
}>()
|
|
66
|
+
|
|
67
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
68
|
+
|
|
69
|
+
const vmfsVersion = ref<UI_T_VmfsType>('vmfs-6')
|
|
70
|
+
|
|
71
|
+
const lunDiskTotalCapacity = computed<number>(() => {
|
|
72
|
+
if (!model.value.lunDisk.length) return 0
|
|
73
|
+
|
|
74
|
+
return +model.value.lunDisk
|
|
75
|
+
.map((disk) => disk.capacity_mb)
|
|
76
|
+
.reduce((acc, cur) => acc + cur)
|
|
77
|
+
})
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<style lang="scss" scoped>
|
|
81
|
+
.vmfs-container {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
overflow-y: auto;
|
|
85
|
+
overflow-x: hidden;
|
|
86
|
+
height: 100%;
|
|
87
|
+
&_desc {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</style>
|