bfg-common 1.5.732 → 1.5.733
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/common/backup/storage/actions/add/Old.vue +22 -1
- package/components/common/backup/storage/actions/add/steps/typeMode/TypeModeOld.vue +1 -48
- package/components/common/backup/storage/actions/add/steps/typeMode/tooltip/Tooltip.vue +33 -0
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/wizards/datastore/add/Old.vue +16 -0
- package/components/common/wizards/datastore/add/steps/typeMode/TypeModeOld.vue +1 -48
- package/components/common/wizards/datastore/add/steps/typeMode/tooltip/Tooltip.vue +33 -0
- package/package.json +1 -1
- package/components/common/vm/snapshots/DetailView.vue +0 -90
- package/components/common/vm/snapshots/Old.vue +0 -71
- package/components/common/vm/snapshots/Snapshots.vue +0 -82
- package/components/common/vm/snapshots/lib/models/types.ts +0 -8
- package/components/common/vm/snapshots/new/New.vue +0 -389
- package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +0 -96
- package/components/common/vm/snapshots/new/contextMenuView/lib/config/contextMenuItems.ts +0 -34
- package/components/common/vm/snapshots/new/lib/models/interfaces.ts +0 -12
- package/components/common/vm/snapshots/new/lib/utils/contextMenu.ts +0 -29
- package/components/common/vm/snapshots/new/lib/utils/details.ts +0 -48
- package/components/common/vm/snapshots/tools/Tools.vue +0 -56
- package/components/common/vm/snapshots/tools/lib/config/tabsPannel.ts +0 -39
- package/store/inventory/modules/snapshots/lib/models/interfaces.ts +0 -40
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="snapshot-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 { UI_I_ContextData } from '~/components/common/vm/snapshots/new/lib/models/interfaces'
|
|
19
|
-
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
20
|
-
import { contextMenuItemsFunc } from '~/components/common/vm/snapshots/new/contextMenuView/lib/config/contextMenuItems'
|
|
21
|
-
|
|
22
|
-
const props = defineProps<{
|
|
23
|
-
contextData: UI_I_ContextData
|
|
24
|
-
show: number
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
const emits = defineEmits<{
|
|
28
|
-
(event: 'select-action', value: UI_T_SnapshotActionType): void
|
|
29
|
-
}>()
|
|
30
|
-
|
|
31
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
32
|
-
|
|
33
|
-
const contextMenu = ref<UI_I_ContextMenu<'snapshot'>>({
|
|
34
|
-
x: -9999,
|
|
35
|
-
y: -9999,
|
|
36
|
-
id: '',
|
|
37
|
-
type: 'snapshot',
|
|
38
|
-
titleText: '',
|
|
39
|
-
titleIconClassName: '',
|
|
40
|
-
items: contextMenuItemsFunc(localization.value),
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
const showContextMenu = (data: UI_I_ContextData): void => {
|
|
44
|
-
const event = data.event
|
|
45
|
-
const node = data.node
|
|
46
|
-
|
|
47
|
-
if (!event || !node) return
|
|
48
|
-
|
|
49
|
-
event.preventDefault()
|
|
50
|
-
|
|
51
|
-
contextMenu.value.x = event.clientX
|
|
52
|
-
contextMenu.value.y = event.clientY
|
|
53
|
-
contextMenu.value.id = '' + node.id
|
|
54
|
-
contextMenu.value.type = node.type
|
|
55
|
-
contextMenu.value.titleText = node.name
|
|
56
|
-
contextMenu.value.titleIconClassName = node.iconClassName
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
watch(
|
|
60
|
-
() => props.show,
|
|
61
|
-
() => {
|
|
62
|
-
showContextMenu(props.contextData)
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
const onHideContextMenu = (): void => {
|
|
67
|
-
contextMenu.value.x = -9999
|
|
68
|
-
contextMenu.value.y = -9999
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
const onSelectContextMenuItem = (item: UI_I_ContextMenuItem): void => {
|
|
72
|
-
emits('select-action', item.actionType)
|
|
73
|
-
}
|
|
74
|
-
</script>
|
|
75
|
-
|
|
76
|
-
<style scoped lang="scss">
|
|
77
|
-
.snapshot-context-menu-view {
|
|
78
|
-
:deep(.menu-item) {
|
|
79
|
-
.context-icon {
|
|
80
|
-
display: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.item-ui-icon {
|
|
84
|
-
margin-right: 8px;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&:last-child {
|
|
88
|
-
color: #ea3223;
|
|
89
|
-
|
|
90
|
-
.context-link:hover {
|
|
91
|
-
color: #ea3223;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</style>
|
|
@@ -1,34 +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
|
-
): UI_I_ContextMenuItem[] => [
|
|
7
|
-
{
|
|
8
|
-
key: useUniqueId(),
|
|
9
|
-
name: localization.common.revert,
|
|
10
|
-
actionType: 'revert',
|
|
11
|
-
iconClassName: '',
|
|
12
|
-
iconName: 'revert',
|
|
13
|
-
testId: 'revert-snapshot-vm',
|
|
14
|
-
items: [],
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
key: useUniqueId(),
|
|
18
|
-
name: localization.common.edit,
|
|
19
|
-
actionType: 'edit',
|
|
20
|
-
iconClassName: '',
|
|
21
|
-
iconName: 'edit',
|
|
22
|
-
testId: 'edit-snapshot-vm',
|
|
23
|
-
items: [],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
key: useUniqueId(),
|
|
27
|
-
name: localization.common.delete,
|
|
28
|
-
actionType: 'delete',
|
|
29
|
-
iconClassName: '',
|
|
30
|
-
iconName: 'delete',
|
|
31
|
-
testId: 'delete-snapshot-vm',
|
|
32
|
-
items: [],
|
|
33
|
-
},
|
|
34
|
-
]
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { UI_I_SnapshotsDetails } from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
2
|
-
|
|
3
|
-
export interface UI_I_ContextData {
|
|
4
|
-
event: null | MouseEvent
|
|
5
|
-
node: null | UI_I_SnapshotsDetails
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface UI_I_Context {
|
|
9
|
-
contextMenuShow: Ref<number>
|
|
10
|
-
contextMenu: Ref<UI_I_ContextData>
|
|
11
|
-
showContextMenu: any
|
|
12
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_ContextData,
|
|
3
|
-
UI_I_Context,
|
|
4
|
-
} from '~/components/common/vm/snapshots/new/lib/models/interfaces'
|
|
5
|
-
|
|
6
|
-
const contextMenuShow = ref<number>(0)
|
|
7
|
-
|
|
8
|
-
const contextMenu = ref<UI_I_ContextData>({
|
|
9
|
-
event: null,
|
|
10
|
-
node: null,
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
export function getContextMenu(): UI_I_Context {
|
|
14
|
-
const showContextMenu = (data: UI_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,48 +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_SnapshotsDetails } from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
4
|
-
|
|
5
|
-
export const constructDetails = (
|
|
6
|
-
localization: UI_I_Localization,
|
|
7
|
-
detailData: UI_I_SnapshotsDetails | null
|
|
8
|
-
): UI_I_InfoBlock[] =>
|
|
9
|
-
!detailData
|
|
10
|
-
? []
|
|
11
|
-
: [
|
|
12
|
-
{
|
|
13
|
-
label: localization.common.name,
|
|
14
|
-
value: detailData.name || '--',
|
|
15
|
-
items: [],
|
|
16
|
-
labelIcon: 'icon-snapshotTake',
|
|
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
|
-
{
|
|
31
|
-
label: localization.common.size,
|
|
32
|
-
value: detailData.size || '--',
|
|
33
|
-
items: [],
|
|
34
|
-
labelIcon: 'disk',
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: localization.snapshots.snapshotVMMemory,
|
|
38
|
-
value: detailData.snapshot_the_virtual_machines_memory || '--',
|
|
39
|
-
items: [],
|
|
40
|
-
labelIcon: 'settings',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
label: localization.snapshots.quiesceGuestFileSystem,
|
|
44
|
-
value: detailData.quiesce_guest_file_system || '--',
|
|
45
|
-
items: [],
|
|
46
|
-
labelIcon: 'settings',
|
|
47
|
-
},
|
|
48
|
-
]
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="snapshot-actions grid py-0 px-6">
|
|
3
|
-
<button
|
|
4
|
-
id="take-snapshot-button"
|
|
5
|
-
v-permission="'VirtualMachines.TakeSnapshot'"
|
|
6
|
-
:disabled="isDisabled"
|
|
7
|
-
data-id="take-snapshot-button"
|
|
8
|
-
class="btn btn-primary btn-sm"
|
|
9
|
-
@click="onSelect('take')"
|
|
10
|
-
>
|
|
11
|
-
{{ localization.common.takeSnapshot }}...
|
|
12
|
-
</button>
|
|
13
|
-
<atoms-tabs
|
|
14
|
-
:items="tabs"
|
|
15
|
-
test-id="vm-snapshot-tabs"
|
|
16
|
-
size="small"
|
|
17
|
-
class="tabs"
|
|
18
|
-
@change="onSelect"
|
|
19
|
-
/>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script setup lang="ts">
|
|
24
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
25
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
26
|
-
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
27
|
-
import { snapshotsTabsFunc } from '~/components/common/vm/snapshots/tools/lib/config/tabsPannel'
|
|
28
|
-
|
|
29
|
-
const props = defineProps<{
|
|
30
|
-
snapshotsCount: number
|
|
31
|
-
snapshotsLoading: boolean
|
|
32
|
-
}>()
|
|
33
|
-
|
|
34
|
-
const emits = defineEmits<{
|
|
35
|
-
(event: 'select', value: UI_T_SnapshotActionType): void
|
|
36
|
-
}>()
|
|
37
|
-
|
|
38
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
39
|
-
|
|
40
|
-
const tabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
41
|
-
snapshotsTabsFunc(localization.value, isDisabled.value, props.snapshotsCount)
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
const onSelect = (action: UI_T_SnapshotActionType): void => {
|
|
45
|
-
emits('select', action)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const isDisabled = computed<boolean>(() => props.snapshotsLoading)
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
<style scoped lang="scss">
|
|
52
|
-
.snapshot-actions {
|
|
53
|
-
grid-template-columns: auto 1fr;
|
|
54
|
-
align-items: baseline;
|
|
55
|
-
}
|
|
56
|
-
</style>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const snapshotsTabsFunc = (
|
|
5
|
-
localization: UI_I_Localization,
|
|
6
|
-
isDisabled: boolean,
|
|
7
|
-
snapshotsCount: number
|
|
8
|
-
): UI_I_CollapseNavItem[] => {
|
|
9
|
-
return [
|
|
10
|
-
{
|
|
11
|
-
text: localization.common.revert.toUpperCase(),
|
|
12
|
-
value: 'revert',
|
|
13
|
-
disabled: isDisabled || !snapshotsCount,
|
|
14
|
-
testId: 'snapshots-revert',
|
|
15
|
-
permission: 'VirtualMachines.RevertSnapshot'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
text: localization.common.edit.toUpperCase(),
|
|
19
|
-
value: 'edit',
|
|
20
|
-
disabled: isDisabled || !snapshotsCount,
|
|
21
|
-
testId: 'snapshots-edit',
|
|
22
|
-
permission: 'VirtualMachines.UpdateSnapshot'
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
text: localization.common.delete.toUpperCase(),
|
|
26
|
-
value: 'delete',
|
|
27
|
-
disabled: isDisabled || !snapshotsCount,
|
|
28
|
-
testId: 'snapshots-delete',
|
|
29
|
-
permission: 'VirtualMachines.DeleteSnapshot'
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
text: localization.common.deleteAll.toUpperCase(),
|
|
33
|
-
value: 'delete_all',
|
|
34
|
-
disabled: isDisabled || !snapshotsCount,
|
|
35
|
-
testId: 'snapshots-delete-all',
|
|
36
|
-
permission: 'VirtualMachines.DeleteAllSnapshots'
|
|
37
|
-
},
|
|
38
|
-
]
|
|
39
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export interface UI_API_I_SnapshotsDetails {
|
|
2
|
-
name: string
|
|
3
|
-
description: string
|
|
4
|
-
timestamp: string
|
|
5
|
-
size: string
|
|
6
|
-
snapshot_the_virtual_machines_memory: string
|
|
7
|
-
quiesce_guest_file_system: string
|
|
8
|
-
}
|
|
9
|
-
export interface UI_I_SnapshotsDetails extends UI_API_I_SnapshotsDetails {
|
|
10
|
-
id: number
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface UI_API_I_SnapshotsTreeNode {
|
|
14
|
-
id: number | string
|
|
15
|
-
name: string
|
|
16
|
-
description: string
|
|
17
|
-
parent_id: number | string
|
|
18
|
-
timestamp: number | string
|
|
19
|
-
size?: number
|
|
20
|
-
quiesce_fs?: boolean
|
|
21
|
-
vm_description: string
|
|
22
|
-
disks?: {
|
|
23
|
-
source: string
|
|
24
|
-
target: string
|
|
25
|
-
}[]
|
|
26
|
-
memory?: {
|
|
27
|
-
enabled: boolean
|
|
28
|
-
source: string
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export interface UI_I_SnapshotsTreeNode extends UI_API_I_SnapshotsTreeNode {
|
|
33
|
-
type: 'snapshot' | 'location'
|
|
34
|
-
iconClassName: string
|
|
35
|
-
hasNodes: boolean
|
|
36
|
-
isActive: boolean
|
|
37
|
-
nodesShow: boolean
|
|
38
|
-
nodes: UI_I_SnapshotsTreeNode[]
|
|
39
|
-
testId?: string
|
|
40
|
-
}
|