bfg-common 1.5.732 → 1.5.735
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/CreateBackup.vue +6 -10
- package/components/common/pages/backups/modals/createBackup/Old.vue +8 -10
- 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/datastores/Datastores.vue +6 -0
- package/components/common/pages/backups/modals/createBackup/datastores/DatastoresOld.vue +22 -2
- package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +6 -0
- package/components/common/pages/backups/modals/createBackup/disks/DisksOld.vue +22 -1
- package/components/common/pages/backups/modals/createBackup/general/General.vue +7 -1
- package/components/common/pages/backups/modals/createBackup/general/GeneralOld.vue +17 -0
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/pages/backups/modals/createBackup/lib/validation/validations.ts +0 -8
- package/components/common/vm/snapshots/DetailView.vue +90 -90
- package/components/common/vm/snapshots/Old.vue +71 -71
- package/components/common/vm/snapshots/Snapshots.vue +82 -82
- package/components/common/vm/snapshots/lib/models/types.ts +8 -8
- package/components/common/vm/snapshots/new/New.vue +389 -389
- package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +96 -96
- package/components/common/vm/snapshots/new/contextMenuView/lib/config/contextMenuItems.ts +34 -34
- package/components/common/vm/snapshots/new/lib/models/interfaces.ts +12 -12
- package/components/common/vm/snapshots/new/lib/utils/contextMenu.ts +29 -29
- package/components/common/vm/snapshots/new/lib/utils/details.ts +48 -48
- package/components/common/vm/snapshots/tools/Tools.vue +56 -56
- 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/store/inventory/modules/snapshots/lib/models/interfaces.ts +45 -40
|
@@ -1,96 +1,96 @@
|
|
|
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
|
+
<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 +1,34 @@
|
|
|
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
|
+
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 +1,12 @@
|
|
|
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
|
+
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 +1,29 @@
|
|
|
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
|
+
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 +1,48 @@
|
|
|
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
|
+
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 +1,56 @@
|
|
|
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
|
+
<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>
|
|
@@ -12,6 +12,16 @@
|
|
|
12
12
|
@hide="onHideModal"
|
|
13
13
|
@submit="onCreateDatastore"
|
|
14
14
|
>
|
|
15
|
+
<template #description="{ selectedStep }">
|
|
16
|
+
<div class="add-datastore__wizard-description">
|
|
17
|
+
<h2>{{ selectedStep.subTitle }}</h2>
|
|
18
|
+
|
|
19
|
+
<common-wizards-datastore-add-steps-type-mode-tooltip
|
|
20
|
+
v-if="selectedStep.id === dynamicSteps.type"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
15
25
|
<template #modalBody="{ selectedStep }">
|
|
16
26
|
<common-wizards-datastore-add-steps-type-mode
|
|
17
27
|
v-if="selectedStep.id === dynamicSteps.type"
|
|
@@ -112,6 +122,12 @@ const onCreateDatastore = (): void => emits('submit')
|
|
|
112
122
|
height: 100%;
|
|
113
123
|
padding-left: 24px;
|
|
114
124
|
}
|
|
125
|
+
|
|
126
|
+
.add-datastore__wizard-description {
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
gap: 10px;
|
|
130
|
+
}
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
.finish-block {
|
|
@@ -1,31 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="datastore-types">
|
|
3
|
-
<div class="header-row">
|
|
4
|
-
<span class="datastore-types__subtitle">
|
|
5
|
-
{{ localization.common.specifyDatastoreType }}
|
|
6
|
-
</span>
|
|
7
|
-
<div id="type-select-help-icon" class="signpost-container relative">
|
|
8
|
-
<atoms-the-icon
|
|
9
|
-
data-id="toggle-type-select-help-icon"
|
|
10
|
-
fill="#0072a3"
|
|
11
|
-
width="24px"
|
|
12
|
-
height="24px"
|
|
13
|
-
name="info-circle"
|
|
14
|
-
@click="isShowTypeHelp = !isShowTypeHelp"
|
|
15
|
-
/>
|
|
16
|
-
<atoms-tooltip-signpost
|
|
17
|
-
v-if="isShowTypeHelp"
|
|
18
|
-
elem-id="type-select-help-icon"
|
|
19
|
-
test-id="select-datastore-type"
|
|
20
|
-
@hide="isShowTypeHelp = false"
|
|
21
|
-
>
|
|
22
|
-
<p class="help-desc">
|
|
23
|
-
{{ localization.common.datastoreTypeHelpDesc }}
|
|
24
|
-
</p>
|
|
25
|
-
</atoms-tooltip-signpost>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
3
|
<common-select-radio-group
|
|
30
4
|
v-model="datastoreTypeModeLocal"
|
|
31
5
|
:options="props.options"
|
|
@@ -35,7 +9,6 @@
|
|
|
35
9
|
</template>
|
|
36
10
|
|
|
37
11
|
<script lang="ts" setup>
|
|
38
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
39
12
|
import type { UI_I_RadioOption } from '~/components/common/select/radio/lib/models/interfaces'
|
|
40
13
|
|
|
41
14
|
const datastoreTypeModeLocal = defineModel<number>({ required: true })
|
|
@@ -43,29 +16,9 @@ const props = defineProps<{
|
|
|
43
16
|
options: UI_I_RadioOption[]
|
|
44
17
|
}>()
|
|
45
18
|
|
|
46
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
47
|
-
|
|
48
19
|
const onChangeType = (): void => {
|
|
49
20
|
// model.value.name = 'Datastore' // default value is 'Datastore' every time
|
|
50
21
|
}
|
|
51
|
-
|
|
52
|
-
const isShowTypeHelp = ref<boolean>(false)
|
|
53
22
|
</script>
|
|
54
23
|
|
|
55
|
-
<style lang="scss" scoped>
|
|
56
|
-
.datastore-types {
|
|
57
|
-
.signpost-container {
|
|
58
|
-
display: flex;
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
|
|
61
|
-
.help-desc-container {
|
|
62
|
-
max-width: 350px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
.header-row {
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
gap: 10px;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
</style>
|
|
24
|
+
<style lang="scss" scoped></style>
|