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.
- package/components/common/wizards/datastore/add/Add.vue +232 -362
- package/components/common/wizards/{datastoreNew → datastore}/add/lib/config/steps.ts +3 -0
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +11 -30
- package/components/common/wizards/datastore/add/lib/models/types.ts +0 -7
- package/components/common/wizards/datastore/add/lib/utils.ts +14 -54
- package/components/common/wizards/{datastoreNew → datastore}/add/lib/validations.ts +2 -2
- package/components/common/wizards/datastore/add/local/Local.vue +19 -45
- package/components/common/wizards/datastore/add/local/createName/CreateName.vue +31 -81
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +25 -74
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +15 -56
- package/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces.ts +0 -4
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +9 -66
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +1 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +57 -214
- package/components/common/wizards/datastore/add/nfs/configuration/lib/models/interfaces.ts +4 -11
- package/components/common/wizards/datastore/add/nfs/version/Version.vue +3 -19
- package/components/common/wizards/datastore/add/nfs/version/lib/config/versionOptions.ts +4 -4
- package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +3 -10
- package/components/common/wizards/datastore/add/readyComplete/lib/config/propertiesDetails.ts +37 -95
- package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +32 -45
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +64 -267
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +5 -5
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +1 -11
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/types.ts +1 -14
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/Table.vue +2 -2
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/lunDiskTable.ts +1 -1
- package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/config/tableKeys.ts +1 -1
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +13 -13
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +8 -8
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +2 -2
- package/components/common/wizards/datastore/add/types/Types.vue +18 -17
- package/components/common/wizards/datastore/add/types/lib/config/typeOptions.ts +7 -16
- package/lib/models/enums.ts +1 -0
- package/package.json +1 -1
- package/components/common/wizards/datastore/add/lib/config/stepItems.ts +0 -225
- package/components/common/wizards/datastore/add/local/createName/lib/config/defaultForm.ts +0 -15
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/hostsTableItems.ts +0 -53
- package/components/common/wizards/datastore/add/nfs/configuration/lib/config/defaultForm.ts +0 -33
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +0 -100
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +0 -124
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/serversListConfig.ts +0 -40
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/config/tableKeys.ts +0 -3
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/lib/models/interfaces.ts +0 -11
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +0 -55
- package/components/common/wizards/datastore/add/readyComplete/lib/models/interfaces.ts +0 -4
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +0 -144
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/hostsTable.ts +0 -87
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/lib/config/tableKeys.ts +0 -11
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/config/defaultForm.ts +0 -18
- package/components/common/wizards/datastore/add/sharedStorm/version/Version.vue +0 -39
- package/components/common/wizards/datastoreNew/add/Add.vue +0 -307
- package/components/common/wizards/datastoreNew/add/lib/models/interfaces.ts +0 -19
- package/components/common/wizards/datastoreNew/add/lib/models/types.ts +0 -7
- package/components/common/wizards/datastoreNew/add/lib/utils.ts +0 -64
- package/components/common/wizards/datastoreNew/add/local/Local.vue +0 -45
- package/components/common/wizards/datastoreNew/add/local/createName/CreateName.vue +0 -116
- package/components/common/wizards/datastoreNew/add/nfs/Nfs.vue +0 -63
- package/components/common/wizards/datastoreNew/add/nfs/_kerberosAuthentication/lib/config/radioOptions.ts +0 -27
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/Accessibility.vue +0 -63
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/config/tabsPannel.ts +0 -24
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/interfaces.ts +0 -9
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/lib/models/types.ts +0 -5
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/TablesView.vue +0 -85
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/compatibleTable.ts +0 -62
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/incompatibleTable.ts +0 -68
- package/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/datastoreNew/add/nfs/configuration/Configuration.vue +0 -236
- package/components/common/wizards/datastoreNew/add/nfs/configuration/_serversList/lib/models/types.ts +0 -1
- package/components/common/wizards/datastoreNew/add/nfs/configuration/lib/models/interfaces.ts +0 -5
- package/components/common/wizards/datastoreNew/add/nfs/version/Version.vue +0 -26
- package/components/common/wizards/datastoreNew/add/nfs/version/lib/config/versionOptions.ts +0 -22
- package/components/common/wizards/datastoreNew/add/readyComplete/ReadyComplete.vue +0 -88
- package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts +0 -140
- package/components/common/wizards/datastoreNew/add/sharedStorm/SharedStorm.vue +0 -84
- package/components/common/wizards/datastoreNew/add/sharedStorm/_version/lib/config/versionOptions.ts +0 -21
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue +0 -276
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions.ts +0 -23
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces.ts +0 -48
- package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts +0 -1
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +0 -236
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +0 -64
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/lib/config/selectOptions.ts +0 -46
- package/components/common/wizards/datastoreNew/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +0 -225
- package/components/common/wizards/datastoreNew/add/types/Types.vue +0 -83
- package/components/common/wizards/datastoreNew/add/types/lib/config/typeOptions.ts +0 -41
- /package/components/common/wizards/{datastoreNew → datastore}/add/lib/models/enums.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/_kerberosAuthentication/KerberosAuthentication.vue +0 -0
- /package/components/common/wizards/datastore/add/nfs/{kerberosAuthentication → _kerberosAuthentication}/lib/config/radioOptions.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/accessibility/tablesView/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/DeletePopover.vue +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/ServersList.vue +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/serversListConfig.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/config/tableKeys.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/nfs/configuration/_serversList/lib/models/interfaces.ts +0 -0
- /package/components/common/wizards/datastore/add/nfs/configuration/{serversList → _serversList}/lib/models/types.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/_version/Version.vue +0 -0
- /package/components/common/wizards/datastore/add/sharedStorm/{version → _version}/lib/config/versionOptions.ts +0 -0
- /package/components/common/wizards/{datastoreNew → datastore}/add/sharedStorm/deviceSelection/table/lib/models/types.ts +0 -0
|
@@ -1,88 +0,0 @@
|
|
|
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>
|
package/components/common/wizards/datastoreNew/add/readyComplete/lib/config/propertiesDetails.ts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_DetailsItem } from '~/components/common/details/lib/models/interfaces'
|
|
3
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
4
|
-
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
5
|
-
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastoreNew/add/lib/models/interfaces'
|
|
6
|
-
import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces'
|
|
7
|
-
const constructLunDiskItems = (
|
|
8
|
-
disks: UI_I_CreateStorageLunDiskItem[]
|
|
9
|
-
): string => {
|
|
10
|
-
const { $binary } = useNuxtApp() as any
|
|
11
|
-
|
|
12
|
-
let result = ''
|
|
13
|
-
disks.forEach((disk: UI_I_CreateStorageLunDiskItem) => {
|
|
14
|
-
const capacity = $binary.round(disk.capacity_mb)
|
|
15
|
-
result += `${disk.name} - ${capacity} \n`
|
|
16
|
-
})
|
|
17
|
-
return result
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const nfsDetailsFunc = (
|
|
21
|
-
localization: UI_I_Localization,
|
|
22
|
-
data: UI_I_CreateDatastoreForm,
|
|
23
|
-
project: UI_T_Project,
|
|
24
|
-
nfsHosts: UI_I_CreateDatastoreHosts
|
|
25
|
-
): UI_I_DetailsItem[] => {
|
|
26
|
-
const { name, server, folder, nfsVersion, hosts } = data
|
|
27
|
-
// const accessMode = readonly ? 'Read-only' : 'Read-write'
|
|
28
|
-
|
|
29
|
-
const details: UI_I_DetailsItem[] = [
|
|
30
|
-
{
|
|
31
|
-
label: localization.common.vmfsVersion,
|
|
32
|
-
value: '',
|
|
33
|
-
items: [
|
|
34
|
-
{
|
|
35
|
-
label: localization.common.version,
|
|
36
|
-
value: nfsVersion.toUpperCase(),
|
|
37
|
-
items: [],
|
|
38
|
-
testId: 'view-selected-nfs-version-in-complete',
|
|
39
|
-
},
|
|
40
|
-
],
|
|
41
|
-
actions: [],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
label: localization.common.nameAndConfiguration,
|
|
45
|
-
value: '',
|
|
46
|
-
items: [
|
|
47
|
-
{
|
|
48
|
-
label: localization.common.datastoreName,
|
|
49
|
-
value: name,
|
|
50
|
-
items: [],
|
|
51
|
-
testId: 'view-storage-name-in-complete',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: localization.common.server,
|
|
55
|
-
value: server,
|
|
56
|
-
items: [],
|
|
57
|
-
testId: 'view-server-name-in-complete',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label: localization.common.folder,
|
|
61
|
-
value: folder,
|
|
62
|
-
items: [],
|
|
63
|
-
testId: 'view-folder-name-in-complete',
|
|
64
|
-
},
|
|
65
|
-
// {
|
|
66
|
-
// label: localization.accessMode,
|
|
67
|
-
// value: accessMode,
|
|
68
|
-
// items: [],
|
|
69
|
-
// },
|
|
70
|
-
],
|
|
71
|
-
actions: [],
|
|
72
|
-
},
|
|
73
|
-
]
|
|
74
|
-
|
|
75
|
-
if (project === 'sphere') {
|
|
76
|
-
const hostsNames = nfsHosts
|
|
77
|
-
? nfsHosts.items
|
|
78
|
-
.filter((host) => data.hosts.includes(host.id))
|
|
79
|
-
.map((host) => host.host)
|
|
80
|
-
: []
|
|
81
|
-
details.push({
|
|
82
|
-
label: localization.common.hostsAccessibility,
|
|
83
|
-
value: '',
|
|
84
|
-
items: [
|
|
85
|
-
{
|
|
86
|
-
label: localization.common.hosts,
|
|
87
|
-
value: '',
|
|
88
|
-
data: hostsNames,
|
|
89
|
-
items: [],
|
|
90
|
-
testId: '',
|
|
91
|
-
},
|
|
92
|
-
],
|
|
93
|
-
actions: [],
|
|
94
|
-
})
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return details
|
|
98
|
-
}
|
|
99
|
-
const sharedStormDetailsFunc = (
|
|
100
|
-
localization: UI_I_Localization,
|
|
101
|
-
data: UI_I_CreateDatastoreForm
|
|
102
|
-
): UI_I_DetailsItem[] => {
|
|
103
|
-
const { name, lunDisk } = data
|
|
104
|
-
|
|
105
|
-
return [
|
|
106
|
-
{
|
|
107
|
-
label: localization.common.nameAndDeviceSelection,
|
|
108
|
-
value: '',
|
|
109
|
-
items: [
|
|
110
|
-
{
|
|
111
|
-
label: localization.common.datastoreName,
|
|
112
|
-
value: name,
|
|
113
|
-
items: [],
|
|
114
|
-
testId: 'view-storage-name-in-complete',
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
label: localization.common.diskLun,
|
|
118
|
-
value: constructLunDiskItems(lunDisk),
|
|
119
|
-
items: [],
|
|
120
|
-
testId: 'view-selected-lun-disks-in-complete',
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
actions: [],
|
|
124
|
-
},
|
|
125
|
-
]
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export const constructDataReadyViewFunc = (
|
|
129
|
-
localization: UI_I_Localization,
|
|
130
|
-
data: UI_I_CreateDatastoreForm,
|
|
131
|
-
project: UI_T_Project,
|
|
132
|
-
nfsHosts: UI_I_CreateDatastoreHosts
|
|
133
|
-
): UI_I_DetailsItem[] => {
|
|
134
|
-
const details = {
|
|
135
|
-
2: sharedStormDetailsFunc,
|
|
136
|
-
4: nfsDetailsFunc,
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return details[data.type_code](localization, data, project, nfsHosts)
|
|
140
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="shared-storm-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
|
-
:hosts="props.hosts"
|
|
12
|
-
:is-main-filter="props.isMainFilter"
|
|
13
|
-
:host-id="props.hostId"
|
|
14
|
-
@hide-alert="(e) => emits('hide-alert', e)"
|
|
15
|
-
@main-filter="emits('main-filter', $event)"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<!-- <templates-home-datastore-actions-add-vmfs-version-->
|
|
19
|
-
<!-- v-show="props.stepPosition === 2"-->
|
|
20
|
-
<!-- v-models="vmfsVersion"-->
|
|
21
|
-
<!-- />-->
|
|
22
|
-
<!-- TODO в shared-storm пока верси не будет -->
|
|
23
|
-
|
|
24
|
-
<common-wizards-datastore-add-shared-storm-partition-configuration
|
|
25
|
-
v-show="props.project === 'procurator' && props.stepId === 3"
|
|
26
|
-
:vmfs-version="vmfsVersion"
|
|
27
|
-
:selected-lun-disk-size="lunDiskTotalCapacity"
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script lang="ts" setup>
|
|
33
|
-
import {
|
|
34
|
-
UI_I_Localization,
|
|
35
|
-
UI_I_ArbitraryObject,
|
|
36
|
-
} from '~/lib/models/interfaces'
|
|
37
|
-
import { UI_T_Project } from '~/lib/models/types'
|
|
38
|
-
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
39
|
-
import {
|
|
40
|
-
UI_T_DatastoreType,
|
|
41
|
-
UI_T_VmfsType,
|
|
42
|
-
} from '~/components/common/wizards/datastore/add/lib/models/types'
|
|
43
|
-
import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
44
|
-
import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces'
|
|
45
|
-
import type { UI_I_CreateDatastoreForm } from '~/components/common/wizards/datastoreNew/add/lib/models/interfaces'
|
|
46
|
-
|
|
47
|
-
const props = defineProps<{
|
|
48
|
-
project: UI_T_Project
|
|
49
|
-
stepId: number
|
|
50
|
-
datastoreType: UI_T_DatastoreType
|
|
51
|
-
alertMessages: string[]
|
|
52
|
-
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
53
|
-
hosts?: UI_I_CreateDatastoreHosts
|
|
54
|
-
isMainFilter?: boolean
|
|
55
|
-
hostId?: string
|
|
56
|
-
}>()
|
|
57
|
-
const model = defineModel<UI_I_CreateDatastoreForm>({ required: true })
|
|
58
|
-
const emits = defineEmits<{
|
|
59
|
-
(event: 'hide-alert', value: boolean): void
|
|
60
|
-
(event: 'main-filter', value: string): void
|
|
61
|
-
}>()
|
|
62
|
-
|
|
63
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
64
|
-
|
|
65
|
-
const vmfsVersion = ref<UI_T_VmfsType>('vmfs-6')
|
|
66
|
-
|
|
67
|
-
const lunDiskTotalCapacity = computed<number>(() => {
|
|
68
|
-
if (!model.value.lunDisk.length) return 0
|
|
69
|
-
|
|
70
|
-
return +model.value.lunDisk
|
|
71
|
-
.map((disk: UI_I_CreateStorageLunDiskItem) => disk.capacity_mb)
|
|
72
|
-
.reduce((acc, cur) => acc + cur)
|
|
73
|
-
})
|
|
74
|
-
</script>
|
|
75
|
-
|
|
76
|
-
<style lang="scss" scoped>
|
|
77
|
-
.shared-storm-container {
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
overflow-y: auto;
|
|
81
|
-
overflow-x: hidden;
|
|
82
|
-
height: inherit;
|
|
83
|
-
}
|
|
84
|
-
</style>
|
package/components/common/wizards/datastoreNew/add/sharedStorm/_version/lib/config/versionOptions.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const vmfsVersionFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
): UI_I_RadioOption[] => {
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
label: 'VMFS 6',
|
|
10
|
-
value: 'vmfs-6',
|
|
11
|
-
disabled: false,
|
|
12
|
-
description: localization.common.vmfsVersionDesc1,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: 'VMFS 5',
|
|
16
|
-
value: 'vmfs-5',
|
|
17
|
-
disabled: false,
|
|
18
|
-
description: localization.common.vmfsVersionDesc2,
|
|
19
|
-
},
|
|
20
|
-
]
|
|
21
|
-
}
|
package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/DeviceSelection.vue
DELETED
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="device-selection-step">
|
|
3
|
-
<atoms-alert
|
|
4
|
-
v-show="props.alertMessages?.length"
|
|
5
|
-
:test-id="errorAlertDataId"
|
|
6
|
-
status="alert-danger"
|
|
7
|
-
:items="props.alertMessages"
|
|
8
|
-
@remove="onHideAlert"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<div class="clr-form-control clr-row">
|
|
12
|
-
<label for="" class="clr-control-label clr-col-md-2">
|
|
13
|
-
{{ localization.common.name }}
|
|
14
|
-
</label>
|
|
15
|
-
|
|
16
|
-
<div class="clr-control-container" :class="nameErrorText && 'clr-error'">
|
|
17
|
-
<div class="flex-align-center">
|
|
18
|
-
<input
|
|
19
|
-
id="device-selection-input"
|
|
20
|
-
v-model="model.name"
|
|
21
|
-
data-id="device-selection-input"
|
|
22
|
-
type="text"
|
|
23
|
-
class="clr-input"
|
|
24
|
-
@blur="initValidation(true)"
|
|
25
|
-
@input="initValidation(false)"
|
|
26
|
-
/>
|
|
27
|
-
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div class="clr-subtext" data-id="storm-datastore-name-field-require">
|
|
31
|
-
{{ nameErrorText }}
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<atoms-alert
|
|
37
|
-
v-if="alertInfo"
|
|
38
|
-
test-id="device-selection-information-alert"
|
|
39
|
-
class="device-selection-step__alert-info"
|
|
40
|
-
status="alert-info"
|
|
41
|
-
:items="[localization.common.nameAndDeviceSelectionAlertInfo]"
|
|
42
|
-
@remove="onHideAlertInfo"
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<div
|
|
46
|
-
v-if="props.project === 'sphere' && !props.hostId"
|
|
47
|
-
class="clr-form-control clr-row"
|
|
48
|
-
>
|
|
49
|
-
<label class="clr-control-label clr-col-12 clr-col-md-2">
|
|
50
|
-
{{ localization.common.selectHost }}
|
|
51
|
-
</label>
|
|
52
|
-
|
|
53
|
-
<div>
|
|
54
|
-
<div class="clr-select-wrapper">
|
|
55
|
-
<select
|
|
56
|
-
id="device-host-select"
|
|
57
|
-
v-model="model.hosts"
|
|
58
|
-
data-id="device-host-select"
|
|
59
|
-
class="dropdown-toggle"
|
|
60
|
-
@change="onSelectHost"
|
|
61
|
-
>
|
|
62
|
-
<option
|
|
63
|
-
v-for="(item, index) in hostOptions"
|
|
64
|
-
:key="index"
|
|
65
|
-
:value="[item.value]"
|
|
66
|
-
:disabled="item.disabled"
|
|
67
|
-
>
|
|
68
|
-
{{ item.text }}
|
|
69
|
-
</option>
|
|
70
|
-
</select>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="clr-subtext">
|
|
73
|
-
{{ localization.common.selectHostToViewAccessible }}
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<div class="device-selection-step__disk-list">
|
|
79
|
-
<common-wizards-datastore-new-add-shared-storm-device-selection-table
|
|
80
|
-
v-model="model.lunDisk"
|
|
81
|
-
:data-table="dataTable?.items || []"
|
|
82
|
-
:total-items="dataTable?.total_items || 0"
|
|
83
|
-
:total-pages="dataTable?.total_pages || 1"
|
|
84
|
-
:pagination="pagination"
|
|
85
|
-
:loading="loading"
|
|
86
|
-
:is-main-filter="props.isMainFilter"
|
|
87
|
-
@pagination="updatePagination"
|
|
88
|
-
@sort="sortTable"
|
|
89
|
-
@main-filter="emits('main-filter', $event)"
|
|
90
|
-
/>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
94
|
-
|
|
95
|
-
<script lang="ts" setup>
|
|
96
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
97
|
-
import type {
|
|
98
|
-
UI_I_Localization,
|
|
99
|
-
UI_I_ArbitraryObject,
|
|
100
|
-
} from '~/lib/models/interfaces'
|
|
101
|
-
import {
|
|
102
|
-
API_UI_I_DataTable,
|
|
103
|
-
UI_I_Pagination,
|
|
104
|
-
UI_I_DataTableQuery,
|
|
105
|
-
} from '~/lib/models/table/interfaces'
|
|
106
|
-
import type {
|
|
107
|
-
UI_I_CreateStorageLunDiskItem,
|
|
108
|
-
UI_I_LunDiskSpherePayload,
|
|
109
|
-
UI_I_SelectHostOptions,
|
|
110
|
-
} from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
111
|
-
import type { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
112
|
-
import type { UI_I_CreateDatastoreHosts } from '~/components/common/wizards/datastoreNew/add/nfs/accessibility/tablesView/lib/models/interfaces'
|
|
113
|
-
import type { UI_T_DatastoreType } from '~/components/common/wizards/datastoreNew/add/lib/models/types'
|
|
114
|
-
import { hostsOptionsFunc } from '~/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/config/selectOptions'
|
|
115
|
-
import { validateNameAndGenerateDataId } from '~/components/common/wizards/datastoreNew/add/lib/utils'
|
|
116
|
-
|
|
117
|
-
const props = defineProps<{
|
|
118
|
-
project: UI_T_Project
|
|
119
|
-
stepId: number
|
|
120
|
-
alertMessages: string[]
|
|
121
|
-
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
122
|
-
datastoreType: UI_T_DatastoreType
|
|
123
|
-
hosts?: UI_I_CreateDatastoreHosts | undefined
|
|
124
|
-
isMainFilter?: boolean
|
|
125
|
-
hostId?: string
|
|
126
|
-
}>()
|
|
127
|
-
const model = defineModel<any>()
|
|
128
|
-
const emits = defineEmits<{
|
|
129
|
-
(event: 'hide-alert', value: number): void
|
|
130
|
-
(event: 'main-filter', value: string): void
|
|
131
|
-
}>()
|
|
132
|
-
|
|
133
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
134
|
-
const { $store } = useNuxtApp()
|
|
135
|
-
|
|
136
|
-
const isInitDatastoreNameValidation = ref<boolean>(false)
|
|
137
|
-
const initValidation = (onlyBlur: boolean): void => {
|
|
138
|
-
onlyBlur && (isInitDatastoreNameValidation.value = true)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const nameErrorText = computed<string>(() => {
|
|
142
|
-
if (props.messagesFields?.datastoreName?.field && !model.value.name) {
|
|
143
|
-
return props.messagesFields.datastoreName.field
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
if (!isInitDatastoreNameValidation.value) return ''
|
|
147
|
-
return !model.value.name ? localization.value.common.specifyDatastoreName : ''
|
|
148
|
-
})
|
|
149
|
-
|
|
150
|
-
const defaultDataId = ref<string>('device-selection-alert-error')
|
|
151
|
-
const errorAlertDataId = computed<string>(() => {
|
|
152
|
-
if (!props.alertMessages?.length) return
|
|
153
|
-
|
|
154
|
-
return !model.value.lunDisk.length
|
|
155
|
-
? `${defaultDataId.value}-not-selected-lundisk`
|
|
156
|
-
: validateNameAndGenerateDataId(
|
|
157
|
-
model.value.name,
|
|
158
|
-
props.alertMessages[0],
|
|
159
|
-
defaultDataId.value
|
|
160
|
-
)
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
const alertInfo = ref<boolean>(true)
|
|
164
|
-
const onHideAlertInfo = (): void => {
|
|
165
|
-
alertInfo.value = false
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/* Lun disk table */
|
|
169
|
-
|
|
170
|
-
const pagination = ref<UI_I_Pagination>({
|
|
171
|
-
page: 1,
|
|
172
|
-
pageSize: 35,
|
|
173
|
-
})
|
|
174
|
-
const sort = ref<string | null>(null)
|
|
175
|
-
|
|
176
|
-
const updatePagination = (event: UI_I_Pagination): void => {
|
|
177
|
-
pagination.value = event
|
|
178
|
-
}
|
|
179
|
-
const sortTable = (event: string): void => {
|
|
180
|
-
sort.value = event
|
|
181
|
-
initLunDisksDataTable()
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const loading = computed<boolean>(() =>
|
|
185
|
-
$store.getters['storage/getLoading']('datastoreHosts')
|
|
186
|
-
)
|
|
187
|
-
const dataTable = computed<API_UI_I_DataTable<
|
|
188
|
-
UI_I_CreateStorageLunDiskItem[]
|
|
189
|
-
> | null>(() => {
|
|
190
|
-
return $store.getters['storage/getNewDatastoreHosts']
|
|
191
|
-
})
|
|
192
|
-
|
|
193
|
-
/* Select host */
|
|
194
|
-
const hostOptions = computed<UI_I_SelectHostOptions[]>(() =>
|
|
195
|
-
hostsOptionsFunc(localization.value, props.hosts?.items)
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
const onSelectHost = (): void => {
|
|
199
|
-
if (props.datastoreType !== 'shared-storm') return // TODO рефакторинг ( удалить проверку )
|
|
200
|
-
|
|
201
|
-
initLunDisksForSphere(model.value.hosts[0])
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const initLunDisksForSphere = async (host: string): Promise<void> => {
|
|
205
|
-
await $store.dispatch('storage/A_GET_DISKS_LIST', {
|
|
206
|
-
host,
|
|
207
|
-
...pagination.value,
|
|
208
|
-
sortBy: sort.value,
|
|
209
|
-
} as UI_I_LunDiskSpherePayload)
|
|
210
|
-
}
|
|
211
|
-
if (props.hostId) {
|
|
212
|
-
initLunDisksForSphere(props.hostId)
|
|
213
|
-
}
|
|
214
|
-
const initLunDisksDataTable = async (): Promise<void> => {
|
|
215
|
-
await $store.dispatch('storage/A_GET_LUN_DISK_LIST', {
|
|
216
|
-
...pagination.value,
|
|
217
|
-
sortBy: sort.value,
|
|
218
|
-
} as UI_I_DataTableQuery)
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if (props.project === 'procurator') {
|
|
222
|
-
// && props.stepId === 2
|
|
223
|
-
initLunDisksDataTable()
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const onHideAlert = (): void => {
|
|
227
|
-
emits('hide-alert', props.stepId)
|
|
228
|
-
}
|
|
229
|
-
</script>
|
|
230
|
-
|
|
231
|
-
<style lang="scss" scoped>
|
|
232
|
-
.device-selection-step {
|
|
233
|
-
display: flex;
|
|
234
|
-
flex-direction: column;
|
|
235
|
-
height: inherit;
|
|
236
|
-
overflow-y: auto;
|
|
237
|
-
overflow-x: hidden;
|
|
238
|
-
&__alert-info {
|
|
239
|
-
:deep(.alert-text) {
|
|
240
|
-
font-size: 11px;
|
|
241
|
-
letter-spacing: normal;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
.dropdown-toggle {
|
|
245
|
-
min-width: 160px;
|
|
246
|
-
}
|
|
247
|
-
.clr-form-control {
|
|
248
|
-
display: flex;
|
|
249
|
-
flex-direction: row;
|
|
250
|
-
|
|
251
|
-
.clr-control-container {
|
|
252
|
-
min-height: 48px;
|
|
253
|
-
&.clr-error {
|
|
254
|
-
.clr-subtext,
|
|
255
|
-
.error-icon {
|
|
256
|
-
display: block;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
.clr-subtext,
|
|
260
|
-
.error-icon {
|
|
261
|
-
display: none;
|
|
262
|
-
}
|
|
263
|
-
.error-icon {
|
|
264
|
-
fill: #db2100;
|
|
265
|
-
width: 24px;
|
|
266
|
-
height: 24px;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
&__disk-list {
|
|
271
|
-
display: flex;
|
|
272
|
-
flex-direction: column;
|
|
273
|
-
height: 100%;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
</style>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import { UI_I_SelectHostOptions } from '~/components/common/wizards/datastore/add/sharedStorm/deviceSelection/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
const constructHostListFunc = (
|
|
5
|
-
data: { host: string; id: string }[]
|
|
6
|
-
): UI_I_SelectHostOptions[] => {
|
|
7
|
-
return data.map((item) => ({
|
|
8
|
-
text: item.host,
|
|
9
|
-
value: item.id,
|
|
10
|
-
disabled: false,
|
|
11
|
-
}))
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const hostsOptionsFunc = (
|
|
15
|
-
localization: UI_I_Localization,
|
|
16
|
-
hosts: { host: string; id: string }[] | undefined
|
|
17
|
-
): UI_I_SelectHostOptions[] => {
|
|
18
|
-
if (!hosts) return []
|
|
19
|
-
|
|
20
|
-
const data = constructHostListFunc(hosts)
|
|
21
|
-
|
|
22
|
-
return [{ text: localization.common.selectHost, value: '', disabled: true }, ...data]
|
|
23
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { UI_I_DataTableQuery } from '~/lib/models/table/interfaces'
|
|
2
|
-
|
|
3
|
-
export interface UI_I_LunDiskSpherePayload extends UI_I_DataTableQuery {
|
|
4
|
-
host: string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface UI_I_LunDisk {
|
|
8
|
-
name: string
|
|
9
|
-
capacity: string
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface UI_I_SelectHostOptions {
|
|
13
|
-
text: string
|
|
14
|
-
value: string
|
|
15
|
-
disabled?: boolean
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface UI_I_CreateStorageLunDiskItem {
|
|
19
|
-
name: string
|
|
20
|
-
identifier: string
|
|
21
|
-
lun: number
|
|
22
|
-
capacity_mb: string
|
|
23
|
-
hardware_acceleration: string
|
|
24
|
-
drive_type: string
|
|
25
|
-
sector_format: string
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface API_UI_I_DatastoreLunDiskItem {
|
|
29
|
-
id: string
|
|
30
|
-
adapter: string
|
|
31
|
-
capacity_mb: string
|
|
32
|
-
datastore: {
|
|
33
|
-
name: string
|
|
34
|
-
type: string
|
|
35
|
-
}
|
|
36
|
-
drive_type: string
|
|
37
|
-
hardware_acceleration: string
|
|
38
|
-
identifier: string
|
|
39
|
-
lun: number
|
|
40
|
-
name: string
|
|
41
|
-
operational_state: string
|
|
42
|
-
owner: string
|
|
43
|
-
perennially_reserved: string
|
|
44
|
-
physical_location: string
|
|
45
|
-
sector_format: string
|
|
46
|
-
transport: string
|
|
47
|
-
type: string
|
|
48
|
-
}
|
package/components/common/wizards/datastoreNew/add/sharedStorm/deviceSelection/lib/models/types.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type T_DatastoreTableItemsTuple = ['name', 'type_ds', 'description']
|