bfg-common 1.4.113 → 1.4.114
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/assets/scss/common/icons/icons-5.scss +28 -4
- package/components/common/layout/theHeader/TheHeaderNew.vue +12 -2
- package/components/common/layout/theHeader/ThemeSwitch.vue +8 -1
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +8 -2
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +7 -1
- package/components/common/select/input/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +4 -3
- package/package.json +2 -2
- package/components/common/wizards/vmNew/common/computeResource/TreeView.vue +0 -61
- package/components/common/wizards/vmNew/common/tooltip/Tooltip.vue +0 -84
- package/components/common/wizards/vmNew/common/validation/compatibility/Compatibility.vue +0 -62
- package/components/common/wizards/vmNew/common/validation/lib/models/enums.ts +0 -5
- package/components/common/wizards/vmNew/migrate/Migrate.vue +0 -235
- package/components/common/wizards/vmNew/migrate/lib/config/constructDataReady.ts +0 -100
- package/components/common/wizards/vmNew/migrate/lib/config/steps.ts +0 -82
- package/components/common/wizards/vmNew/migrate/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/lib/models/interfaces.ts +0 -32
- package/components/common/wizards/vmNew/migrate/lib/utils.ts +0 -0
- package/components/common/wizards/vmNew/migrate/lib/validations.ts +0 -29
- package/components/common/wizards/vmNew/migrate/select/computeResource/ComputeResource.vue +0 -219
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/config/tabsPannel.ts +0 -28
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/interfaces.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/types.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/TableView.vue +0 -143
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/clusterTable.ts +0 -113
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/hostTable.ts +0 -124
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/resourcePoolTable.ts +0 -115
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/tableKeys.ts +0 -65
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/vappsTable.ts +0 -66
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/interfaces.ts +0 -50
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/types.ts +0 -60
- package/components/common/wizards/vmNew/migrate/select/network/Network.vue +0 -125
- package/components/common/wizards/vmNew/migrate/select/network/table/network/Network.vue +0 -114
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/advancedTable.ts +0 -78
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/basicTable.ts +0 -70
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/interfaces.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/UseAt.vue +0 -54
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/tableKeys.ts +0 -7
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/useAtTable.ts +0 -47
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/types.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/priority/Priority.vue +0 -39
- package/components/common/wizards/vmNew/migrate/select/priority/lib/config/typeOptions.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/priority/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/storage/Storage.vue +0 -206
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/Batch.vue +0 -58
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/config/virtualDiskFormat.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/Table.vue +0 -118
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/config/datastoreTable.ts +0 -177
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/models/types.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/Disk.vue +0 -68
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/Table.vue +0 -74
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/diskTable.ts +0 -135
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces.ts +0 -24
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/types.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/storage/lib/config/tabsPannel.ts +0 -20
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/interfaces.ts +0 -14
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/types.ts +0 -9
- package/components/common/wizards/vmNew/migrate/select/storage/policy/Policy.vue +0 -84
- package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +0 -88
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/config/tabsPannel.ts +0 -18
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/New.vue +0 -294
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/config/defaultForm.ts +0 -36
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/models/interfaces.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/targetServer/saved/Saved.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/targetServer/targetServer.vue +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/Type.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/type/lib/config/typeOptions.ts +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/interfaces.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/types.ts +0 -5
package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/Table.vue
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="table-wrap">
|
|
3
|
-
<atoms-table-data-grid
|
|
4
|
-
v-model:selected-row="selectedStorageKeyLocal"
|
|
5
|
-
v-model:column-keys="columnKeys"
|
|
6
|
-
v-model:page-size="pagination.pageSize"
|
|
7
|
-
v-model:page="pagination.page"
|
|
8
|
-
type="radio"
|
|
9
|
-
test-id="datastore-table"
|
|
10
|
-
:head-items="headItems"
|
|
11
|
-
:body-items="bodyItems"
|
|
12
|
-
:total-items="bodyItems.length"
|
|
13
|
-
:total-pages="1"
|
|
14
|
-
server-off
|
|
15
|
-
hide-page-size
|
|
16
|
-
@sorting="sorting"
|
|
17
|
-
@change="selectStorageFromTable"
|
|
18
|
-
>
|
|
19
|
-
<template #icon="{ item }">
|
|
20
|
-
<span :class="['datagrid-cell-icon', item.data]" />
|
|
21
|
-
<span class="text-ellipsis">
|
|
22
|
-
{{ item.text }}
|
|
23
|
-
</span>
|
|
24
|
-
</template>
|
|
25
|
-
</atoms-table-data-grid>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script lang="ts" setup>
|
|
30
|
-
import type {
|
|
31
|
-
UI_I_ColumnKey,
|
|
32
|
-
UI_I_HeadItem,
|
|
33
|
-
UI_I_BodyItem,
|
|
34
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
35
|
-
import type {
|
|
36
|
-
UI_I_TablePayload,
|
|
37
|
-
UI_I_Pagination,
|
|
38
|
-
} from '~/lib/models/table/interfaces'
|
|
39
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
40
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
41
|
-
import * as table from '~/components/common/wizards/vm/migrate/select/storage/table/datastore/lib/config/config'
|
|
42
|
-
|
|
43
|
-
const props = defineProps<{
|
|
44
|
-
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
45
|
-
datastore: UI_I_DatastoreTableItem[]
|
|
46
|
-
connectedStorageId: string | null
|
|
47
|
-
}>()
|
|
48
|
-
const modelStorageLocal = defineModel<UI_I_DatastoreTableItem>({
|
|
49
|
-
required: true,
|
|
50
|
-
})
|
|
51
|
-
|
|
52
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
53
|
-
|
|
54
|
-
const selectedStorageKeyLocal = ref<number | null>(null)
|
|
55
|
-
const sort = ref<string | null>(null)
|
|
56
|
-
const pagination = ref<UI_I_Pagination>({
|
|
57
|
-
page: 1,
|
|
58
|
-
pageSize: 100,
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
const headItems = ref<UI_I_HeadItem[]>(table.headItems(localization.value))
|
|
62
|
-
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
63
|
-
watch(localization, () => {
|
|
64
|
-
columnKeys.value = table.columnKeys(localization.value)
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
68
|
-
return table.bodyItems(props.datastore || [], localization.value)
|
|
69
|
-
})
|
|
70
|
-
const sorting = (data: [string, boolean]): void => {
|
|
71
|
-
const [column, status] = data
|
|
72
|
-
const direction = status ? 'asc' : 'desc'
|
|
73
|
-
sort.value = `${column}.${direction}`
|
|
74
|
-
|
|
75
|
-
InitStorageData()
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const InitStorageData = async (): Promise<void> => {
|
|
79
|
-
const payload: UI_I_TablePayload = {
|
|
80
|
-
pagination: pagination.value,
|
|
81
|
-
sortBy: sort.value,
|
|
82
|
-
type: 'datastore',
|
|
83
|
-
schema: 'full',
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
props.getDatastoreTableFunc(payload).then(() => {
|
|
87
|
-
// selectedStorageKeyLocal.value = null
|
|
88
|
-
// defineDefaultSelectedStorage()
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
InitStorageData()
|
|
92
|
-
|
|
93
|
-
const selectStorageFromTable = (index: number): void => {
|
|
94
|
-
if (!props.datastore) return
|
|
95
|
-
|
|
96
|
-
modelStorageLocal.value = props.datastore[index]
|
|
97
|
-
selectedStorageKeyLocal.value = index
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const defineDefaultSelectedStorage = (): void => {
|
|
101
|
-
props.datastore.forEach(
|
|
102
|
-
(datastore: UI_I_DatastoreTableItem, index: number) => {
|
|
103
|
-
if (datastore.id === props.connectedStorageId)
|
|
104
|
-
selectStorageFromTable(index)
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
watch(
|
|
110
|
-
() => props.connectedStorageId,
|
|
111
|
-
(newValue: string) => {
|
|
112
|
-
if (!props.datastore.length || !newValue) return
|
|
113
|
-
defineDefaultSelectedStorage()
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
</script>
|
|
117
|
-
|
|
118
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
2
|
-
import type {
|
|
3
|
-
UI_I_ColumnKey,
|
|
4
|
-
UI_I_HeadItem,
|
|
5
|
-
UI_I_BodyItem,
|
|
6
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
7
|
-
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
8
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
9
|
-
import type { UI_T_DatastoreTableItemsTuple } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/models/types'
|
|
10
|
-
import {
|
|
11
|
-
datastoreIconByState,
|
|
12
|
-
datastoreLocalizationByState,
|
|
13
|
-
} from '~/components/common/lib/config/states'
|
|
14
|
-
|
|
15
|
-
export const datastoreTableKeys: UI_T_DatastoreTableItemsTuple = [
|
|
16
|
-
'name',
|
|
17
|
-
'state',
|
|
18
|
-
'capacity_mb',
|
|
19
|
-
'provisioned_mb',
|
|
20
|
-
'free_mb',
|
|
21
|
-
'used_mb',
|
|
22
|
-
'type_text',
|
|
23
|
-
'thin_provisioning',
|
|
24
|
-
'access_mode',
|
|
25
|
-
'hardware_acceleration',
|
|
26
|
-
'drive_type',
|
|
27
|
-
'device',
|
|
28
|
-
'storage_io_control',
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
const getItems = (
|
|
32
|
-
localization: UI_I_Localization
|
|
33
|
-
): [string, boolean, string, string][] => {
|
|
34
|
-
return [
|
|
35
|
-
[localization.common.name, true, '96px', datastoreTableKeys[0]],
|
|
36
|
-
[localization.inventorySummary.state, true, '138px', datastoreTableKeys[1]],
|
|
37
|
-
[localization.common.capacity, true, '110px', datastoreTableKeys[2]],
|
|
38
|
-
[localization.common.provisioned, true, '128px', datastoreTableKeys[3]],
|
|
39
|
-
[localization.common.free, true, '110px', datastoreTableKeys[4]],
|
|
40
|
-
[localization.common.used, true, '110px', datastoreTableKeys[5]],
|
|
41
|
-
[localization.common.type, true, '110px', datastoreTableKeys[6]],
|
|
42
|
-
[
|
|
43
|
-
localization.common.thinProvisioning,
|
|
44
|
-
true,
|
|
45
|
-
'132px',
|
|
46
|
-
datastoreTableKeys[7],
|
|
47
|
-
],
|
|
48
|
-
[localization.common.access, true, '110px', datastoreTableKeys[8]],
|
|
49
|
-
[
|
|
50
|
-
localization.common.hardwareAcceleration,
|
|
51
|
-
true,
|
|
52
|
-
'134px',
|
|
53
|
-
datastoreTableKeys[9],
|
|
54
|
-
],
|
|
55
|
-
[localization.common.driverType, true, '110px', datastoreTableKeys[10]],
|
|
56
|
-
[localization.common.device, true, '110px', datastoreTableKeys[11]],
|
|
57
|
-
[
|
|
58
|
-
localization.common.storageIoControl,
|
|
59
|
-
true,
|
|
60
|
-
'110px',
|
|
61
|
-
datastoreTableKeys[12],
|
|
62
|
-
],
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export const columnKeys = (
|
|
67
|
-
localization: UI_I_Localization
|
|
68
|
-
): UI_I_ColumnKey[] => {
|
|
69
|
-
return defaultSettings.defaultColumnKeys(getItems(localization), {
|
|
70
|
-
icon: [0],
|
|
71
|
-
})
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
75
|
-
return defaultSettings.defaultHeadItems(getItems(localization), {
|
|
76
|
-
icon: [0],
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export const bodyItems = (
|
|
81
|
-
data: UI_I_DatastoreTableItem[],
|
|
82
|
-
localization: UI_I_Localization
|
|
83
|
-
): UI_I_BodyItem[][] => {
|
|
84
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
85
|
-
const { $binary }: any = useNuxtApp()
|
|
86
|
-
|
|
87
|
-
data.forEach((storage: UI_I_DatastoreTableItem, key: number) => {
|
|
88
|
-
const state =
|
|
89
|
-
localization.common[
|
|
90
|
-
datastoreLocalizationByState[storage[datastoreTableKeys[1]]]
|
|
91
|
-
]
|
|
92
|
-
bodyItems.push([
|
|
93
|
-
{
|
|
94
|
-
key: 'icon',
|
|
95
|
-
text: storage[datastoreTableKeys[0]],
|
|
96
|
-
data: `vsphere-icon-${datastoreIconByState[storage.state]}`,
|
|
97
|
-
id: key,
|
|
98
|
-
testId: storage[datastoreTableKeys[0]],
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
key: 'col1',
|
|
102
|
-
text: state,
|
|
103
|
-
id: key,
|
|
104
|
-
testId: storage[datastoreTableKeys[0]],
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
key: 'col2',
|
|
108
|
-
text: $binary.round(storage.capacity[datastoreTableKeys[2]]),
|
|
109
|
-
id: key,
|
|
110
|
-
testId: storage[datastoreTableKeys[0]],
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
key: 'col3',
|
|
114
|
-
text: $binary.round(storage.capacity[datastoreTableKeys[3]]),
|
|
115
|
-
id: key,
|
|
116
|
-
testId: storage[datastoreTableKeys[0]],
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
key: 'col4',
|
|
120
|
-
text: $binary.round(storage.capacity[datastoreTableKeys[4]]),
|
|
121
|
-
id: key,
|
|
122
|
-
testId: storage[datastoreTableKeys[0]],
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
key: 'col5',
|
|
126
|
-
text: $binary.round(storage.capacity[datastoreTableKeys[5]]),
|
|
127
|
-
id: key,
|
|
128
|
-
testId: storage[datastoreTableKeys[0]],
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
key: 'col6',
|
|
132
|
-
text: storage[datastoreTableKeys[6]],
|
|
133
|
-
id: key,
|
|
134
|
-
testId: storage[datastoreTableKeys[0]],
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
key: 'col7',
|
|
138
|
-
text: storage[datastoreTableKeys[7]]
|
|
139
|
-
? localization.common.yes
|
|
140
|
-
: localization.common.no,
|
|
141
|
-
id: key,
|
|
142
|
-
testId: storage[datastoreTableKeys[0]],
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
key: 'col8',
|
|
146
|
-
text: storage[datastoreTableKeys[8]],
|
|
147
|
-
id: key,
|
|
148
|
-
testId: storage[datastoreTableKeys[0]],
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
key: 'col9',
|
|
152
|
-
text: storage[datastoreTableKeys[9]],
|
|
153
|
-
id: key,
|
|
154
|
-
testId: storage[datastoreTableKeys[0]],
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
key: 'col10',
|
|
158
|
-
text: storage[datastoreTableKeys[10]],
|
|
159
|
-
id: key,
|
|
160
|
-
testId: storage[datastoreTableKeys[0]],
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
key: 'col11',
|
|
164
|
-
text: storage[datastoreTableKeys[11]],
|
|
165
|
-
id: key,
|
|
166
|
-
testId: storage[datastoreTableKeys[0]],
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
key: 'col12',
|
|
170
|
-
text: storage[datastoreTableKeys[12]],
|
|
171
|
-
id: key,
|
|
172
|
-
testId: storage[datastoreTableKeys[0]],
|
|
173
|
-
},
|
|
174
|
-
])
|
|
175
|
-
})
|
|
176
|
-
return bodyItems
|
|
177
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type UI_T_DatastoreTableItemsTuple = [
|
|
2
|
-
'name',
|
|
3
|
-
'state',
|
|
4
|
-
'capacity_mb',
|
|
5
|
-
'provisioned_mb',
|
|
6
|
-
'free_mb',
|
|
7
|
-
'used_mb',
|
|
8
|
-
'type_text',
|
|
9
|
-
'thin_provisioning',
|
|
10
|
-
'access_mode',
|
|
11
|
-
'hardware_acceleration',
|
|
12
|
-
'drive_type',
|
|
13
|
-
'device',
|
|
14
|
-
'storage_io_control'
|
|
15
|
-
]
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="migrate-configure-disk">
|
|
3
|
-
<div class="btn-group">
|
|
4
|
-
<button
|
|
5
|
-
id="vm-migrate-configure"
|
|
6
|
-
data-id="vm-migrate-configure-button"
|
|
7
|
-
class="btn btn-link btn-sm"
|
|
8
|
-
:disabled="!selectedDisksFromTable.length"
|
|
9
|
-
@click="onConfigure"
|
|
10
|
-
>
|
|
11
|
-
{{ localization.inventoryTabs.configure }}
|
|
12
|
-
</button>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<common-wizards-vm-new-migrate-select-storage-configure-disk-table
|
|
16
|
-
v-model="selectedPerDiskKeysLocal"
|
|
17
|
-
:configure-per-disks="props.configurePerDisks"
|
|
18
|
-
/>
|
|
19
|
-
</div>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script lang="ts" setup>
|
|
23
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
24
|
-
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
25
|
-
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
26
|
-
|
|
27
|
-
const props = defineProps<{
|
|
28
|
-
configurePerDisks: UI_I_StorageConfigurePerDiskItem[]
|
|
29
|
-
}>()
|
|
30
|
-
const modelShowSelectedPerDisk = defineModel<boolean>({ required: true })
|
|
31
|
-
const modelActiveTab = defineModel<UI_T_VmMigrateSelectStorageTab>('activeTab')
|
|
32
|
-
const selectedPerDiskKeysLocal = defineModel<number[]>('selectedPerDiskKeys', {
|
|
33
|
-
required: true,
|
|
34
|
-
})
|
|
35
|
-
const emits = defineEmits<{
|
|
36
|
-
(
|
|
37
|
-
event: 'update-selected-per-disks',
|
|
38
|
-
value: UI_I_StorageConfigurePerDiskItem[]
|
|
39
|
-
): void
|
|
40
|
-
}>()
|
|
41
|
-
|
|
42
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
43
|
-
|
|
44
|
-
const selectedDisksFromTable = computed<UI_I_StorageConfigurePerDiskItem[]>(
|
|
45
|
-
() => {
|
|
46
|
-
if (!props.configurePerDisks) return []
|
|
47
|
-
|
|
48
|
-
return props.configurePerDisks.filter((_: never, key: number) =>
|
|
49
|
-
selectedPerDiskKeysLocal.value.includes(key)
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
const onConfigure = (): void => {
|
|
55
|
-
emits('update-selected-per-disks', selectedDisksFromTable.value)
|
|
56
|
-
modelShowSelectedPerDisk.value = true
|
|
57
|
-
modelActiveTab.value = 'batch-configure'
|
|
58
|
-
}
|
|
59
|
-
</script>
|
|
60
|
-
|
|
61
|
-
<style lang="scss" scoped>
|
|
62
|
-
@import 'assets/scss/common/mixins.scss';
|
|
63
|
-
.migrate-configure-disk {
|
|
64
|
-
@include flex($dir: column);
|
|
65
|
-
height: inherit;
|
|
66
|
-
margin-top: 10px;
|
|
67
|
-
}
|
|
68
|
-
</style>
|
package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/Table.vue
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="data-table-view">
|
|
3
|
-
<atoms-table-data-grid
|
|
4
|
-
v-model:selected-row="selectedPerDiskKeysLocal"
|
|
5
|
-
v-model:column-keys="columnKeys"
|
|
6
|
-
v-model:page-size="pagination.pageSize"
|
|
7
|
-
v-model:page="pagination.page"
|
|
8
|
-
type="checkbox"
|
|
9
|
-
class="data-table"
|
|
10
|
-
test-id="disk-table"
|
|
11
|
-
:head-items="headItems"
|
|
12
|
-
:body-items="bodyItems"
|
|
13
|
-
:total-items="bodyItems.length"
|
|
14
|
-
:total-pages="1"
|
|
15
|
-
server-off
|
|
16
|
-
hide-page-size
|
|
17
|
-
@sorting="sorting"
|
|
18
|
-
>
|
|
19
|
-
</atoms-table-data-grid>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script lang="ts" setup>
|
|
24
|
-
import type {
|
|
25
|
-
UI_I_ColumnKey,
|
|
26
|
-
UI_I_HeadItem,
|
|
27
|
-
UI_I_BodyItem,
|
|
28
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
29
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
30
|
-
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
31
|
-
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
32
|
-
import * as table from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/diskTable'
|
|
33
|
-
|
|
34
|
-
const props = defineProps<{
|
|
35
|
-
configurePerDisks: UI_I_StorageConfigurePerDiskItem[]
|
|
36
|
-
}>()
|
|
37
|
-
const selectedPerDiskKeysLocal = defineModel<number[]>()
|
|
38
|
-
|
|
39
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
40
|
-
|
|
41
|
-
const headItems = ref<UI_I_HeadItem[]>(table.headItems(localization.value))
|
|
42
|
-
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
43
|
-
watch(localization, () => {
|
|
44
|
-
columnKeys.value = table.columnKeys(localization.value)
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
48
|
-
return table.bodyItems(props.configurePerDisks)
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
const sort = ref<string | null>(null)
|
|
52
|
-
const pagination = ref<UI_I_Pagination>({
|
|
53
|
-
page: 1,
|
|
54
|
-
pageSize: 100,
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
const sorting = (data: [string, boolean]): void => {
|
|
58
|
-
const [column, status] = data
|
|
59
|
-
const direction = status ? 'asc' : 'desc'
|
|
60
|
-
sort.value = `${column}.${direction}`
|
|
61
|
-
}
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<style lang="scss" scoped>
|
|
65
|
-
.data-table-view {
|
|
66
|
-
height: inherit;
|
|
67
|
-
.data-table {
|
|
68
|
-
height: inherit;
|
|
69
|
-
:deep(.datagrid-outer-wrapper) {
|
|
70
|
-
height: inherit;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_ColumnKey,
|
|
3
|
-
UI_I_HeadItem,
|
|
4
|
-
UI_I_BodyItem,
|
|
5
|
-
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
6
|
-
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
7
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
8
|
-
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces'
|
|
9
|
-
import { UI_E_SelectStorageDiskFormat } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/enums'
|
|
10
|
-
import { vmMigrateDiskTableItemKeys } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/config/tableKeys'
|
|
11
|
-
const getItems = (
|
|
12
|
-
localization: UI_I_Localization
|
|
13
|
-
): [string, boolean, string, string][] => {
|
|
14
|
-
return [
|
|
15
|
-
[
|
|
16
|
-
localization.common.virtualMachine,
|
|
17
|
-
true,
|
|
18
|
-
'200px',
|
|
19
|
-
vmMigrateDiskTableItemKeys[0],
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
localization.common.diskGroup,
|
|
23
|
-
false,
|
|
24
|
-
'138px',
|
|
25
|
-
vmMigrateDiskTableItemKeys[1],
|
|
26
|
-
],
|
|
27
|
-
[localization.common.file, true, '180px', vmMigrateDiskTableItemKeys[2]],
|
|
28
|
-
[localization.common.storage, true, '120px', vmMigrateDiskTableItemKeys[3]],
|
|
29
|
-
[
|
|
30
|
-
localization.common.diskFormat,
|
|
31
|
-
true,
|
|
32
|
-
'180px',
|
|
33
|
-
vmMigrateDiskTableItemKeys[4],
|
|
34
|
-
],
|
|
35
|
-
[localization.common.sharing, true, '120px', vmMigrateDiskTableItemKeys[5]],
|
|
36
|
-
[localization.common.target, true, '120px', vmMigrateDiskTableItemKeys[6]],
|
|
37
|
-
[localization.common.cache, true, '120px', vmMigrateDiskTableItemKeys[7]],
|
|
38
|
-
[
|
|
39
|
-
localization.common.ioControl,
|
|
40
|
-
true,
|
|
41
|
-
'120px',
|
|
42
|
-
vmMigrateDiskTableItemKeys[8],
|
|
43
|
-
],
|
|
44
|
-
[localization.common.discard, true, '120px', vmMigrateDiskTableItemKeys[9]],
|
|
45
|
-
[
|
|
46
|
-
localization.common.diskMode,
|
|
47
|
-
true,
|
|
48
|
-
'180px',
|
|
49
|
-
vmMigrateDiskTableItemKeys[10],
|
|
50
|
-
],
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export const columnKeys = (
|
|
55
|
-
localization: UI_I_Localization
|
|
56
|
-
): UI_I_ColumnKey[] => {
|
|
57
|
-
return defaultSettings.defaultColumnKeys(getItems(localization))
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
61
|
-
return defaultSettings.defaultHeadItems(getItems(localization))
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export const bodyItems = (
|
|
65
|
-
data: UI_I_StorageConfigurePerDiskItem[]
|
|
66
|
-
): UI_I_BodyItem[][] => {
|
|
67
|
-
const bodyItems: UI_I_BodyItem[][] = []
|
|
68
|
-
|
|
69
|
-
data.forEach((storage: UI_I_StorageConfigurePerDiskItem, key: number) => {
|
|
70
|
-
const diskFormat =
|
|
71
|
-
key === 0
|
|
72
|
-
? 'N/A'
|
|
73
|
-
: UI_E_SelectStorageDiskFormat[storage[vmMigrateDiskTableItemKeys[4]]]
|
|
74
|
-
|
|
75
|
-
bodyItems.push([
|
|
76
|
-
{
|
|
77
|
-
key: 'col0',
|
|
78
|
-
text: storage[vmMigrateDiskTableItemKeys[0]],
|
|
79
|
-
id: key,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
key: 'col1',
|
|
83
|
-
text: storage[vmMigrateDiskTableItemKeys[1]],
|
|
84
|
-
id: key,
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
key: 'col2',
|
|
88
|
-
text: storage[vmMigrateDiskTableItemKeys[2]],
|
|
89
|
-
id: key,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
key: 'col3',
|
|
93
|
-
text: storage[vmMigrateDiskTableItemKeys[3]],
|
|
94
|
-
id: key,
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
key: 'col4',
|
|
98
|
-
text: diskFormat,
|
|
99
|
-
id: key,
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
key: 'col5',
|
|
103
|
-
text: storage.extra[vmMigrateDiskTableItemKeys[5]],
|
|
104
|
-
id: key,
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
{
|
|
108
|
-
key: 'col6',
|
|
109
|
-
text: storage.extra[vmMigrateDiskTableItemKeys[6]],
|
|
110
|
-
id: key,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
key: 'col7',
|
|
114
|
-
text: storage.extra[vmMigrateDiskTableItemKeys[7]],
|
|
115
|
-
id: key,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
key: 'col8',
|
|
119
|
-
text: storage.extra[vmMigrateDiskTableItemKeys[8]],
|
|
120
|
-
id: key,
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
key: 'col9',
|
|
124
|
-
text: storage.extra[vmMigrateDiskTableItemKeys[9]],
|
|
125
|
-
id: key,
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
key: 'col10',
|
|
129
|
-
text: storage.extra[vmMigrateDiskTableItemKeys[10]],
|
|
130
|
-
id: key,
|
|
131
|
-
},
|
|
132
|
-
])
|
|
133
|
-
})
|
|
134
|
-
return bodyItems
|
|
135
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { UI_T_VmMigrateDiskTableTuple } from '~/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/types'
|
|
2
|
-
|
|
3
|
-
export const vmMigrateDiskTableItemKeys: UI_T_VmMigrateDiskTableTuple = [
|
|
4
|
-
'virtual_machine',
|
|
5
|
-
'disk_group',
|
|
6
|
-
'file',
|
|
7
|
-
'storage',
|
|
8
|
-
'disk_format',
|
|
9
|
-
'sharing',
|
|
10
|
-
'target',
|
|
11
|
-
'cache',
|
|
12
|
-
'io_control',
|
|
13
|
-
'discard',
|
|
14
|
-
'disk_mode',
|
|
15
|
-
]
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
interface API_UI_I_ExtraValuePerDiskItem {
|
|
2
|
-
cache: string
|
|
3
|
-
datastore_id: string
|
|
4
|
-
discard: string
|
|
5
|
-
disk_mode: string
|
|
6
|
-
disk_size: number
|
|
7
|
-
disk_source: string
|
|
8
|
-
io_control: string
|
|
9
|
-
read_only: string
|
|
10
|
-
sharing: string
|
|
11
|
-
target: string
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface API_UI_I_StorageConfigurePerDiskItem {
|
|
15
|
-
disk_format: 0 | 1 | 2 | 3
|
|
16
|
-
disk_group: string
|
|
17
|
-
file: string
|
|
18
|
-
storage: string
|
|
19
|
-
virtual_machine: string
|
|
20
|
-
extra: API_UI_I_ExtraValuePerDiskItem
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface UI_I_StorageConfigurePerDiskItem
|
|
24
|
-
extends API_UI_I_StorageConfigurePerDiskItem {}
|
|
@@ -1,20 +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
|
-
export const vmMigrateSelectStorageTabsFunc = (
|
|
4
|
-
localization: UI_I_Localization
|
|
5
|
-
): UI_I_CollapseNavItem[] => {
|
|
6
|
-
return [
|
|
7
|
-
{
|
|
8
|
-
text: localization.common.batchConfigure,
|
|
9
|
-
value: 'batch-configure',
|
|
10
|
-
disabled: false,
|
|
11
|
-
testId: 'batch-configure'
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
text: localization.common.configurePerDisk,
|
|
15
|
-
value: 'configure-disk',
|
|
16
|
-
disabled: false,
|
|
17
|
-
testId: 'configure-disk'
|
|
18
|
-
},
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
2
|
-
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/lib/models/interfaces'
|
|
3
|
-
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
4
|
-
|
|
5
|
-
export interface UI_I_SelectStorageDataLocal {
|
|
6
|
-
vmDiskFormat: 0 | 1 | 2 | 3
|
|
7
|
-
storage: UI_I_DatastoreTableItem | null
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface UI_I_SelectStorageReadyData
|
|
11
|
-
extends UI_I_SelectStorageDataLocal {
|
|
12
|
-
tab: UI_T_VmMigrateSelectStorageTab
|
|
13
|
-
configureDisks: UI_I_StorageConfigurePerDiskItem[]
|
|
14
|
-
}
|