bfg-common 1.6.7 → 1.6.8
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 +1 -2
- package/assets/localization/local_en.json +1 -2
- package/assets/localization/local_hy.json +1 -2
- package/assets/localization/local_kk.json +1 -2
- package/assets/localization/local_ru.json +2 -3
- package/assets/localization/local_zh.json +1 -2
- package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +3 -1
- package/components/common/monitor/lib/utils/local_be.json +3 -1
- package/components/common/monitor/lib/utils/local_en.json +3 -1
- package/components/common/monitor/lib/utils/local_hy.json +3 -1
- package/components/common/monitor/lib/utils/local_kk.json +3 -1
- package/components/common/monitor/lib/utils/local_ru.json +3 -1
- package/components/common/monitor/lib/utils/local_zh.json +3 -1
- package/components/common/monitor/utilization/infoBlock/Old.vue +1 -1
- package/components/common/pages/scheduledTasks/table/new/New.vue +12 -10
- package/components/common/pages/tasks/table/Table.vue +24 -22
- package/components/common/vm/actions/consolidate/New.vue +1 -1
- package/components/common/vm/actions/consolidate/Old.vue +2 -2
- package/components/common/vm/actions/register/New.vue +55 -27
- package/components/common/vm/actions/register/lib/config/steps.ts +1 -1
- package/components/common/vm/actions/rename/New.vue +1 -11
- package/components/common/vm/actions/rename/Rename.vue +0 -6
- package/components/common/vm/snapshots/lib/models/types.ts +0 -1
- package/components/common/vm/snapshots/modals/confirm/New.vue +1 -2
- package/components/common/vm/snapshots/modals/confirm/Old.vue +1 -1
- package/components/common/vm/snapshots/modals/confirm/lib/models/enums.ts +0 -2
- package/components/common/vm/snapshots/modals/lib/config/modalTexts.ts +0 -1
- package/components/common/wizards/common/steps/name/New.vue +50 -31
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +31 -13
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +340 -0
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +3 -1
- package/package.json +1 -1
|
@@ -3492,8 +3492,7 @@
|
|
|
3492
3492
|
"takeSnapshot": "Зрабіце здымак",
|
|
3493
3493
|
"newSnapshot": "Новы здымак",
|
|
3494
3494
|
"editSnapshot": "Рэдагаваць здымак",
|
|
3495
|
-
"revertLatestSnapshot": "Вярнуцца да апошняга здымка"
|
|
3496
|
-
"consolidateSnapshots": "Кансолідаваць здымкі"
|
|
3495
|
+
"revertLatestSnapshot": "Вярнуцца да апошняга здымка"
|
|
3497
3496
|
},
|
|
3498
3497
|
"importVms": {
|
|
3499
3498
|
"selectSourceTooltipDesc": "Правы карыстальніка esxi павінны адпавядаць ролях Administrator, крэдыт прымаюцца ад esxi і vSphere",
|
|
@@ -3496,8 +3496,7 @@
|
|
|
3496
3496
|
"takeSnapshot": "Take Snapshot",
|
|
3497
3497
|
"newSnapshot": "New Snapshot",
|
|
3498
3498
|
"editSnapshot": "Edit snapshot",
|
|
3499
|
-
"revertLatestSnapshot": "Revert to Latest Snapshot"
|
|
3500
|
-
"consolidateSnapshots": "Consolidate Snapshots"
|
|
3499
|
+
"revertLatestSnapshot": "Revert to Latest Snapshot"
|
|
3501
3500
|
},
|
|
3502
3501
|
"importVms": {
|
|
3503
3502
|
"selectSourceTooltipDesc": "No Trusted infrastructure Administrator, credits are accepted from esxi and vSphere",
|
|
@@ -3496,8 +3496,7 @@
|
|
|
3496
3496
|
"takeSnapshot": "Ակնթարթ նկար",
|
|
3497
3497
|
"newSnapshot": "Նոր սքրինշոթ",
|
|
3498
3498
|
"editSnapshot": "Խմբագրել սքրինշոթը",
|
|
3499
|
-
"revertLatestSnapshot": "Վերադառնալ վերջին նկարին"
|
|
3500
|
-
"consolidateSnapshots": "Միավորել լուսանկարները"
|
|
3499
|
+
"revertLatestSnapshot": "Վերադառնալ վերջին նկարին"
|
|
3501
3500
|
},
|
|
3502
3501
|
"importVms": {
|
|
3503
3502
|
"selectSourceTooltipDesc": "Esxi օգտագործողի իրավունքները պետք է համապատասխանեն Administrator-ի դերերին, կրեդիտներն ընդունվում են esxi-ից և vSphere-ից",
|
|
@@ -3495,8 +3495,7 @@
|
|
|
3495
3495
|
"takeSnapshot": "сурет",
|
|
3496
3496
|
"newSnapshot": "Жаңа снимок",
|
|
3497
3497
|
"editSnapshot": "Снимокты өңдеу",
|
|
3498
|
-
"revertLatestSnapshot": "Варнузза және түтіннің тұманы"
|
|
3499
|
-
"consolidateSnapshots": "Суреттерді біріктіру"
|
|
3498
|
+
"revertLatestSnapshot": "Варнузза және түтіннің тұманы"
|
|
3500
3499
|
},
|
|
3501
3500
|
"importVms": {
|
|
3502
3501
|
"selectSourceTooltipDesc": "Esxi пайдаланушы құқықтары әкімші рөлдеріне сәйкес келуі керек, несиелер esxi және vSphere - ден алынады",
|
|
@@ -3495,8 +3495,7 @@
|
|
|
3495
3495
|
"takeSnapshot": "Сделать снимок",
|
|
3496
3496
|
"newSnapshot": "Новый снимок",
|
|
3497
3497
|
"editSnapshot": "Редактировать снимок",
|
|
3498
|
-
"revertLatestSnapshot": "Вернуться к последнему снимку"
|
|
3499
|
-
"consolidateSnapshots": "Консолидация снимков"
|
|
3498
|
+
"revertLatestSnapshot": "Вернуться к последнему снимку"
|
|
3500
3499
|
},
|
|
3501
3500
|
"importVms": {
|
|
3502
3501
|
"selectSourceTooltipDesc": "Права пользователя vmware дожны соответствовать ролям Administrator, креды принимаются от esxi и vSphere",
|
|
@@ -4088,7 +4087,7 @@
|
|
|
4088
4087
|
"makeSureSelectHeartbeatDatastoreSeeDetails": "Убедитесь, что выбрали datastore для heartbeat, чтобы увидеть подробности."
|
|
4089
4088
|
},
|
|
4090
4089
|
"registerVm": {
|
|
4091
|
-
"register": "
|
|
4090
|
+
"register": "Зарегистрировать",
|
|
4092
4091
|
"lastCreateSubtitle": "Проверьте данные перед регистрацией виртуальной машины.",
|
|
4093
4092
|
"registerVmSelectFile": "Зарегистрировать ВМ — Выбор файла",
|
|
4094
4093
|
"nameAlreadyExistsDescription": "Запись с таким именем уже существует."
|
|
@@ -3493,8 +3493,7 @@
|
|
|
3493
3493
|
"takeSnapshot": "快照",
|
|
3494
3494
|
"newSnapshot": "新快照",
|
|
3495
3495
|
"editSnapshot": "编辑快照",
|
|
3496
|
-
"revertLatestSnapshot": "回到上一张照片"
|
|
3497
|
-
"consolidateSnapshots": "合并快照"
|
|
3496
|
+
"revertLatestSnapshot": "回到上一张照片"
|
|
3498
3497
|
},
|
|
3499
3498
|
"importVms": {
|
|
3500
3499
|
"selectSourceTooltipDesc": "Esxi用户权限必须对应于管理员角色. esxi和vSphere接受积分",
|
|
@@ -143,7 +143,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
143
143
|
&.pinned {
|
|
144
144
|
.nav-context {
|
|
145
145
|
position: relative;
|
|
146
|
-
z-index: calc(var(--z-
|
|
146
|
+
z-index: calc(var(--z-fixed) + 2);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
&:not(.pinned) {
|
|
@@ -177,6 +177,8 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
&:not(.collapsed) {
|
|
180
|
+
min-width: 240px;
|
|
181
|
+
|
|
180
182
|
:deep(.tooltip-container-hover) {
|
|
181
183
|
display: none;
|
|
182
184
|
}
|
|
@@ -684,5 +684,7 @@
|
|
|
684
684
|
"multicastTx": "Перададзеныя multicast",
|
|
685
685
|
"multicastTxDesc": "Колькасць перададзеных multicast пакетаў",
|
|
686
686
|
"multicastRx": "Атрыманыя multicast",
|
|
687
|
-
"multicastRxDesc": "Колькасць атрыманых multicast пакетаў"
|
|
687
|
+
"multicastRxDesc": "Колькасць атрыманых multicast пакетаў",
|
|
688
|
+
"memSharedcommon": "Выкарыстанне агульнай памяці",
|
|
689
|
+
"memSharedcommonDesc": "Аб'ём памяці, якая падзяляецца паміж працэсамі (выкарыстанне агульнага сегмента агульнай памяці)"
|
|
688
690
|
}
|
|
@@ -684,5 +684,7 @@
|
|
|
684
684
|
"multicastTx": "Multicast transmitted",
|
|
685
685
|
"multicastTxDesc": "Number of multicast packets transmitted",
|
|
686
686
|
"multicastRx": "Multicast received",
|
|
687
|
-
"multicastRxDesc": "Number of multicast packets received"
|
|
687
|
+
"multicastRxDesc": "Number of multicast packets received",
|
|
688
|
+
"memSharedcommon": "Shared Memory Usage",
|
|
689
|
+
"memSharedcommonDesc": "Amount of memory shared between processes (common shared memory segment usage)"
|
|
688
690
|
}
|
|
@@ -684,5 +684,7 @@
|
|
|
684
684
|
"multicastTx": "Փոխանցված multicast",
|
|
685
685
|
"multicastTxDesc": "Փոխանցված multicast փաթեթների քանակը",
|
|
686
686
|
"multicastRx": "Ստացված multicast",
|
|
687
|
-
"multicastRxDesc": "Ստացված multicast փաթեթների քանակը"
|
|
687
|
+
"multicastRxDesc": "Ստացված multicast փաթեթների քանակը",
|
|
688
|
+
"memSharedcommon": "Համօգտագործվող հիշողության օգտագործում",
|
|
689
|
+
"memSharedcommonDesc": "Պրոցեսների միջև համօգտագործվող հիշողության ծավալը (ընդհանուր համօգտագործվող հիշողության սեգմենտի օգտագործում)"
|
|
688
690
|
}
|
|
@@ -684,5 +684,7 @@
|
|
|
684
684
|
"multicastTx": "Жіберілген мультикаст",
|
|
685
685
|
"multicastTxDesc": "Жіберілген мультикаст пакеттерінің саны",
|
|
686
686
|
"multicastRx": "Қабылданған мультикаст",
|
|
687
|
-
"multicastRxDesc": "Қабылданған мультикаст пакеттерінің саны"
|
|
687
|
+
"multicastRxDesc": "Қабылданған мультикаст пакеттерінің саны",
|
|
688
|
+
"memSharedcommon": "Ортақ жадты пайдалану",
|
|
689
|
+
"memSharedcommonDesc": "Процестер арасында бөлісетін жад көлемі (ортақ бөлісетін жад сегментін пайдалану)"
|
|
688
690
|
}
|
|
@@ -684,5 +684,7 @@
|
|
|
684
684
|
"multicastTx": "Multicast отправлено",
|
|
685
685
|
"multicastTxDesc": "Количество отправленных групповых пакетов",
|
|
686
686
|
"multicastRx": "Multicast получено",
|
|
687
|
-
"multicastRxDesc": "Количество полученных групповых пакетов"
|
|
687
|
+
"multicastRxDesc": "Количество полученных групповых пакетов",
|
|
688
|
+
"memSharedcommon": "Использование разделяемой памяти",
|
|
689
|
+
"memSharedcommonDesc": "Объём памяти, совместно используемой процессами (общие сегменты разделяемой памяти)"
|
|
688
690
|
}
|
|
@@ -684,5 +684,7 @@
|
|
|
684
684
|
"multicastTx": "已发送组播",
|
|
685
685
|
"multicastTxDesc": "已发送的组播数据包数",
|
|
686
686
|
"multicastRx": "已接收组播",
|
|
687
|
-
"multicastRxDesc": "已接收的组播数据包数"
|
|
687
|
+
"multicastRxDesc": "已接收的组播数据包数",
|
|
688
|
+
"memSharedcommon": "共享内存使用情况",
|
|
689
|
+
"memSharedcommonDesc": "进程之间共享的内存量(公共共享内存段使用情况)"
|
|
688
690
|
}
|
|
@@ -82,16 +82,18 @@
|
|
|
82
82
|
<ui-icon name="vertical-dotes" width="20" height="20" />
|
|
83
83
|
</span>
|
|
84
84
|
</ui-button>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
<Teleport to="body">
|
|
86
|
+
<ui-dropdown
|
|
87
|
+
:show="actionsShowId === item.data.id"
|
|
88
|
+
:test-id="`event-table-action-dropdown-${item.data.id}`"
|
|
89
|
+
:items="schedulerDropActions"
|
|
90
|
+
:elem-id="`event-table-action-${item.data.id}`"
|
|
91
|
+
width="max-content"
|
|
92
|
+
left
|
|
93
|
+
@select="onSelectAction"
|
|
94
|
+
@hide="onHideActionsDropdown"
|
|
95
|
+
/>
|
|
96
|
+
</Teleport>
|
|
95
97
|
</div>
|
|
96
98
|
</template>
|
|
97
99
|
|
|
@@ -67,28 +67,30 @@
|
|
|
67
67
|
<ui-icon name="vertical-dotes" width="20" height="20" />
|
|
68
68
|
</span>
|
|
69
69
|
</ui-button>
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
70
|
+
<Teleport to="body">
|
|
71
|
+
<ui-dropdown
|
|
72
|
+
:show="actionsShowId === item.data.id"
|
|
73
|
+
:test-id="`data-table-task-dropdown-${item.data.id}`"
|
|
74
|
+
:items="actions"
|
|
75
|
+
:elem-id="`data-table-task-action-${item.data.id}`"
|
|
76
|
+
width="max-content"
|
|
77
|
+
left
|
|
78
|
+
@select="onSelectAction(item.data.target, $event)"
|
|
79
|
+
@hide="onHideActionsDropdown"
|
|
80
|
+
>
|
|
81
|
+
<template #row="{ item: dropMenu }">
|
|
82
|
+
<ui-icon
|
|
83
|
+
v-if="dropMenu.iconName === 'hide'"
|
|
84
|
+
name="password-hide"
|
|
85
|
+
width="16"
|
|
86
|
+
height="16"
|
|
87
|
+
/>
|
|
88
|
+
<span class="action-text">
|
|
89
|
+
{{ dropMenu.text }}
|
|
90
|
+
</span>
|
|
91
|
+
</template>
|
|
92
|
+
</ui-dropdown>
|
|
93
|
+
</Teleport>
|
|
92
94
|
</div>
|
|
93
95
|
</template>
|
|
94
96
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-modals-confirmation
|
|
3
|
-
:headline="localization.
|
|
3
|
+
:headline="localization.common.consolidateConfirmation"
|
|
4
4
|
:description="localization.common.consolidateConfirmationDesc"
|
|
5
5
|
:modal-texts="modalTexts"
|
|
6
6
|
@hide-modal="emits('hide-modal')"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-modals-confirmation
|
|
3
|
-
:headline="localization.
|
|
4
|
-
:description="localization.common.
|
|
3
|
+
:headline="localization.common.consolidate"
|
|
4
|
+
:description="localization.common.consolidateConfirmationDescOld"
|
|
5
5
|
@hide-modal="emits('hide-modal')"
|
|
6
6
|
@confirm="emits('confirm')"
|
|
7
7
|
/>
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
:sub-title-height="heightName"
|
|
22
22
|
>
|
|
23
23
|
<template #subTitle>
|
|
24
|
-
<div ref="subTitleBlockName"
|
|
25
|
-
<div
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
<div ref="subTitleBlockName">
|
|
25
|
+
<div class="subtitle-block">
|
|
26
|
+
<div
|
|
27
|
+
id="name-alert-wrapper"
|
|
28
|
+
:class="[{ 'mb-4': !isNameAlertWrapperEmpty }]"
|
|
29
|
+
></div>
|
|
30
|
+
<ui-wizard-subtitle :sub-title="currentSubtitleSelectNameBlock" />
|
|
31
|
+
</div>
|
|
30
32
|
</div>
|
|
31
33
|
</template>
|
|
32
34
|
<template #content>
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
"
|
|
52
54
|
:test-ids="props.nameTestIds"
|
|
53
55
|
:has-location="props.isSphere"
|
|
54
|
-
:location-nodes="
|
|
56
|
+
:location-nodes="localLocationNodes"
|
|
55
57
|
:allowed-location-kinds="props.allowedLocationKinds"
|
|
56
58
|
:location-description="props.locationDescription"
|
|
57
59
|
@submit="emits('change-name', $event)"
|
|
@@ -68,21 +70,23 @@
|
|
|
68
70
|
:sub-title-height="heightComputeResource"
|
|
69
71
|
>
|
|
70
72
|
<template #subTitle>
|
|
71
|
-
<div ref="computeResource"
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
.
|
|
84
|
-
|
|
85
|
-
|
|
73
|
+
<div ref="computeResource">
|
|
74
|
+
<div class="subtitle-block">
|
|
75
|
+
<ui-alert
|
|
76
|
+
v-if="props.computeResourceAlert.length"
|
|
77
|
+
:messages="props.computeResourceAlert"
|
|
78
|
+
test-id="computed-resource-alert"
|
|
79
|
+
type="error"
|
|
80
|
+
size="md"
|
|
81
|
+
class="subtitle-block__alert mb-4"
|
|
82
|
+
/>
|
|
83
|
+
<ui-wizard-subtitle
|
|
84
|
+
:sub-title="
|
|
85
|
+
localization.vmWizard
|
|
86
|
+
.selectDestinationComputeResourceForThisOperation
|
|
87
|
+
"
|
|
88
|
+
/>
|
|
89
|
+
</div>
|
|
86
90
|
</div>
|
|
87
91
|
</template>
|
|
88
92
|
<template #content>
|
|
@@ -115,10 +119,12 @@
|
|
|
115
119
|
</div>
|
|
116
120
|
</template>
|
|
117
121
|
<template #content>
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
<div class="register-vm-ready-to-complete-container">
|
|
123
|
+
<common-ready-to-complete
|
|
124
|
+
v-if="selectedStep.id === props.dynamicSteps.readyComplete"
|
|
125
|
+
:data="props.readyCompleteTableInfo"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
122
128
|
</template>
|
|
123
129
|
</ui-wizard-block>
|
|
124
130
|
</template>
|
|
@@ -213,6 +219,15 @@ const currentSubtitleSelectNameBlock = ref<string>(
|
|
|
213
219
|
|
|
214
220
|
const initialCompare = compare(vmForm)
|
|
215
221
|
const hasChanges = computed<boolean>(() => initialCompare.getDiff(vmForm.value))
|
|
222
|
+
|
|
223
|
+
const localLocationNodes = computed<UI_I_TreeNode[]>(() => {
|
|
224
|
+
const copyData = useDeepCopy(props.locationNodes)
|
|
225
|
+
if (copyData[0] && !copyData[0]?.nodes.length) {
|
|
226
|
+
copyData[0].hasNodes = true
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return copyData
|
|
230
|
+
})
|
|
216
231
|
</script>
|
|
217
232
|
|
|
218
233
|
<style>
|
|
@@ -234,10 +249,23 @@ const hasChanges = computed<boolean>(() => initialCompare.getDiff(vmForm.value))
|
|
|
234
249
|
border-color: var(--select-name-border-color);
|
|
235
250
|
}
|
|
236
251
|
.compute-resource-container {
|
|
237
|
-
padding-bottom:
|
|
252
|
+
padding-bottom: 16px;
|
|
238
253
|
|
|
254
|
+
:deep(.tree-content) {
|
|
255
|
+
padding: 8px !important;
|
|
256
|
+
}
|
|
239
257
|
:deep(.compatibility-wrap) {
|
|
240
258
|
margin-top: 24px;
|
|
241
259
|
}
|
|
242
260
|
}
|
|
261
|
+
.register-vm-ready-to-complete-container {
|
|
262
|
+
padding-bottom: 16px;
|
|
263
|
+
|
|
264
|
+
:deep(.details-list__col-right) {
|
|
265
|
+
align-items: flex-start;
|
|
266
|
+
}
|
|
267
|
+
:deep(.details-item-value) {
|
|
268
|
+
white-space: normal;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
243
271
|
</style>
|
|
@@ -72,7 +72,7 @@ export const stepsFunc = (
|
|
|
72
72
|
{
|
|
73
73
|
id: dynamicSteps.readyComplete,
|
|
74
74
|
stepName: '',
|
|
75
|
-
title: localization.
|
|
75
|
+
title: localization.common.readyComplete,
|
|
76
76
|
subTitle: localization.vmWizard.lastCreateSubtitle,
|
|
77
77
|
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
78
78
|
isValid: true,
|
|
@@ -11,21 +11,12 @@
|
|
|
11
11
|
@hide="emits('hide')"
|
|
12
12
|
>
|
|
13
13
|
<template #content>
|
|
14
|
-
<ui-alert
|
|
15
|
-
v-if="props.errors.length"
|
|
16
|
-
:messages="props.errors.length && !isEmptyName ? props.errors : []"
|
|
17
|
-
test-id="sign-in-error-alert"
|
|
18
|
-
type="error"
|
|
19
|
-
class="mb-2 mx-8"
|
|
20
|
-
size="md"
|
|
21
|
-
hide-close-button
|
|
22
|
-
/>
|
|
23
14
|
<div class="content">
|
|
24
15
|
<form @submit.prevent="onRename">
|
|
25
16
|
<ui-input
|
|
26
17
|
id="name"
|
|
27
18
|
v-model="nameLocal"
|
|
28
|
-
:error="props.
|
|
19
|
+
:error="props.errors[0]"
|
|
29
20
|
:label="localization.common.name"
|
|
30
21
|
test-id="rename-vm-name-input"
|
|
31
22
|
type="text"
|
|
@@ -46,7 +37,6 @@ const props = defineProps<{
|
|
|
46
37
|
vmName: string
|
|
47
38
|
isLoading: boolean
|
|
48
39
|
errors: string[]
|
|
49
|
-
isEmptyName: boolean
|
|
50
40
|
}>()
|
|
51
41
|
const emits = defineEmits<{
|
|
52
42
|
(event: 'hide'): void
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
:vm-name="props.vmName"
|
|
5
5
|
:is-loading="isLoading"
|
|
6
6
|
:errors="errors"
|
|
7
|
-
:is-empty-name="isEmptyName"
|
|
8
7
|
@hide="onHide"
|
|
9
8
|
@change-name="onChangeName"
|
|
10
9
|
@remove-validation-errors="onRemoveValidationErrors"
|
|
@@ -65,7 +64,6 @@ const onChangeName = async (name: string): Promise<void> => {
|
|
|
65
64
|
onHide()
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
const isEmptyName = ref<boolean>(false)
|
|
69
67
|
const errors = ref<string[]>([])
|
|
70
68
|
const showValidationErrors = (data: string[]): void => {
|
|
71
69
|
errors.value = data
|
|
@@ -76,8 +74,6 @@ const onRemoveValidationErrors = (): void => {
|
|
|
76
74
|
|
|
77
75
|
const onCheckName = async (name: string): Promise<boolean> => {
|
|
78
76
|
let result = true
|
|
79
|
-
isEmptyName.value = false
|
|
80
|
-
errors.value = []
|
|
81
77
|
|
|
82
78
|
const url = props.nameRequestUrl.replace('{name}', encodeURIComponent(name))
|
|
83
79
|
const { error } = await useMyFetch<null, API_UI_I_Error>(url, {
|
|
@@ -87,11 +83,9 @@ const onCheckName = async (name: string): Promise<boolean> => {
|
|
|
87
83
|
const status = error.value?.statusCode || 200
|
|
88
84
|
switch (status) {
|
|
89
85
|
case 400: // Empty name
|
|
90
|
-
case 404: // 404 получаем в Сфере
|
|
91
86
|
showValidationErrors([
|
|
92
87
|
localization.value.common.emptyNameValidationDescription,
|
|
93
88
|
])
|
|
94
|
-
isEmptyName.value = true
|
|
95
89
|
result = false
|
|
96
90
|
break
|
|
97
91
|
case 405: // Invalid kind
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
@hide-modal="emits('hide')"
|
|
11
11
|
@confirm="emits('submit')"
|
|
12
12
|
>
|
|
13
|
-
<template v-if="props.type === 'revert'
|
|
13
|
+
<template v-if="props.type === 'revert'" #otherContent>
|
|
14
14
|
<div class="confirm-modal-checkbox-content mt-4 p-3">
|
|
15
15
|
<ui-checkbox
|
|
16
16
|
v-model="suspendOnRevert"
|
|
@@ -79,7 +79,6 @@ const descriptionText = computed<string>(() => {
|
|
|
79
79
|
break
|
|
80
80
|
|
|
81
81
|
case 'revert':
|
|
82
|
-
case 'revertLast':
|
|
83
82
|
description =
|
|
84
83
|
localization.value.snapshots.revertToSnapshotDescription.replace(
|
|
85
84
|
'{0}',
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
@submit="onConfirm"
|
|
9
9
|
>
|
|
10
10
|
<template #modalBody>
|
|
11
|
-
<div v-if="props.type === 'revert'
|
|
11
|
+
<div v-if="props.type === 'revert'">
|
|
12
12
|
<p class="description-text" data-id="description-revert-content">
|
|
13
13
|
{{ descriptionRevertContent }}
|
|
14
14
|
</p>
|
|
@@ -2,7 +2,6 @@ export enum UI_E_TitleConfirmModal {
|
|
|
2
2
|
'take' = '',
|
|
3
3
|
'edit' = 'edit',
|
|
4
4
|
'revert' = 'revert',
|
|
5
|
-
'revertLast' = 'revert',
|
|
6
5
|
'delete' = 'delete',
|
|
7
6
|
'delete_all' = 'deleteAll',
|
|
8
7
|
'group_delete_all' = 'deleteAll',
|
|
@@ -13,7 +12,6 @@ export enum UI_E_TitleModal {
|
|
|
13
12
|
'take' = '',
|
|
14
13
|
'edit' = '',
|
|
15
14
|
'revert' = 'revertToSnapshot',
|
|
16
|
-
'revertLast' = 'revertLatestSnapshot',
|
|
17
15
|
'delete' = 'deleteSnapshot',
|
|
18
16
|
'delete_all' = 'deleteAllSnapshots',
|
|
19
17
|
'group_delete_all' = 'deleteAllSnapshots',
|
|
@@ -18,7 +18,6 @@ export const modalTexts = (
|
|
|
18
18
|
groupTake: localization.common.create,
|
|
19
19
|
edit: localization.common.save,
|
|
20
20
|
revert: localization.common.revert,
|
|
21
|
-
revertLast: localization.common.revert,
|
|
22
21
|
delete: localization.common.delete,
|
|
23
22
|
delete_all: localization.common.deleteAll,
|
|
24
23
|
group_delete_all: localization.common.deleteAll,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
<div class="name-field">
|
|
18
18
|
<div class="flex-1 flex-align-center">
|
|
19
|
-
<ui-skeleton-item v-if="isLoading" width="112px" height="20px"/>
|
|
19
|
+
<ui-skeleton-item v-if="isLoading" width="112px" height="20px" />
|
|
20
20
|
<label v-else :for="`${props.testIds.name}-name`" class="name-label">{{
|
|
21
21
|
localization.common.name
|
|
22
22
|
}}</label>
|
|
@@ -33,33 +33,42 @@
|
|
|
33
33
|
</div>
|
|
34
34
|
|
|
35
35
|
<div class="flex-2">
|
|
36
|
-
<ui-skeleton-item
|
|
36
|
+
<ui-skeleton-item
|
|
37
|
+
v-if="isLoading"
|
|
38
|
+
width="480px"
|
|
39
|
+
height="36px"
|
|
40
|
+
border-radius="8px"
|
|
41
|
+
/>
|
|
37
42
|
|
|
38
43
|
<!-- ToDo при возможности придумать способ выделить тултип в компонент инпута-->
|
|
39
44
|
<ui-tooltip
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
v-else
|
|
46
|
+
id="vm-name-tooltip"
|
|
47
|
+
test-id="vm-name-tooltip"
|
|
48
|
+
size="md"
|
|
49
|
+
width="240"
|
|
50
|
+
position="bottom"
|
|
51
|
+
show-type="variant-1"
|
|
52
|
+
timing="500"
|
|
48
53
|
>
|
|
49
54
|
<template #target>
|
|
50
55
|
<ui-input
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
v-model="name"
|
|
57
|
+
id="vm-name-tooltip"
|
|
58
|
+
:placeholder="`${localization.common.name} (${localization.common.optional})`"
|
|
59
|
+
type="text"
|
|
60
|
+
maxlength="54"
|
|
61
|
+
:error="props.nameErrorText"
|
|
62
|
+
:test-id="props.testIds.name"
|
|
63
|
+
:disabled="props.isDisabledField"
|
|
59
64
|
/>
|
|
60
65
|
</template>
|
|
61
|
-
<template v-if="props.errors.length" #content
|
|
62
|
-
<p
|
|
66
|
+
<template v-if="props.errors.length" #content>
|
|
67
|
+
<p
|
|
68
|
+
v-for="(error, index) in props.errors"
|
|
69
|
+
:key="index"
|
|
70
|
+
class="name-tooltip-text"
|
|
71
|
+
>
|
|
63
72
|
{{ error }}
|
|
64
73
|
</p>
|
|
65
74
|
</template>
|
|
@@ -70,11 +79,19 @@
|
|
|
70
79
|
<template v-if="props.hasLocation">
|
|
71
80
|
<div class="location">
|
|
72
81
|
<div class="flex-1">
|
|
73
|
-
<span v-if="location" class="location-label">{{
|
|
74
|
-
|
|
82
|
+
<span v-if="location" class="location-label">{{
|
|
83
|
+
localization.common.location
|
|
84
|
+
}}</span>
|
|
85
|
+
<ui-skeleton-item v-else width="144px" height="20px" />
|
|
75
86
|
</div>
|
|
76
87
|
|
|
77
|
-
<div
|
|
88
|
+
<div
|
|
89
|
+
v-if="location"
|
|
90
|
+
:class="[
|
|
91
|
+
'selected-location flex-2',
|
|
92
|
+
{ disabled: props.isDisabledField },
|
|
93
|
+
]"
|
|
94
|
+
>
|
|
78
95
|
<span :class="['node-icon', location.iconClassName]" />
|
|
79
96
|
<span :class="['text', isShowAlert && 'error']">
|
|
80
97
|
{{ location.name }}
|
|
@@ -82,10 +99,10 @@
|
|
|
82
99
|
</div>
|
|
83
100
|
<ui-skeleton-item v-else width="160px" height="20px" />
|
|
84
101
|
</div>
|
|
85
|
-
<div :class="['tree-view-wrap', {
|
|
102
|
+
<div :class="['tree-view-wrap', { disabled: props.isDisabledField }]">
|
|
86
103
|
<common-wizards-common-steps-name-location
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
v-model:location="location"
|
|
105
|
+
:nodes="props.locationNodes"
|
|
89
106
|
/>
|
|
90
107
|
</div>
|
|
91
108
|
</template>
|
|
@@ -123,7 +140,7 @@ const isShowAlert = computed<boolean>(() =>
|
|
|
123
140
|
const isLoading = ref(true)
|
|
124
141
|
|
|
125
142
|
onMounted(() => {
|
|
126
|
-
setTimeout(() => isLoading.value = false, 0)
|
|
143
|
+
setTimeout(() => (isLoading.value = false), 0)
|
|
127
144
|
})
|
|
128
145
|
</script>
|
|
129
146
|
|
|
@@ -134,9 +151,10 @@ onMounted(() => {
|
|
|
134
151
|
--select-name-help-icon-active-color: #008fd6;
|
|
135
152
|
--select-name-help-hide-icon-color: #213444;
|
|
136
153
|
--select-name-border-color: #e9ebeda3;
|
|
154
|
+
--select-register-vm-name-top-border-color: #e9ebeda3;
|
|
137
155
|
--select-name-location-node-color: #182531;
|
|
138
156
|
--select-name-location-bg-color: #ffffff;
|
|
139
|
-
--select-name-tooltip-bg: #
|
|
157
|
+
--select-name-tooltip-bg: #ea3223e0;
|
|
140
158
|
}
|
|
141
159
|
:root.dark-theme {
|
|
142
160
|
--select-name-text-color: #e9eaec;
|
|
@@ -144,9 +162,10 @@ onMounted(() => {
|
|
|
144
162
|
--select-name-help-icon-active-color: #2ba2de;
|
|
145
163
|
--select-name-help-hide-icon-color: #e9eaec;
|
|
146
164
|
--select-name-border-color: #e9ebed1f;
|
|
165
|
+
--select-register-vm-name-top-border-color: #e9ebed1f;
|
|
147
166
|
--select-name-location-node-color: #e9eaec;
|
|
148
167
|
--select-name-location-bg-color: #1b2a371f;
|
|
149
|
-
--select-name-tooltip-bg: #
|
|
168
|
+
--select-name-tooltip-bg: #ea3223b8;
|
|
150
169
|
}
|
|
151
170
|
</style>
|
|
152
171
|
<style scoped lang="scss">
|
|
@@ -170,7 +189,7 @@ onMounted(() => {
|
|
|
170
189
|
|
|
171
190
|
.name-tooltip-text {
|
|
172
191
|
font-size: 12px;
|
|
173
|
-
color: #
|
|
192
|
+
color: #e9eaec;
|
|
174
193
|
}
|
|
175
194
|
|
|
176
195
|
.name-label {
|
|
@@ -200,7 +219,7 @@ onMounted(() => {
|
|
|
200
219
|
display: flex;
|
|
201
220
|
margin-top: 16px;
|
|
202
221
|
padding: 22px 0;
|
|
203
|
-
border-top: 1px solid var(--select-name-border-color);
|
|
222
|
+
border-top: 1px solid var(--select-register-vm-name-top-border-color);
|
|
204
223
|
column-gap: 16px;
|
|
205
224
|
align-items: flex-start;
|
|
206
225
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="device-table-container">
|
|
3
3
|
<ui-data-table
|
|
4
4
|
:data="data"
|
|
5
|
-
:options="options"
|
|
5
|
+
:options="tableConfig.options"
|
|
6
6
|
:loading="props.isLoading"
|
|
7
7
|
:total-pages="props.totalPages"
|
|
8
8
|
:total-items="props.totalItems"
|
|
@@ -79,13 +79,10 @@ import type {
|
|
|
79
79
|
UI_I_TableTexts,
|
|
80
80
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
81
81
|
import type { UI_I_DataTableSkeleton } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
82
|
-
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/
|
|
82
|
+
import type { UI_T_SelectComputeResourceTabType } from '~/components/common/wizards/vm/migrate/steps/selectStorage/lib/models/types'
|
|
83
83
|
import type { UI_T_ComputeResourceTableItem } from '~/components/common/wizards/vm/migrate/steps/computeResource/lib/models/types'
|
|
84
|
-
import
|
|
85
|
-
|
|
86
|
-
getHeaderDataFunc,
|
|
87
|
-
getBodyDataFunc,
|
|
88
|
-
} from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable'
|
|
84
|
+
import * as hostTable from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable'
|
|
85
|
+
import * as clusterTable from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable'
|
|
89
86
|
|
|
90
87
|
const selectedDataLocal = defineModel<number | null>({ required: true })
|
|
91
88
|
const props = defineProps<{
|
|
@@ -120,15 +117,33 @@ const tableSkeleton = ref<UI_I_DataTableSkeleton>({
|
|
|
120
117
|
withoutPagination: true,
|
|
121
118
|
})
|
|
122
119
|
|
|
120
|
+
const tableTitleMap = {
|
|
121
|
+
host: localization.value.common.hosts,
|
|
122
|
+
cluster: localization.value.common.clusters,
|
|
123
|
+
} as const
|
|
124
|
+
const tableConfigMap = {
|
|
125
|
+
host: hostTable,
|
|
126
|
+
cluster: clusterTable,
|
|
127
|
+
} as const
|
|
128
|
+
|
|
129
|
+
const tableConfig = computed(
|
|
130
|
+
() => tableConfigMap[props.type as keyof typeof tableConfigMap]
|
|
131
|
+
)
|
|
132
|
+
|
|
123
133
|
const data = computed<UI_I_DataTable>(() => ({
|
|
124
|
-
id:
|
|
125
|
-
title:
|
|
134
|
+
id: `compute-resource-${props.type}-table`,
|
|
135
|
+
title: tableDataTitle.value,
|
|
126
136
|
header: deviceHeadItems.value,
|
|
127
137
|
body: deviceBodyItems.value,
|
|
128
138
|
}))
|
|
129
|
-
|
|
139
|
+
const tableDataTitle = computed<string>(
|
|
140
|
+
() =>
|
|
141
|
+
`${tableTitleMap[props.type as keyof typeof tableConfigMap]} (${
|
|
142
|
+
props.totalItems
|
|
143
|
+
})`
|
|
144
|
+
)
|
|
130
145
|
const deviceHeadItems = computed<UI_I_DataTableHeader[]>(() =>
|
|
131
|
-
getHeaderDataFunc(localization.value)
|
|
146
|
+
tableConfig.value.getHeaderDataFunc(localization.value)
|
|
132
147
|
)
|
|
133
148
|
|
|
134
149
|
const deviceBodyItems = ref<UI_I_DataTableBody[]>([])
|
|
@@ -140,13 +155,16 @@ watch(
|
|
|
140
155
|
return
|
|
141
156
|
}
|
|
142
157
|
|
|
143
|
-
deviceBodyItems.value = getBodyDataFunc(
|
|
158
|
+
deviceBodyItems.value = tableConfig.value.getBodyDataFunc(
|
|
159
|
+
newValue,
|
|
160
|
+
localization.value
|
|
161
|
+
)
|
|
144
162
|
},
|
|
145
163
|
{ deep: true, immediate: true }
|
|
146
164
|
)
|
|
147
165
|
|
|
148
166
|
const onSelectRow = (value: UI_I_DataTableBody[]): void => {
|
|
149
|
-
selectedDataLocal.value = value?.[0].row
|
|
167
|
+
selectedDataLocal.value = value?.[0].row as number
|
|
150
168
|
}
|
|
151
169
|
</script>
|
|
152
170
|
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_DataTableBody,
|
|
3
|
+
UI_I_DataTableOptions,
|
|
4
|
+
UI_I_DataTableHeader,
|
|
5
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
6
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
+
import type { UI_I_ClusterTableItem } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/lib/models/interfaces'
|
|
8
|
+
// import {
|
|
9
|
+
// UI_E_DeviceStatus,
|
|
10
|
+
// UI_E_DeviceStatusChipColor,
|
|
11
|
+
// UI_E_DeviceStatusIcon,
|
|
12
|
+
// } from '~/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/models/enums'
|
|
13
|
+
|
|
14
|
+
// // Маппинг для статусов
|
|
15
|
+
// const STATUS_MAPPING = {
|
|
16
|
+
// [UI_E_DeviceStatus.Unknown]: {
|
|
17
|
+
// icon: UI_E_DeviceStatusIcon.HelpIcon,
|
|
18
|
+
// chipColor: UI_E_DeviceStatusChipColor.Primary,
|
|
19
|
+
// },
|
|
20
|
+
// [UI_E_DeviceStatus.Supported]: {
|
|
21
|
+
// icon: UI_E_DeviceStatusIcon.StatusCheck,
|
|
22
|
+
// chipColor: UI_E_DeviceStatusChipColor.Green,
|
|
23
|
+
// },
|
|
24
|
+
// [UI_E_DeviceStatus.NotSupported]: {
|
|
25
|
+
// icon: UI_E_DeviceStatusIcon.Close,
|
|
26
|
+
// chipColor: UI_E_DeviceStatusChipColor.Red,
|
|
27
|
+
// },
|
|
28
|
+
// }
|
|
29
|
+
|
|
30
|
+
export const getHeaderDataFunc = (
|
|
31
|
+
localization: UI_I_Localization
|
|
32
|
+
): UI_I_DataTableHeader[] => [
|
|
33
|
+
{
|
|
34
|
+
col: 'col0',
|
|
35
|
+
colName: 'name',
|
|
36
|
+
text: localization.common.name,
|
|
37
|
+
isSortable: true,
|
|
38
|
+
sort: 'asc',
|
|
39
|
+
width: '180px',
|
|
40
|
+
show: true,
|
|
41
|
+
filter: false,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
col: 'col1',
|
|
45
|
+
colName: 'available_cpu',
|
|
46
|
+
text: localization.common.availableCpu,
|
|
47
|
+
isSortable: true,
|
|
48
|
+
sort: 'asc',
|
|
49
|
+
width: '96px',
|
|
50
|
+
show: true,
|
|
51
|
+
filter: false,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
col: 'col2',
|
|
55
|
+
colName: 'available_memory',
|
|
56
|
+
text: localization.common.availableMemory,
|
|
57
|
+
isSortable: true,
|
|
58
|
+
sort: 'asc',
|
|
59
|
+
width: '96px',
|
|
60
|
+
show: true,
|
|
61
|
+
filter: false,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
col: 'col3',
|
|
65
|
+
colName: 'available_storage',
|
|
66
|
+
text: localization.common.availableStorage,
|
|
67
|
+
isSortable: true,
|
|
68
|
+
sort: 'asc',
|
|
69
|
+
width: '96px',
|
|
70
|
+
show: true,
|
|
71
|
+
filter: false,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
col: 'col4',
|
|
75
|
+
colName: 'drs',
|
|
76
|
+
text: localization.common.vSphere_DRS,
|
|
77
|
+
isSortable: true,
|
|
78
|
+
sort: 'asc',
|
|
79
|
+
width: '96px',
|
|
80
|
+
show: true,
|
|
81
|
+
filter: false,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
col: 'col5',
|
|
85
|
+
colName: 'ha',
|
|
86
|
+
text: localization.common.vSphere_HA,
|
|
87
|
+
isSortable: true,
|
|
88
|
+
sort: 'asc',
|
|
89
|
+
width: '96px',
|
|
90
|
+
show: true,
|
|
91
|
+
filter: false,
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
col: 'col6',
|
|
95
|
+
colName: 'total_cpu',
|
|
96
|
+
text: localization.common.totalCpu,
|
|
97
|
+
isSortable: true,
|
|
98
|
+
sort: 'asc',
|
|
99
|
+
width: '96px',
|
|
100
|
+
show: true,
|
|
101
|
+
filter: false,
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
col: 'col7',
|
|
105
|
+
colName: 'total_memory',
|
|
106
|
+
text: localization.common.totalMemory,
|
|
107
|
+
isSortable: true,
|
|
108
|
+
sort: 'asc',
|
|
109
|
+
width: '96px',
|
|
110
|
+
show: true,
|
|
111
|
+
filter: false,
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
col: 'col8',
|
|
115
|
+
colName: 'total_storage',
|
|
116
|
+
text: localization.common.totalStorage,
|
|
117
|
+
isSortable: true,
|
|
118
|
+
sort: 'asc',
|
|
119
|
+
width: '96px',
|
|
120
|
+
show: true,
|
|
121
|
+
filter: false,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
col: 'col9',
|
|
125
|
+
colName: 'vms',
|
|
126
|
+
text: localization.common.vms,
|
|
127
|
+
isSortable: true,
|
|
128
|
+
sort: 'asc',
|
|
129
|
+
width: '96px',
|
|
130
|
+
show: true,
|
|
131
|
+
filter: false,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
col: 'col10',
|
|
135
|
+
colName: 'hosts',
|
|
136
|
+
text: localization.common.hosts,
|
|
137
|
+
isSortable: true,
|
|
138
|
+
sort: 'asc',
|
|
139
|
+
width: '96px',
|
|
140
|
+
show: true,
|
|
141
|
+
filter: false,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
col: 'col11',
|
|
145
|
+
colName: 'cpus',
|
|
146
|
+
text: localization.common.cpus,
|
|
147
|
+
isSortable: true,
|
|
148
|
+
sort: 'asc',
|
|
149
|
+
width: '96px',
|
|
150
|
+
show: true,
|
|
151
|
+
filter: false,
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
col: 'col12',
|
|
155
|
+
colName: 'datastores',
|
|
156
|
+
text: localization.common.datastores,
|
|
157
|
+
isSortable: true,
|
|
158
|
+
sort: 'asc',
|
|
159
|
+
width: '96px',
|
|
160
|
+
show: true,
|
|
161
|
+
filter: false,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
col: 'col13',
|
|
165
|
+
colName: 'vsan',
|
|
166
|
+
text: localization.common.vSAN,
|
|
167
|
+
isSortable: true,
|
|
168
|
+
sort: 'asc',
|
|
169
|
+
width: '96px',
|
|
170
|
+
show: true,
|
|
171
|
+
filter: false,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
col: 'col14',
|
|
175
|
+
colName: 'vc',
|
|
176
|
+
text: localization.common.vc,
|
|
177
|
+
isSortable: true,
|
|
178
|
+
sort: 'asc',
|
|
179
|
+
width: '96px',
|
|
180
|
+
show: true,
|
|
181
|
+
filter: false,
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
col: 'col15',
|
|
185
|
+
colName: 'evc_cpu_mode',
|
|
186
|
+
text: localization.common.evcCpuMode,
|
|
187
|
+
isSortable: true,
|
|
188
|
+
sort: 'asc',
|
|
189
|
+
width: '96px',
|
|
190
|
+
show: true,
|
|
191
|
+
filter: false,
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
col: 'col16',
|
|
195
|
+
colName: 'evc_graphics_mode',
|
|
196
|
+
text: localization.common.evcGraphicsMode,
|
|
197
|
+
isSortable: true,
|
|
198
|
+
sort: 'asc',
|
|
199
|
+
width: '96px',
|
|
200
|
+
show: true,
|
|
201
|
+
filter: false,
|
|
202
|
+
},
|
|
203
|
+
]
|
|
204
|
+
export const options: UI_I_DataTableOptions = {
|
|
205
|
+
perPageOptions: [{ text: '10', value: 100, default: true }],
|
|
206
|
+
isSelectable: true,
|
|
207
|
+
selectType: 'radio',
|
|
208
|
+
showPagination: false,
|
|
209
|
+
showPageInfo: false,
|
|
210
|
+
isSortable: true,
|
|
211
|
+
server: true,
|
|
212
|
+
isResizable: true,
|
|
213
|
+
showSelectedRows: false,
|
|
214
|
+
showColumnManager: true,
|
|
215
|
+
inModal: true,
|
|
216
|
+
inBlock: false,
|
|
217
|
+
// isFocusable: false,
|
|
218
|
+
// showPaginationOnTop: false,
|
|
219
|
+
// showSearch: false,
|
|
220
|
+
// withActions: false,
|
|
221
|
+
// showExport: false,
|
|
222
|
+
// withCollapse: false,
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export const getBodyDataFunc = (
|
|
226
|
+
bodyData: UI_I_ClusterTableItem[],
|
|
227
|
+
_localization: UI_I_Localization
|
|
228
|
+
): UI_I_DataTableBody[] => {
|
|
229
|
+
const { $binary }: any = useNuxtApp()
|
|
230
|
+
|
|
231
|
+
return bodyData.map((cluster, index: number) => {
|
|
232
|
+
// const statusKey = host.state
|
|
233
|
+
// ? UI_E_DeviceStatus.Unknown
|
|
234
|
+
// : UI_E_DeviceStatus.Supported
|
|
235
|
+
// const statusData = {
|
|
236
|
+
// ...STATUS_MAPPING[statusKey],
|
|
237
|
+
// testId: `${host.name}-${index}-status`,
|
|
238
|
+
// }
|
|
239
|
+
|
|
240
|
+
return {
|
|
241
|
+
row: index,
|
|
242
|
+
collapse: false,
|
|
243
|
+
isHiddenCollapse: false,
|
|
244
|
+
collapseToggle: false,
|
|
245
|
+
|
|
246
|
+
data: [
|
|
247
|
+
{
|
|
248
|
+
key: 'icon',
|
|
249
|
+
col: 'col0',
|
|
250
|
+
text: cluster.name,
|
|
251
|
+
data: {
|
|
252
|
+
iconClassName: 'vsphere-icon-cluster',
|
|
253
|
+
},
|
|
254
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
255
|
+
},
|
|
256
|
+
|
|
257
|
+
{
|
|
258
|
+
col: 'col1',
|
|
259
|
+
text: $binary.roundHz(cluster.available_cpu),
|
|
260
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
col: 'col2',
|
|
264
|
+
text: $binary.round(cluster.available_memory),
|
|
265
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
col: 'col3',
|
|
269
|
+
text: $binary.round(cluster.available_storage),
|
|
270
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
col: 'col4',
|
|
274
|
+
text: cluster.drs,
|
|
275
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
col: 'col5',
|
|
279
|
+
text: cluster.ha,
|
|
280
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
col: 'col6',
|
|
284
|
+
text: $binary.roundHz(cluster.total_cpu),
|
|
285
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
col: 'col7',
|
|
289
|
+
text: $binary.round(cluster.total_memory),
|
|
290
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
col: 'col8',
|
|
294
|
+
text: $binary.round(cluster.total_storage),
|
|
295
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
col: 'col9',
|
|
299
|
+
text: cluster.vms,
|
|
300
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
col: 'col10',
|
|
304
|
+
text: cluster.hosts,
|
|
305
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
col: 'col11',
|
|
309
|
+
text: cluster.cpus,
|
|
310
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
col: 'col12',
|
|
314
|
+
text: cluster.datastores,
|
|
315
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
col: 'col13',
|
|
319
|
+
text: cluster.vsan,
|
|
320
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
col: 'col14',
|
|
324
|
+
text: cluster.vc,
|
|
325
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
col: 'col15',
|
|
329
|
+
text: cluster.evc_cpu_mode,
|
|
330
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
col: 'col16',
|
|
334
|
+
text: cluster.evc_graphics_mode,
|
|
335
|
+
testId: `migrate-cluster-table-item-${index}`,
|
|
336
|
+
},
|
|
337
|
+
],
|
|
338
|
+
}
|
|
339
|
+
})
|
|
340
|
+
}
|
|
@@ -222,7 +222,9 @@ export const getBodyDataFunc = (
|
|
|
222
222
|
key: 'icon',
|
|
223
223
|
col: 'col0',
|
|
224
224
|
text: host.name,
|
|
225
|
-
data:
|
|
225
|
+
data: {
|
|
226
|
+
iconClassName: `vsphere-icon-${hostIconByState[host.state]}`,
|
|
227
|
+
},
|
|
226
228
|
testId: `migrate-host-table-item-${index}`,
|
|
227
229
|
},
|
|
228
230
|
|