bfg-common 1.5.502 → 1.5.503
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/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +0 -4
- package/assets/localization/local_en.json +0 -4
- package/assets/localization/local_hy.json +0 -4
- package/assets/localization/local_kk.json +0 -4
- package/assets/localization/local_ru.json +0 -4
- package/assets/localization/local_zh.json +0 -4
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/Add.vue +251 -251
- package/components/common/backup/storage/actions/add/lib/utils.ts +62 -62
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/pages/backups/Backups.vue +61 -54
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/configuration/Configuration.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/TableView.vue +95 -95
- package/components/common/pages/backups/modals/createBackup/general/General.vue +141 -141
- package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +12 -12
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/disks/Disks.vue +27 -27
- package/components/common/pages/backups/modals/restore/disks/tableView/lib/config/table.ts +117 -117
- package/components/common/pages/backups/modals/restore/name/Name.vue +166 -166
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/backups/modals/restore/networks/Networks.vue +67 -67
- package/components/common/pages/backups/modals/restore/networks/table/Table.vue +214 -214
- package/components/common/pages/backups/modals/restore/types/lib/config/typeOptions.ts +25 -25
- package/components/common/pages/backups/tools/Tools.vue +75 -75
- package/components/common/pages/backups/tools/lib/config/tabs.ts +36 -37
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +392 -392
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/Add.vue +892 -889
- package/components/common/vm/actions/add/New.vue +693 -691
- package/components/common/vm/actions/add/Old.vue +412 -410
- package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +85 -85
- package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
- package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
- package/components/common/vm/actions/clone/Clone.vue +862 -861
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +368 -368
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/Table.vue +99 -99
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/computeResource/ComputeResource.vue +143 -143
- package/components/common/vm/actions/common/select/computeResource/New.vue +184 -184
- package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +131 -131
- package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/name/Name.vue +178 -176
- package/components/common/vm/actions/common/select/name/New.vue +221 -221
- package/components/common/vm/actions/common/select/name/Old.vue +121 -121
- package/components/common/vm/actions/common/select/name/lib/models/interfaces.ts +4 -4
- package/components/common/vm/actions/common/select/os/Old.vue +152 -152
- package/components/common/vm/actions/common/select/os/Os.vue +139 -139
- package/components/common/vm/actions/common/select/storage/new/New.vue +320 -320
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/vm/actions/register/Register.vue +284 -283
- package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +93 -93
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/composables/useAppVersion.ts +21 -21
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/package.json +2 -2
- package/plugins/date.ts +233 -233
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/components/common/pages/backups/BackupsOld.vue +0 -80
- package/components/common/pages/backups/backupsNew/BackupsNew.vue +0 -355
- package/components/common/pages/backups/backupsNew/contextMenuView/ContextMenuView.vue +0 -101
- package/components/common/pages/backups/backupsNew/contextMenuView/lib/config/contextMenuItems.ts +0 -29
- package/components/common/pages/backups/backupsNew/lib/models/interfaces.ts +0 -12
- package/components/common/pages/backups/backupsNew/lib/utils/contextMenu.ts +0 -29
- package/components/common/pages/backups/backupsNew/lib/utils/details.ts +0 -30
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="[
|
|
4
|
-
'backups-page grid h-inherit p-4 overflow-hidden ',
|
|
5
|
-
{ 'selected gap-3': props.detailData },
|
|
6
|
-
]"
|
|
7
|
-
>
|
|
8
|
-
<div class="left-content grid p-4">
|
|
9
|
-
<div class="flex justify-between">
|
|
10
|
-
<h3 class="title-block font-[500] text-[16px]">
|
|
11
|
-
{{ localization.inventoryTabs.backups }} ({{
|
|
12
|
-
props.backupsTree.length
|
|
13
|
-
}})
|
|
14
|
-
</h3>
|
|
15
|
-
<ui-button
|
|
16
|
-
v-if="props.typeFromRoute === 'vm'"
|
|
17
|
-
v-permission="props.createBackupPermission"
|
|
18
|
-
test-id="take-backup-btn"
|
|
19
|
-
size="md"
|
|
20
|
-
@click="emits('set-action', 'createBackup')"
|
|
21
|
-
>
|
|
22
|
-
<ui-icon name="plus" width="20" height="20" class="mr-2" />
|
|
23
|
-
{{ localization.common.createBackup }}...
|
|
24
|
-
</ui-button>
|
|
25
|
-
</div>
|
|
26
|
-
<div
|
|
27
|
-
v-if="props.backupsTree.length"
|
|
28
|
-
class="backups-tree-content overflow-y-auto my-4 px-2 pb-2"
|
|
29
|
-
>
|
|
30
|
-
<ui-tree
|
|
31
|
-
:is-loading="props.backupsLoading"
|
|
32
|
-
:nodes="props.backupsTree"
|
|
33
|
-
@select-node="emits('select-node', $event)"
|
|
34
|
-
@toggle-node="emits('show-nodes', $event.id)"
|
|
35
|
-
@show-context-menu="showContextMenu"
|
|
36
|
-
>
|
|
37
|
-
<template #content="{ node }">
|
|
38
|
-
<div class="flex-align-center">
|
|
39
|
-
<span :class="['node-icon', node.iconClassName]"></span>
|
|
40
|
-
<span class="node-name text-ellipsis">{{ node.name }}</span>
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
</ui-tree>
|
|
44
|
-
</div>
|
|
45
|
-
<div v-else class="empty-block grid justify-items-center content-center">
|
|
46
|
-
<ui-icon
|
|
47
|
-
name="not-found-magnifier"
|
|
48
|
-
width="28"
|
|
49
|
-
height="28"
|
|
50
|
-
color="#9da6ad"
|
|
51
|
-
/>
|
|
52
|
-
<p class="title-block font-[400] text-[16px] mt-2">
|
|
53
|
-
{{ localization.common.noBackupsAvailable }}
|
|
54
|
-
</p>
|
|
55
|
-
<p class="description-block mt-[6px] text-[13px]">
|
|
56
|
-
{{ localization.common.noBackupsAvailableDesc }}
|
|
57
|
-
</p>
|
|
58
|
-
</div>
|
|
59
|
-
<ui-button
|
|
60
|
-
v-permission="props.deleteAllPermission"
|
|
61
|
-
:disabled="!props.backupsTree.length"
|
|
62
|
-
:class="[
|
|
63
|
-
'delete-all w-max ml-auto',
|
|
64
|
-
{ disabled: !props.backupsTree.length },
|
|
65
|
-
]"
|
|
66
|
-
test-id="delete-all-backups-btn"
|
|
67
|
-
size="md"
|
|
68
|
-
variant="text"
|
|
69
|
-
is-without-sizes
|
|
70
|
-
is-without-height
|
|
71
|
-
@click="emits('set-action', 'deleteBackupAll')"
|
|
72
|
-
>
|
|
73
|
-
<ui-icon name="delete" width="20" height="20" class="mr-2" />
|
|
74
|
-
{{ localization.common.deleteAll }}
|
|
75
|
-
</ui-button>
|
|
76
|
-
</div>
|
|
77
|
-
<div
|
|
78
|
-
v-if="props.detailData"
|
|
79
|
-
class="backups-details overflow-hidden flex-direction-column p-4"
|
|
80
|
-
>
|
|
81
|
-
<div class="flex justify-between mb-6">
|
|
82
|
-
<h3 class="title-block font-[500] text-[16px]">
|
|
83
|
-
{{ localization.common.backupDetails }}
|
|
84
|
-
</h3>
|
|
85
|
-
<div class="details-actions-block flex column-gap-4">
|
|
86
|
-
<ui-tooltip
|
|
87
|
-
id="restore-backups-btn"
|
|
88
|
-
test-id="restore-backups-btn-tooltip"
|
|
89
|
-
size="md"
|
|
90
|
-
position="bottom"
|
|
91
|
-
position-by-tooltip="center"
|
|
92
|
-
show-type="variant-1"
|
|
93
|
-
>
|
|
94
|
-
<template #target>
|
|
95
|
-
<div id="restore-backups-btn" class="popped tooltip">
|
|
96
|
-
<ui-button
|
|
97
|
-
v-permission="props.restoreBackupPermission"
|
|
98
|
-
test-id="restore-backups-btn"
|
|
99
|
-
size="md"
|
|
100
|
-
variant="text"
|
|
101
|
-
class="restore-backups-btn"
|
|
102
|
-
is-without-sizes
|
|
103
|
-
is-without-height
|
|
104
|
-
@click="emits('set-action', 'restoreBackup')"
|
|
105
|
-
>
|
|
106
|
-
<ui-icon name="update" width="20" height="20" />
|
|
107
|
-
</ui-button>
|
|
108
|
-
</div>
|
|
109
|
-
</template>
|
|
110
|
-
<template #content>
|
|
111
|
-
{{ localization.common.restore }}
|
|
112
|
-
</template>
|
|
113
|
-
</ui-tooltip>
|
|
114
|
-
<div class="border-line"></div>
|
|
115
|
-
<ui-tooltip
|
|
116
|
-
id="delete-backups-btn"
|
|
117
|
-
test-id="delete-backups-btn-tooltip"
|
|
118
|
-
size="md"
|
|
119
|
-
position="bottom"
|
|
120
|
-
position-by-tooltip="center"
|
|
121
|
-
show-type="variant-1"
|
|
122
|
-
>
|
|
123
|
-
<template #target>
|
|
124
|
-
<div id="delete-backups-btn" class="popped tooltip">
|
|
125
|
-
<ui-button
|
|
126
|
-
test-id="delete-backups-btn"
|
|
127
|
-
size="md"
|
|
128
|
-
variant="text"
|
|
129
|
-
class="delete-backups-btn"
|
|
130
|
-
is-without-sizes
|
|
131
|
-
is-without-height
|
|
132
|
-
@click="emits('set-action', 'deleteBackup')"
|
|
133
|
-
>
|
|
134
|
-
<ui-icon name="delete" width="20" height="20" />
|
|
135
|
-
</ui-button>
|
|
136
|
-
</div>
|
|
137
|
-
</template>
|
|
138
|
-
<template #content>
|
|
139
|
-
{{ localization.common.delete }}
|
|
140
|
-
</template>
|
|
141
|
-
</ui-tooltip>
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
<div class="grid row-gap-3 overflow-y-auto">
|
|
145
|
-
<ui-info-block
|
|
146
|
-
v-for="(item, index) in currentDetailsData"
|
|
147
|
-
:key="index"
|
|
148
|
-
:data="item"
|
|
149
|
-
>
|
|
150
|
-
<template v-if="item.labelIcon" #labelBlock>
|
|
151
|
-
<div class="info-block-label-content flex items-start">
|
|
152
|
-
<ui-icon
|
|
153
|
-
v-if="item.labelIcon"
|
|
154
|
-
:name="item.labelIcon"
|
|
155
|
-
width="20"
|
|
156
|
-
height="20"
|
|
157
|
-
class="info-label-icon mr-[10px]"
|
|
158
|
-
/>
|
|
159
|
-
<span class="info-label">{{ item.label }}</span>
|
|
160
|
-
</div>
|
|
161
|
-
</template>
|
|
162
|
-
<template #valueBlock>
|
|
163
|
-
<span
|
|
164
|
-
v-if="item.value === 'empty-description'"
|
|
165
|
-
class="empty-description"
|
|
166
|
-
>
|
|
167
|
-
{{ localization.common.backupHasNoDescriptionYet }}
|
|
168
|
-
</span>
|
|
169
|
-
</template>
|
|
170
|
-
</ui-info-block>
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
</div>
|
|
174
|
-
|
|
175
|
-
<common-pages-backups-backups-new-context-menu-view
|
|
176
|
-
:show="contextMenuShow"
|
|
177
|
-
:context-data="contextMenu"
|
|
178
|
-
:restore-backup-permission="props.restoreBackupPermission"
|
|
179
|
-
:delete-backup-permission="props.deleteBackupPermission"
|
|
180
|
-
@select-action="onSelectContextMenuItem"
|
|
181
|
-
/>
|
|
182
|
-
</template>
|
|
183
|
-
|
|
184
|
-
<script setup lang="ts">
|
|
185
|
-
import type { UI_I_InfoBlock } from '~/node_modules/bfg-uikit/components/ui/infoBlock/models/interfaces'
|
|
186
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
187
|
-
import type { UI_I_BackupsTreeNode } from '~/components/common/pages/backups/lib/models/interfaces'
|
|
188
|
-
import type {
|
|
189
|
-
UI_T_TargetType,
|
|
190
|
-
UI_T_BackupActionType,
|
|
191
|
-
} from '~/components/common/pages/backups/lib/models/types'
|
|
192
|
-
import * as utils from '~/components/common/pages/backups/backupsNew/lib/utils/contextMenu'
|
|
193
|
-
import { constructDetails } from '~/components/common/pages/backups/backupsNew/lib/utils/details'
|
|
194
|
-
|
|
195
|
-
const props = defineProps<{
|
|
196
|
-
backupsTree: UI_I_BackupsTreeNode[]
|
|
197
|
-
backupsLoading: boolean
|
|
198
|
-
typeFromRoute: UI_T_TargetType
|
|
199
|
-
detailData: UI_I_BackupsTreeNode | null
|
|
200
|
-
createBackupPermission: string
|
|
201
|
-
restoreBackupPermission: string
|
|
202
|
-
deleteBackupPermission: string
|
|
203
|
-
deleteAllPermission: string
|
|
204
|
-
}>()
|
|
205
|
-
|
|
206
|
-
const emits = defineEmits<{
|
|
207
|
-
(event: 'show-nodes', value: string | number): void
|
|
208
|
-
(event: 'set-action', value: UI_T_BackupActionType): void
|
|
209
|
-
(event: 'select-node', value: UI_I_BackupsTreeNode): void
|
|
210
|
-
}>()
|
|
211
|
-
|
|
212
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
213
|
-
|
|
214
|
-
const { showContextMenu, contextMenuShow, contextMenu } = utils.getContextMenu()
|
|
215
|
-
|
|
216
|
-
const onSelectContextMenuItem = (actionType: UI_T_BackupActionType): void => {
|
|
217
|
-
emits('set-action', actionType)
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
const currentDetailsData = computed<UI_I_InfoBlock[]>(() =>
|
|
221
|
-
constructDetails(localization.value, props.detailData)
|
|
222
|
-
)
|
|
223
|
-
</script>
|
|
224
|
-
|
|
225
|
-
<style>
|
|
226
|
-
:root {
|
|
227
|
-
--backups-page-inner-block-bg: #ffffff;
|
|
228
|
-
--backups-page-title-color: #4d5d69;
|
|
229
|
-
--backups-page-tree-border-color: #e9ebed;
|
|
230
|
-
--backups-page-details-action-color: #4d5d69;
|
|
231
|
-
--backups-page-details-action-hover-color: #213444;
|
|
232
|
-
--backups-page-info-block-label-color: #4d5d69;
|
|
233
|
-
--backups-page-info-block-value-color: #182531;
|
|
234
|
-
}
|
|
235
|
-
:root.dark-theme {
|
|
236
|
-
--backups-page-inner-block-bg: #334453;
|
|
237
|
-
--backups-page-title-color: #e9eaec;
|
|
238
|
-
--backups-page-tree-border-color: #e9ebed1f;
|
|
239
|
-
--backups-page-details-action-color: #e9eaec;
|
|
240
|
-
--backups-page-details-action-hover-color: #ffffff;
|
|
241
|
-
--backups-page-info-block-label-color: #e9eaec;
|
|
242
|
-
--backups-page-info-block-value-color: #e9eaec;
|
|
243
|
-
}
|
|
244
|
-
</style>
|
|
245
|
-
|
|
246
|
-
<style scoped lang="scss">
|
|
247
|
-
.backups-page {
|
|
248
|
-
&.selected {
|
|
249
|
-
grid-template-columns: repeat(2, calc(50% - 6px));
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.title-block {
|
|
253
|
-
color: var(--backups-page-title-color);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.left-content {
|
|
257
|
-
background-color: var(--backups-page-inner-block-bg);
|
|
258
|
-
box-shadow: 0 1px 4px 0 #00000014;
|
|
259
|
-
border-radius: 8px;
|
|
260
|
-
grid-template-rows: max-content 1fr max-content;
|
|
261
|
-
|
|
262
|
-
.backups-tree-content {
|
|
263
|
-
border: 1px solid var(--backups-page-tree-border-color);
|
|
264
|
-
border-radius: 8px;
|
|
265
|
-
|
|
266
|
-
:deep(.tree-content) {
|
|
267
|
-
padding-right: 8px;
|
|
268
|
-
|
|
269
|
-
.node-wrapper {
|
|
270
|
-
border-radius: 4px;
|
|
271
|
-
|
|
272
|
-
.node-element {
|
|
273
|
-
line-height: 20px;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.empty-block {
|
|
280
|
-
.description-block {
|
|
281
|
-
color: #9da6ad;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
.delete-all {
|
|
285
|
-
&:not(.disabled) {
|
|
286
|
-
color: #ea3223;
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
.backups-details {
|
|
291
|
-
background-color: var(--backups-page-inner-block-bg);
|
|
292
|
-
box-shadow: 0 1px 4px 0 #00000014;
|
|
293
|
-
border-radius: 8px;
|
|
294
|
-
|
|
295
|
-
.details-actions-block {
|
|
296
|
-
.border-line {
|
|
297
|
-
width: 1px;
|
|
298
|
-
height: 20px;
|
|
299
|
-
background-color: #e9ebeda3;
|
|
300
|
-
}
|
|
301
|
-
.restore-backups-btn,
|
|
302
|
-
.edit-backups-btn {
|
|
303
|
-
color: var(--backups-page-details-action-color);
|
|
304
|
-
|
|
305
|
-
&:hover {
|
|
306
|
-
color: var(--backups-page-details-action-hover-color);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
.delete-backups-btn {
|
|
310
|
-
color: #ea3223;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
.info-block-label-content {
|
|
314
|
-
.info-label-icon {
|
|
315
|
-
color: #9da6ad;
|
|
316
|
-
min-width: 20px;
|
|
317
|
-
}
|
|
318
|
-
.info-label {
|
|
319
|
-
margin-top: 2.5px;
|
|
320
|
-
color: var(--backups-page-info-block-label-color);
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
.empty-description {
|
|
324
|
-
color: #9da6ad;
|
|
325
|
-
}
|
|
326
|
-
:deep(.ui-main-info-block-item-right) {
|
|
327
|
-
white-space: unset !important;
|
|
328
|
-
max-width: 50%;
|
|
329
|
-
}
|
|
330
|
-
:deep(.ui-main-info-block-item-right-value-parent) {
|
|
331
|
-
white-space: unset !important;
|
|
332
|
-
}
|
|
333
|
-
:deep(.ui-main-info-block-item-right-value) {
|
|
334
|
-
color: var(--backups-page-info-block-value-color);
|
|
335
|
-
}
|
|
336
|
-
:deep(.ui-main-info-block-item-right-open) {
|
|
337
|
-
display: none;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
@media (max-width: 1200px) {
|
|
343
|
-
.backups-page {
|
|
344
|
-
overflow-y: auto;
|
|
345
|
-
|
|
346
|
-
&.selected {
|
|
347
|
-
grid-template-columns: 1fr;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
.backups-details {
|
|
351
|
-
height: max-content;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
</style>
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="backups-context-menu-view">
|
|
3
|
-
<common-context
|
|
4
|
-
:action-loading="null"
|
|
5
|
-
:context-menu="contextMenu"
|
|
6
|
-
@select-item="onSelectContextMenuItem"
|
|
7
|
-
@hide="onHideContextMenu"
|
|
8
|
-
/>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script setup lang="ts">
|
|
13
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
14
|
-
import type {
|
|
15
|
-
UI_I_ContextMenu,
|
|
16
|
-
UI_I_ContextMenuItem,
|
|
17
|
-
} from '~/components/common/context/lib/models/interfaces'
|
|
18
|
-
import type { I_ContextData } from '~/components/common/pages/backups/backupsNew/lib/models/interfaces'
|
|
19
|
-
import { contextMenuItemsFunc } from '~/components/common/pages/backups/backupsNew/contextMenuView/lib/config/contextMenuItems'
|
|
20
|
-
|
|
21
|
-
const props = defineProps<{
|
|
22
|
-
contextData: I_ContextData
|
|
23
|
-
show: number
|
|
24
|
-
restoreBackupPermission: string
|
|
25
|
-
deleteBackupPermission: string
|
|
26
|
-
}>()
|
|
27
|
-
|
|
28
|
-
const emits = defineEmits<{
|
|
29
|
-
(event: 'select-action', value: string): void
|
|
30
|
-
}>()
|
|
31
|
-
|
|
32
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
33
|
-
|
|
34
|
-
const contextMenu = ref<UI_I_ContextMenu<'backup'>>({
|
|
35
|
-
x: -9999,
|
|
36
|
-
y: -9999,
|
|
37
|
-
id: '',
|
|
38
|
-
type: 'backup',
|
|
39
|
-
titleText: '',
|
|
40
|
-
titleIconClassName: '',
|
|
41
|
-
items: contextMenuItemsFunc(
|
|
42
|
-
localization.value,
|
|
43
|
-
props.restoreBackupPermission,
|
|
44
|
-
props.deleteBackupPermission
|
|
45
|
-
),
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
const showContextMenu = (data: I_ContextData): void => {
|
|
49
|
-
const event = data.event
|
|
50
|
-
const node = data.node
|
|
51
|
-
|
|
52
|
-
if (!event || !node) return
|
|
53
|
-
|
|
54
|
-
event.preventDefault()
|
|
55
|
-
|
|
56
|
-
contextMenu.value.x = event.clientX
|
|
57
|
-
contextMenu.value.y = event.clientY
|
|
58
|
-
contextMenu.value.id = '' + node.id
|
|
59
|
-
contextMenu.value.type = node.type
|
|
60
|
-
contextMenu.value.titleText = node.name
|
|
61
|
-
contextMenu.value.titleIconClassName = node.iconClassName
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
watch(
|
|
65
|
-
() => props.show,
|
|
66
|
-
() => {
|
|
67
|
-
showContextMenu(props.contextData)
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
const onHideContextMenu = (): void => {
|
|
72
|
-
contextMenu.value.x = -9999
|
|
73
|
-
contextMenu.value.y = -9999
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const onSelectContextMenuItem = (item: UI_I_ContextMenuItem): void => {
|
|
77
|
-
emits('select-action', item.actionType)
|
|
78
|
-
}
|
|
79
|
-
</script>
|
|
80
|
-
|
|
81
|
-
<style scoped lang="scss">
|
|
82
|
-
.backups-context-menu-view {
|
|
83
|
-
:deep(.menu-item) {
|
|
84
|
-
.context-icon {
|
|
85
|
-
display: none;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.item-ui-icon {
|
|
89
|
-
margin-right: 8px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&:last-child {
|
|
93
|
-
color: #ea3223;
|
|
94
|
-
|
|
95
|
-
.context-link:hover {
|
|
96
|
-
color: #ea3223;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
</style>
|
package/components/common/pages/backups/backupsNew/contextMenuView/lib/config/contextMenuItems.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const contextMenuItemsFunc = (
|
|
5
|
-
localization: UI_I_Localization,
|
|
6
|
-
restoreBackupPermission: string,
|
|
7
|
-
deleteBackupPermission: string
|
|
8
|
-
): UI_I_ContextMenuItem[] => [
|
|
9
|
-
{
|
|
10
|
-
key: useUniqueId(),
|
|
11
|
-
name: localization.common.restore,
|
|
12
|
-
actionType: 'restoreBackup',
|
|
13
|
-
iconClassName: '',
|
|
14
|
-
iconName: 'update',
|
|
15
|
-
testId: 'restore-backup-vm',
|
|
16
|
-
items: [],
|
|
17
|
-
permission: restoreBackupPermission,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
key: useUniqueId(),
|
|
21
|
-
name: localization.common.delete,
|
|
22
|
-
actionType: 'deleteBackup',
|
|
23
|
-
iconClassName: '',
|
|
24
|
-
iconName: 'delete',
|
|
25
|
-
testId: 'delete-backup-vm',
|
|
26
|
-
items: [],
|
|
27
|
-
permission: deleteBackupPermission,
|
|
28
|
-
},
|
|
29
|
-
]
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { UI_I_BackupsTreeNode } from '~/components/common/pages/backups/lib/models/interfaces'
|
|
2
|
-
|
|
3
|
-
export interface I_ContextData {
|
|
4
|
-
event: null | MouseEvent
|
|
5
|
-
node: null | UI_I_BackupsTreeNode
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface I_Context {
|
|
9
|
-
contextMenuShow: Ref<number>
|
|
10
|
-
contextMenu: Ref<I_ContextData>
|
|
11
|
-
showContextMenu: any
|
|
12
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
I_ContextData,
|
|
3
|
-
I_Context,
|
|
4
|
-
} from '~/components/common/pages/backups/backupsNew/lib/models/interfaces'
|
|
5
|
-
|
|
6
|
-
const contextMenuShow = ref<number>(0)
|
|
7
|
-
|
|
8
|
-
const contextMenu = ref<I_ContextData>({
|
|
9
|
-
event: null,
|
|
10
|
-
node: null,
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export function getContextMenu(): I_Context {
|
|
14
|
-
const showContextMenu = (data: I_ContextData | null): void => {
|
|
15
|
-
if (!data) return
|
|
16
|
-
|
|
17
|
-
data.event?.preventDefault()
|
|
18
|
-
|
|
19
|
-
contextMenu.value.event = data.event
|
|
20
|
-
contextMenu.value.node = data.node
|
|
21
|
-
contextMenuShow.value++
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
contextMenuShow,
|
|
26
|
-
contextMenu,
|
|
27
|
-
showContextMenu,
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { UI_I_InfoBlock } from '~/node_modules/bfg-uikit/components/ui/infoBlock/models/interfaces'
|
|
2
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
-
import type { UI_I_BackupsTreeNode } from '~/components/common/pages/backups/lib/models/interfaces'
|
|
4
|
-
|
|
5
|
-
export const constructDetails = (
|
|
6
|
-
localization: UI_I_Localization,
|
|
7
|
-
detailData: UI_I_BackupsTreeNode | null
|
|
8
|
-
): UI_I_InfoBlock[] =>
|
|
9
|
-
!detailData
|
|
10
|
-
? []
|
|
11
|
-
: [
|
|
12
|
-
{
|
|
13
|
-
label: localization.common.name,
|
|
14
|
-
value: detailData.name || '--',
|
|
15
|
-
items: [],
|
|
16
|
-
labelIcon: 'vsphere-icon-storage-system-refresh',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
label: localization.common.description,
|
|
20
|
-
value: detailData.description || 'empty-description',
|
|
21
|
-
items: [],
|
|
22
|
-
labelIcon: 'file',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: localization.common.timestamp,
|
|
26
|
-
value: detailData.timestamp || '--',
|
|
27
|
-
items: [],
|
|
28
|
-
labelIcon: 'clock',
|
|
29
|
-
},
|
|
30
|
-
]
|