bfg-common 1.2.160 → 1.2.162
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/localization/local_be.json +3 -1
- package/assets/localization/local_en.json +3 -1
- package/assets/localization/local_hy.json +3 -1
- package/assets/localization/local_kk.json +3 -1
- package/assets/localization/local_ru.json +3 -1
- package/assets/localization/local_zh.json +3 -1
- package/components/common/monitor/advanced/GraphView.vue +10 -8
- package/components/common/monitor/advanced/models/interfaces.ts +1 -0
- package/components/common/monitor/advanced/models/types.ts +1 -1
- package/components/common/monitor/advanced/tools/Tools.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +5 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +6 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +1 -1
- package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +1 -0
- package/components/common/wizards/vm/migrate/Migrate.vue +6 -2
- package/components/common/wizards/vm/migrate/models/interfaces.ts +3 -0
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +65 -7
- package/components/common/wizards/vm/migrate/select/computeResource/models/enums.ts +6 -0
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/TableView.vue +52 -21
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/config/hostTable.ts +14 -31
- package/components/common/wizards/vm/migrate/select/priority/config/typeOptions.ts +2 -2
- package/components/common/wizards/vm/migrate/select/priority/models/types.ts +1 -1
- package/package.json +1 -1
|
@@ -2122,5 +2122,7 @@
|
|
|
2122
2122
|
"saveVCenterServerAddress": "Захаваць адрас сервера vCenter",
|
|
2123
2123
|
"discard": "Адкідаць",
|
|
2124
2124
|
"ioControl": "Io Control",
|
|
2125
|
-
"selectValidDestinationComputeResource": "Выберыце сапраўдны вылічальны рэсурс прызначэння."
|
|
2125
|
+
"selectValidDestinationComputeResource": "Выберыце сапраўдны вылічальны рэсурс прызначэння.",
|
|
2126
|
+
"vMotionPriority": "Прыярытэт vMotion",
|
|
2127
|
+
"noNetworkReassignments": "Няма перапрызначэння сеткі"
|
|
2126
2128
|
}
|
|
@@ -2125,5 +2125,7 @@
|
|
|
2125
2125
|
"saveVCenterServerAddress": "Save vCenter Server address",
|
|
2126
2126
|
"discard": "Discard",
|
|
2127
2127
|
"ioControl": "Io Control",
|
|
2128
|
-
"selectValidDestinationComputeResource": "Select a valid destination compute resource."
|
|
2128
|
+
"selectValidDestinationComputeResource": "Select a valid destination compute resource.",
|
|
2129
|
+
"vMotionPriority": "vMotion Priority",
|
|
2130
|
+
"noNetworkReassignments": "No network reassignments"
|
|
2129
2131
|
}
|
|
@@ -2125,5 +2125,7 @@
|
|
|
2125
2125
|
"saveVCenterServerAddress": "Պահպանեք vCenter սերվերի հասցեն",
|
|
2126
2126
|
"discard": "Հրաժարվել",
|
|
2127
2127
|
"ioControl": "Io Control",
|
|
2128
|
-
"selectValidDestinationComputeResource": "Ընտրեք վավեր նպատակակետ հաշվարկային ռեսուրս:"
|
|
2128
|
+
"selectValidDestinationComputeResource": "Ընտրեք վավեր նպատակակետ հաշվարկային ռեսուրս:",
|
|
2129
|
+
"vMotionPriority": "vMotion Priority",
|
|
2130
|
+
"noNetworkReassignments": "Ցանցի վերաբաշխումներ չկան"
|
|
2129
2131
|
}
|
|
@@ -2125,5 +2125,7 @@
|
|
|
2125
2125
|
"saveVCenterServerAddress": "vCenter серверінің мекенжайын сақтаңыз",
|
|
2126
2126
|
"discard": "Жою",
|
|
2127
2127
|
"ioControl": "Io басқару",
|
|
2128
|
-
"selectValidDestinationComputeResource": "Жарамды тағайындалған есептеу ресурсын таңдаңыз."
|
|
2128
|
+
"selectValidDestinationComputeResource": "Жарамды тағайындалған есептеу ресурсын таңдаңыз.",
|
|
2129
|
+
"vMotionPriority": "vMotion басымдылығы",
|
|
2130
|
+
"noNetworkReassignments": "Желіні қайта тағайындау жоқ"
|
|
2129
2131
|
}
|
|
@@ -2125,5 +2125,7 @@
|
|
|
2125
2125
|
"saveVCenterServerAddress": "Сохранить адрес сервера vCenter",
|
|
2126
2126
|
"discard": "Отказаться",
|
|
2127
2127
|
"ioControl": "Ио-контроль",
|
|
2128
|
-
"selectValidDestinationComputeResource": "Выберите допустимый целевой вычислительный ресурс."
|
|
2128
|
+
"selectValidDestinationComputeResource": "Выберите допустимый целевой вычислительный ресурс.",
|
|
2129
|
+
"vMotionPriority": "Приоритет vMotion",
|
|
2130
|
+
"noNetworkReassignments": "Никаких переназначений сети"
|
|
2129
2131
|
}
|
|
@@ -2125,5 +2125,7 @@
|
|
|
2125
2125
|
"saveVCenterServerAddress": "保存 vCenter Server 地址",
|
|
2126
2126
|
"discard": "丢弃",
|
|
2127
2127
|
"ioControl": "IO控制",
|
|
2128
|
-
"selectValidDestinationComputeResource": "选择有效的目标计算资源。"
|
|
2128
|
+
"selectValidDestinationComputeResource": "选择有效的目标计算资源。",
|
|
2129
|
+
"vMotionPriority": "vMotion 优先级",
|
|
2130
|
+
"noNetworkReassignments": "无需重新分配网络"
|
|
2129
2131
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script setup lang="ts">
|
|
20
|
-
import { useElementSize } from '@vueuse/core'
|
|
20
|
+
import { useDebounceFn, useElementSize } from '@vueuse/core'
|
|
21
21
|
import { format } from 'date-fns'
|
|
22
22
|
import { UI_I_Localization } from '~/models/interfaces'
|
|
23
23
|
import { graphDataFunc } from 'bfg-nuxt-3-graph/graph/utils/renderGraph'
|
|
@@ -66,8 +66,11 @@ watch(
|
|
|
66
66
|
|
|
67
67
|
let dateFormat = ''
|
|
68
68
|
|
|
69
|
-
const
|
|
70
|
-
|
|
69
|
+
const chartsView = ref(null)
|
|
70
|
+
const { width } = useElementSize(chartsView)
|
|
71
|
+
|
|
72
|
+
const startChart = useDebounceFn(() => {
|
|
73
|
+
if (!props.data || !width.value) return
|
|
71
74
|
|
|
72
75
|
chartData.value = graphDataFunc(
|
|
73
76
|
props.data,
|
|
@@ -79,7 +82,7 @@ const startChart = (): void => {
|
|
|
79
82
|
false,
|
|
80
83
|
props.selectedChartType,
|
|
81
84
|
'',
|
|
82
|
-
|
|
85
|
+
Math.floor(width.value),
|
|
83
86
|
chartCallback,
|
|
84
87
|
props.formattedDatetime,
|
|
85
88
|
format,
|
|
@@ -87,7 +90,7 @@ const startChart = (): void => {
|
|
|
87
90
|
)
|
|
88
91
|
|
|
89
92
|
chartHelper.value++
|
|
90
|
-
}
|
|
93
|
+
}, 1000)
|
|
91
94
|
|
|
92
95
|
watch(
|
|
93
96
|
() => props.data,
|
|
@@ -125,10 +128,9 @@ watch(
|
|
|
125
128
|
{ immediate: true }
|
|
126
129
|
)
|
|
127
130
|
|
|
128
|
-
const chartsView = ref(null)
|
|
129
|
-
const { width } = useElementSize(chartsView)
|
|
130
|
-
|
|
131
131
|
watch(width, (newValue) => {
|
|
132
|
+
if (newValue) startChart()
|
|
133
|
+
|
|
132
134
|
if (!chart.value?.isResizing) return
|
|
133
135
|
|
|
134
136
|
chart.value.setSize(1, chart.chartHeight)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type UI_T_AdvancedType = 'datacenter' | 'host' | 'vm'
|
|
1
|
+
export type UI_T_AdvancedType = 'cluster' | 'datacenter' | 'host' | 'vm'
|
|
@@ -206,7 +206,7 @@ watch(
|
|
|
206
206
|
optionsNames.value.includes(selectedView.value)
|
|
207
207
|
)
|
|
208
208
|
currentValue = selectedView.value
|
|
209
|
-
else currentValue = selectedView.value || viewOptions.value[0]
|
|
209
|
+
else currentValue = selectedView.value || viewOptions.value[0]?.value
|
|
210
210
|
|
|
211
211
|
selectedView.value = currentValue
|
|
212
212
|
},
|
|
@@ -109,7 +109,7 @@ const loading = ref<boolean>(false)
|
|
|
109
109
|
const selectStorageSubmit = ref<number>(0)
|
|
110
110
|
const selectComputeResourceSubmit = ref<number>(0)
|
|
111
111
|
|
|
112
|
-
const selectedVMotionPriority = ref<UI_T_SelectVMotionPriority>('high
|
|
112
|
+
const selectedVMotionPriority = ref<UI_T_SelectVMotionPriority>('high')
|
|
113
113
|
|
|
114
114
|
const vmMigrateType = ref<UI_T_VmMigrateType>(
|
|
115
115
|
props.project === 'procurator' ? 'storage' : 'resource'
|
|
@@ -128,10 +128,14 @@ const connectedStorageIdOnVm = computed<string>(
|
|
|
128
128
|
)
|
|
129
129
|
|
|
130
130
|
const dataFormLocal = ref<UI_I_CollectedDataFormLocal>({
|
|
131
|
+
selectedComputeResource: null,
|
|
131
132
|
selectStorage: null,
|
|
133
|
+
selectedVMotionPriority: 'high'
|
|
132
134
|
})
|
|
133
135
|
|
|
134
|
-
const onSelectComputeResourceAndNext = (
|
|
136
|
+
const onSelectComputeResourceAndNext = (event: any): void => {
|
|
137
|
+
dataFormLocal.value.selectedComputeResource = event
|
|
138
|
+
|
|
135
139
|
onNextStep(true)
|
|
136
140
|
}
|
|
137
141
|
const onSelectStorageAndNext = (event: UI_I_SelectStorageReadyData): void => {
|
|
@@ -3,6 +3,7 @@ import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/models/in
|
|
|
3
3
|
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/models/types'
|
|
4
4
|
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/models/types'
|
|
5
5
|
import type { UI_I_SelectStorageReadyData } from '~/components/common/wizards/vm/migrate/select/storage/models/interfaces'
|
|
6
|
+
import type { UI_T_SelectVMotionPriority } from '~/components/common/wizards/vm/migrate/select/priority/models/types'
|
|
6
7
|
import type { UI_T_Project } from '~/models/types'
|
|
7
8
|
export interface UI_I_MigrateVerticalStepItem extends UI_I_VerticalStepItem {
|
|
8
9
|
id: string
|
|
@@ -16,5 +17,7 @@ export interface UI_I_MigrateReadyBlockData extends UI_I_TableInfoItem {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export interface UI_I_CollectedDataFormLocal {
|
|
20
|
+
selectedComputeResource: any
|
|
19
21
|
selectStorage: UI_I_SelectStorageReadyData
|
|
22
|
+
selectedVMotionPriority: UI_T_SelectVMotionPriority
|
|
20
23
|
}
|
|
@@ -30,9 +30,13 @@
|
|
|
30
30
|
/>
|
|
31
31
|
|
|
32
32
|
<common-wizards-vm-migrate-select-compute-resource-table-view
|
|
33
|
-
v-model:selected-data="
|
|
34
|
-
:data
|
|
33
|
+
v-model:selected-data="selectedTableDataKeys[activeTab]"
|
|
34
|
+
:get-compute-resource-data="props.getComputeResourceData"
|
|
35
|
+
:data-table="props.computeResourceData?.items || []"
|
|
36
|
+
:total-items="props.computeResourceData?.total_items || 0"
|
|
37
|
+
:total-pages="props.computeResourceData?.total_pages || 1"
|
|
35
38
|
:type="activeTab"
|
|
39
|
+
:loading="loading"
|
|
36
40
|
/>
|
|
37
41
|
</template>
|
|
38
42
|
|
|
@@ -45,16 +49,20 @@
|
|
|
45
49
|
</template>
|
|
46
50
|
|
|
47
51
|
<script lang="ts" setup>
|
|
48
|
-
import type { UI_I_Localization } from '~/models/interfaces'
|
|
52
|
+
import type { UI_I_Localization, UI_I_Pagination } from '~/models/interfaces'
|
|
49
53
|
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/models/interfaces'
|
|
50
54
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/models/interfaces'
|
|
55
|
+
import type { UI_I_TablePayload } from '~/models/store/interfaces'
|
|
51
56
|
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/models/types'
|
|
57
|
+
import type { UI_E_ComputeResourceTabKamelKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/models/enums'
|
|
52
58
|
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vm/migrate/models/types'
|
|
53
59
|
import { vmMigrateComputeResourceTabsFunc } from '~/components/common/wizards/vm/migrate/select/computeResource/config/tabsPannel'
|
|
54
60
|
|
|
55
61
|
const props = defineProps<{
|
|
56
62
|
submit: number
|
|
63
|
+
getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
|
|
57
64
|
migrateType: UI_T_VmMigrateType
|
|
65
|
+
computeResourceData: any
|
|
58
66
|
computeResourceTree: UI_I_TreeNode
|
|
59
67
|
}>()
|
|
60
68
|
const emits = defineEmits<{
|
|
@@ -71,10 +79,35 @@ const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
|
71
79
|
|
|
72
80
|
const computeResourceDataLocal = ref<any>({
|
|
73
81
|
selectedNode: null,
|
|
82
|
+
host: null,
|
|
83
|
+
cluster: null,
|
|
84
|
+
resourcePool: null,
|
|
85
|
+
vApps: null,
|
|
74
86
|
})
|
|
75
87
|
|
|
76
|
-
const
|
|
88
|
+
const selectedTableDataKeys = ref<any>({
|
|
89
|
+
host: null,
|
|
90
|
+
cluster: null,
|
|
91
|
+
'resource-pool': null,
|
|
92
|
+
'v-apps': null,
|
|
93
|
+
})
|
|
94
|
+
watch(
|
|
95
|
+
selectedTableDataKeys,
|
|
96
|
+
(newValue) => {
|
|
97
|
+
if (!props.computeResourceData?.items.length) return
|
|
98
|
+
|
|
99
|
+
const data = props.computeResourceData.items.find(
|
|
100
|
+
(_: never, key: number) => newValue[activeTab.value] === key
|
|
101
|
+
)
|
|
102
|
+
if (data) {
|
|
103
|
+
const dataKeys = UI_E_ComputeResourceTabKamelKeys[activeTab.value]
|
|
104
|
+
computeResourceDataLocal.value[dataKeys] = data
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{ immediate: true, deep: true }
|
|
108
|
+
)
|
|
77
109
|
|
|
110
|
+
const nodes = ref<UI_I_TreeNode[]>([])
|
|
78
111
|
watch(
|
|
79
112
|
props.computeResourceTree,
|
|
80
113
|
(newValue) => {
|
|
@@ -142,14 +175,39 @@ const onHideErrorMessageAlert = (): void => {
|
|
|
142
175
|
|
|
143
176
|
const selectedData = ref([])
|
|
144
177
|
|
|
178
|
+
const loading = ref<boolean>(false)
|
|
179
|
+
const sort = ref<string | null>(null)
|
|
180
|
+
const pagination = ref<UI_I_Pagination>({
|
|
181
|
+
page: 1,
|
|
182
|
+
pageSize: 100,
|
|
183
|
+
})
|
|
184
|
+
const getTableData = (): void => {
|
|
185
|
+
loading.value = true
|
|
186
|
+
|
|
187
|
+
const payload = {
|
|
188
|
+
pagination: pagination.value,
|
|
189
|
+
sortBy: sort.value,
|
|
190
|
+
type: 'hosts',
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
props.getComputeResourceData(payload).then(() => {
|
|
194
|
+
loading.value = false
|
|
195
|
+
})
|
|
196
|
+
}
|
|
145
197
|
const checkValidityBlock = (): boolean => {
|
|
146
|
-
|
|
198
|
+
const hasSelectedData = Object.values(computeResourceDataLocal.value).some(
|
|
199
|
+
(value) => value !== null
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
if (!hasSelectedData) {
|
|
147
203
|
const errorText = localization.value.selectValidDestinationComputeResource
|
|
148
|
-
|
|
204
|
+
|
|
149
205
|
errorMessages.value = [errorText]
|
|
150
206
|
return false
|
|
151
207
|
}
|
|
152
|
-
emits('next-step', {
|
|
208
|
+
emits('next-step', {
|
|
209
|
+
...computeResourceDataLocal.value,
|
|
210
|
+
})
|
|
153
211
|
return true
|
|
154
212
|
}
|
|
155
213
|
watch(
|
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="table-
|
|
2
|
+
<div class="data-table-view">
|
|
3
3
|
<atoms-table-data-grid
|
|
4
4
|
v-model:selected-row="selectedRow"
|
|
5
5
|
v-model:column-keys="columnKeys"
|
|
6
6
|
v-model:page-size="pagination.pageSize"
|
|
7
7
|
v-model:page="pagination.page"
|
|
8
|
-
type="checkbox"
|
|
9
8
|
:head-items="headItems"
|
|
10
9
|
:body-items="bodyItems"
|
|
11
|
-
:total-items="
|
|
12
|
-
:total-pages="
|
|
10
|
+
:total-items="props.totalItems"
|
|
11
|
+
:total-pages="props.totalPages"
|
|
12
|
+
:loading="props.loading"
|
|
13
|
+
class="data-table"
|
|
13
14
|
server-off
|
|
14
|
-
hide-footer
|
|
15
15
|
hide-page-size
|
|
16
|
-
|
|
16
|
+
hide-pagination
|
|
17
17
|
>
|
|
18
|
+
<template #icon="{ item }">
|
|
19
|
+
<span :class="['datagrid-cell-icon', item.data.iconClassName]" />
|
|
20
|
+
|
|
21
|
+
<span class="text-ellipsis">
|
|
22
|
+
{{ item.text }}
|
|
23
|
+
</span>
|
|
24
|
+
</template>
|
|
25
|
+
<template #progress="{ item }">
|
|
26
|
+
<div class="flex-align-center w-100">
|
|
27
|
+
<div class="progress flex-1">
|
|
28
|
+
<progress class="progress-block" :max="100" :value="item.data" />
|
|
29
|
+
</div>
|
|
30
|
+
<span class="text-ellipsis ml-1" :title="item.text">{{
|
|
31
|
+
item.text
|
|
32
|
+
}}</span>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
18
35
|
</atoms-table-data-grid>
|
|
19
36
|
</div>
|
|
20
37
|
</template>
|
|
@@ -26,20 +43,24 @@ import type {
|
|
|
26
43
|
UI_I_HeadItem,
|
|
27
44
|
UI_I_BodyItem,
|
|
28
45
|
} from '~/components/atoms/table/dataGrid/models/interfaces'
|
|
29
|
-
import type { UI_I_StorageConfigurePerDiskItem } from '~/components/common/wizards/vm/migrate/select/storage/table/disk/models/interfaces'
|
|
30
46
|
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/select/storage/models/types'
|
|
47
|
+
import type { UI_I_TablePayload } from '~/models/store/interfaces'
|
|
31
48
|
import * as hostTable from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/config/hostTable'
|
|
32
49
|
import * as clusterTable from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/config/clusterTable'
|
|
33
50
|
import * as resourcePoolTable from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/config/resourcePoolTable'
|
|
34
51
|
import * as vAppsTable from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/config/vappsTable'
|
|
35
52
|
|
|
36
53
|
const props = defineProps<{
|
|
37
|
-
|
|
38
|
-
|
|
54
|
+
getComputeResourceData: (payload: UI_I_TablePayload) => Promise<void>
|
|
55
|
+
selectedData: number
|
|
56
|
+
dataTable: any
|
|
57
|
+
totalItems: number
|
|
58
|
+
totalPages: number
|
|
39
59
|
type: UI_T_SelectComputeResourceTabType
|
|
60
|
+
loading: boolean
|
|
40
61
|
}>()
|
|
41
62
|
const emits = defineEmits<{
|
|
42
|
-
(event: 'update:selected-data', value: number
|
|
63
|
+
(event: 'update:selected-data', value: number): void
|
|
43
64
|
}>()
|
|
44
65
|
|
|
45
66
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -62,29 +83,39 @@ watch(localization, () => {
|
|
|
62
83
|
})
|
|
63
84
|
|
|
64
85
|
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
65
|
-
return table[props.type].bodyItems(props.dataTable)
|
|
86
|
+
return table[props.type].bodyItems(props.dataTable, localization.value)
|
|
66
87
|
})
|
|
67
88
|
|
|
68
|
-
const sort = ref<string | null>(null)
|
|
69
89
|
const pagination = ref<UI_I_Pagination>({
|
|
70
90
|
page: 1,
|
|
71
91
|
pageSize: 100,
|
|
72
92
|
})
|
|
73
93
|
|
|
74
|
-
const
|
|
75
|
-
const [column, status] = data
|
|
76
|
-
const direction = status ? 'asc' : 'desc'
|
|
77
|
-
sort.value = `${column}.${direction}`
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const selectedRow = computed<number[]>({
|
|
94
|
+
const selectedRow = computed<number>({
|
|
81
95
|
get() {
|
|
82
96
|
return props.selectedData
|
|
83
97
|
},
|
|
84
|
-
set(newValue: number
|
|
98
|
+
set(newValue: number) {
|
|
85
99
|
emits('update:selected-data', newValue)
|
|
86
100
|
},
|
|
87
101
|
})
|
|
88
102
|
</script>
|
|
89
103
|
|
|
90
|
-
<style lang="scss" scoped
|
|
104
|
+
<style lang="scss" scoped>
|
|
105
|
+
@import 'assets/scss/common/mixins.scss';
|
|
106
|
+
.data-table-view {
|
|
107
|
+
@include flex($dir: column);
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
height: inherit;
|
|
110
|
+
max-height: 250px;
|
|
111
|
+
.data-table {
|
|
112
|
+
@include flex($dir: column);
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
overflow: hidden;
|
|
115
|
+
height: inherit;
|
|
116
|
+
:deep(.datagrid-outer-wrapper) {
|
|
117
|
+
height: inherit;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
</style>
|
package/components/common/wizards/vm/migrate/select/computeResource/tableView/config/hostTable.ts
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
} from '~/components/common/config/states'
|
|
15
15
|
// import type { I_TableIconColumnData } from '~/components/templates/inventory/mainBlock/tablesView/models/interfaces'
|
|
16
16
|
// import type { API_I_HostTableItem } from '~/models/store/inventory/host/interfaces'
|
|
17
|
-
import { E_StatusEnum } from '~/components/templates/inventory/treeView/models/enums'
|
|
18
17
|
import { hostTableItemKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/config/tableKeys'
|
|
19
18
|
|
|
20
19
|
const getItems = (
|
|
@@ -24,7 +23,7 @@ const getItems = (
|
|
|
24
23
|
[localization.name, true, '180px', hostTableItemKeys[0]],
|
|
25
24
|
[localization.state, true, '96px', hostTableItemKeys[1]],
|
|
26
25
|
[localization.cluster, true, '180px', hostTableItemKeys[2]],
|
|
27
|
-
[localization.faultDomain,
|
|
26
|
+
[localization.faultDomain, false, '180px', hostTableItemKeys[3]],
|
|
28
27
|
[`${localization.consumedCpu} %`, true, '180px', hostTableItemKeys[4]],
|
|
29
28
|
[`${localization.consumedMemory} %`, true, '180px', hostTableItemKeys[5]],
|
|
30
29
|
[localization.haState, true, '180px', hostTableItemKeys[6]],
|
|
@@ -48,8 +47,7 @@ export const columnKeys = (
|
|
|
48
47
|
): UI_I_ColumnKey[] => {
|
|
49
48
|
const result: UI_I_ColumnKey[] = []
|
|
50
49
|
getItems(localization).forEach((item, i) => {
|
|
51
|
-
const col =
|
|
52
|
-
i === 0 ? 'icon' : i === 5 || i === 6 ? 'progress' : `col${i + 1}`
|
|
50
|
+
const col = i === 0 ? 'icon' : i === 4 || i === 5 ? 'progress' : `col${i}`
|
|
53
51
|
result.push(constructColumnKey(col, item[0], item[1]))
|
|
54
52
|
})
|
|
55
53
|
return result
|
|
@@ -58,8 +56,7 @@ export const columnKeys = (
|
|
|
58
56
|
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
59
57
|
const result: UI_I_HeadItem[] = []
|
|
60
58
|
getItems(localization).forEach((item, i) => {
|
|
61
|
-
const col =
|
|
62
|
-
i === 0 ? 'icon' : i === 5 || i === 6 ? 'progress' : `col${i + 1}`
|
|
59
|
+
const col = i === 0 ? 'icon' : i === 4 || i === 5 ? 'progress' : `col${i}`
|
|
63
60
|
result.push(constructHeadItem(col, item[0], item[3], false, item[2]))
|
|
64
61
|
})
|
|
65
62
|
return result
|
|
@@ -73,23 +70,10 @@ export const bodyItems = (
|
|
|
73
70
|
|
|
74
71
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
75
72
|
data.forEach((host, key) => {
|
|
76
|
-
const hostData
|
|
73
|
+
const hostData = {
|
|
77
74
|
iconClassName: `vsphere-icon-${hostIconByState[host.state]}`,
|
|
78
|
-
name: host.name,
|
|
79
|
-
// @ts-ignore TODO id надо для перехода, пока что так оставить чтобы нигде не ломалось потом поправить для всех
|
|
80
|
-
id: host.name,
|
|
81
|
-
nav: 'h',
|
|
82
|
-
type: 'host',
|
|
83
|
-
isLink: true,
|
|
84
75
|
}
|
|
85
76
|
|
|
86
|
-
const clusterData: any = {
|
|
87
|
-
iconClassName: E_StatusEnum.cluster_Normal,
|
|
88
|
-
name: host.cluster,
|
|
89
|
-
nav: 'h',
|
|
90
|
-
type: 'cluster',
|
|
91
|
-
isLink: true,
|
|
92
|
-
}
|
|
93
77
|
bodyItems.push([
|
|
94
78
|
{
|
|
95
79
|
key: 'icon',
|
|
@@ -98,17 +82,16 @@ export const bodyItems = (
|
|
|
98
82
|
id: key,
|
|
99
83
|
},
|
|
100
84
|
{
|
|
101
|
-
key: '
|
|
85
|
+
key: 'col1',
|
|
102
86
|
text: localization[hostLocalizationByState[host[hostTableItemKeys[1]]]],
|
|
103
87
|
id: key,
|
|
104
88
|
},
|
|
105
89
|
{
|
|
106
|
-
key: '
|
|
90
|
+
key: 'col2',
|
|
107
91
|
text: host[hostTableItemKeys[2]],
|
|
108
|
-
data: clusterData,
|
|
109
92
|
id: key,
|
|
110
93
|
},
|
|
111
|
-
{ key: '
|
|
94
|
+
{ key: 'col3', text: host[hostTableItemKeys[3]], id: key },
|
|
112
95
|
{
|
|
113
96
|
key: 'progress',
|
|
114
97
|
text: `${host[hostTableItemKeys[4]].toFixed(2)}%`,
|
|
@@ -121,19 +104,19 @@ export const bodyItems = (
|
|
|
121
104
|
data: host[hostTableItemKeys[5]],
|
|
122
105
|
id: key,
|
|
123
106
|
},
|
|
124
|
-
{ key: '
|
|
125
|
-
{ key: '
|
|
126
|
-
{ key: '
|
|
107
|
+
{ key: 'col6', text: host[hostTableItemKeys[6]], id: key },
|
|
108
|
+
{ key: 'col7', text: host[hostTableItemKeys[7]], id: key },
|
|
109
|
+
{ key: 'col8', text: host[hostTableItemKeys[8]], id: key },
|
|
127
110
|
{
|
|
128
|
-
key: '
|
|
111
|
+
key: 'col9',
|
|
129
112
|
text: `${$number.format(host[hostTableItemKeys[9]], 'en')} ${
|
|
130
113
|
localization.mb
|
|
131
114
|
}`,
|
|
132
115
|
id: key,
|
|
133
116
|
},
|
|
134
|
-
{ key: '
|
|
135
|
-
{ key: '
|
|
136
|
-
{ key: '
|
|
117
|
+
{ key: 'col10', text: host[hostTableItemKeys[10]], id: key },
|
|
118
|
+
{ key: 'col11', text: host[hostTableItemKeys[11]], id: key },
|
|
119
|
+
{ key: 'col12', text: host[hostTableItemKeys[12]], id: key },
|
|
137
120
|
{ key: 'col14', text: host[hostTableItemKeys[13]], id: key },
|
|
138
121
|
])
|
|
139
122
|
})
|
|
@@ -7,13 +7,13 @@ export const vmMigrateSelectPriorityTypesFunc = (
|
|
|
7
7
|
return [
|
|
8
8
|
{
|
|
9
9
|
label: localization.scheduleVMotionWithHighPriority,
|
|
10
|
-
value: 'high
|
|
10
|
+
value: 'high',
|
|
11
11
|
disabled: false,
|
|
12
12
|
description: localization.scheduleVMotionWithHighPriorityDesc,
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
label: localization.scheduleNormalVMotion,
|
|
16
|
-
value: '
|
|
16
|
+
value: 'normal',
|
|
17
17
|
disabled: false,
|
|
18
18
|
description: localization.scheduleNormalVMotionDesc,
|
|
19
19
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type UI_T_SelectVMotionPriority = 'high
|
|
1
|
+
export type UI_T_SelectVMotionPriority = 'high' | 'normal'
|