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,11 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="disks h-full">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="props.alertMessages.length"
|
|
5
|
+
status="alert-danger"
|
|
6
|
+
:items="props.alertMessages"
|
|
7
|
+
test-id="create-backup-disks-alert"
|
|
8
|
+
@remove="onRemoveErrors"
|
|
9
|
+
/>
|
|
10
|
+
|
|
3
11
|
<common-pages-backups-modals-create-backup-disks-table-view-old-table-view
|
|
4
12
|
v-model:selected="model.disk_devices"
|
|
5
13
|
:data-table="props.disks"
|
|
6
14
|
:loading="props.disksLoading"
|
|
7
15
|
:total-items="props.disks.length"
|
|
8
16
|
:total-pages="1"
|
|
17
|
+
class="disks-table"
|
|
9
18
|
/>
|
|
10
19
|
</div>
|
|
11
20
|
</template>
|
|
@@ -15,14 +24,26 @@ import type {
|
|
|
15
24
|
UI_I_CreateBackupForm,
|
|
16
25
|
UI_I_Pvm
|
|
17
26
|
} from "~/components/common/pages/backups/modals/lib/models/interfaces";
|
|
27
|
+
import { dynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/config/steps'
|
|
18
28
|
|
|
19
29
|
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
20
30
|
|
|
21
31
|
const props = defineProps<{
|
|
22
32
|
disks: UI_I_Pvm['disk_devices']
|
|
23
33
|
disksLoading: boolean
|
|
34
|
+
alertMessages: string[]
|
|
35
|
+
}>()
|
|
36
|
+
const emits = defineEmits<{
|
|
37
|
+
(event: 'remove-validation-errors', value: number): void
|
|
24
38
|
}>()
|
|
25
39
|
|
|
40
|
+
const onRemoveErrors = (): void => {
|
|
41
|
+
emits('remove-validation-errors', dynamicSteps.disks)
|
|
42
|
+
}
|
|
26
43
|
</script>
|
|
27
44
|
|
|
28
|
-
<style lang="scss" scoped
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
.disks-table {
|
|
47
|
+
margin-top: 5px;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
v-else
|
|
10
10
|
v-model="model"
|
|
11
11
|
:show="props.show"
|
|
12
|
+
:alert-messages="props.alertMessages"
|
|
13
|
+
@remove-validation-errors="emits('remove-validation-errors', $event)"
|
|
12
14
|
/>
|
|
13
15
|
</template>
|
|
14
16
|
|
|
@@ -21,7 +23,11 @@ const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
|
21
23
|
|
|
22
24
|
const props = defineProps<{
|
|
23
25
|
show: boolean
|
|
24
|
-
messagesFields
|
|
26
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
27
|
+
alertMessages: string[]
|
|
28
|
+
}>()
|
|
29
|
+
const emits = defineEmits<{
|
|
30
|
+
(event: 'remove-validation-errors', value: number): void
|
|
25
31
|
}>()
|
|
26
32
|
|
|
27
33
|
const { $store }: any = useNuxtApp()
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="general">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="props.alertMessages.length"
|
|
5
|
+
status="alert-danger"
|
|
6
|
+
:items="props.alertMessages"
|
|
7
|
+
test-id="create-backup-name-alert"
|
|
8
|
+
@remove="onRemoveErrors"
|
|
9
|
+
/>
|
|
10
|
+
|
|
3
11
|
<form @submit.prevent>
|
|
4
12
|
<div class="field flex pt-4">
|
|
5
13
|
<label for="general-name">{{ localization.common.name }}:</label>
|
|
@@ -29,11 +37,16 @@
|
|
|
29
37
|
<script lang="ts" setup>
|
|
30
38
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
39
|
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
40
|
+
import { dynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/config/steps'
|
|
32
41
|
|
|
33
42
|
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
34
43
|
|
|
35
44
|
const props = defineProps<{
|
|
36
45
|
show: boolean
|
|
46
|
+
alertMessages: string[]
|
|
47
|
+
}>()
|
|
48
|
+
const emits = defineEmits<{
|
|
49
|
+
(event: 'remove-validation-errors', value: number): void
|
|
37
50
|
}>()
|
|
38
51
|
|
|
39
52
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -51,6 +64,10 @@ watch(
|
|
|
51
64
|
}, 0)
|
|
52
65
|
}
|
|
53
66
|
)
|
|
67
|
+
|
|
68
|
+
const onRemoveErrors = (): void => {
|
|
69
|
+
emits('remove-validation-errors', dynamicSteps.general)
|
|
70
|
+
}
|
|
54
71
|
</script>
|
|
55
72
|
|
|
56
73
|
<style lang="scss" scoped>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface UI_I_DynamicSteps {
|
|
2
|
-
general: number
|
|
3
|
-
disks: number
|
|
4
|
-
datastores: number
|
|
5
|
-
configuration: number
|
|
6
|
-
readyComplete: number
|
|
7
|
-
schedulingOptions: number
|
|
8
|
-
}
|
|
1
|
+
export interface UI_I_DynamicSteps {
|
|
2
|
+
general: number
|
|
3
|
+
disks: number
|
|
4
|
+
datastores: number
|
|
5
|
+
configuration: number
|
|
6
|
+
readyComplete: number
|
|
7
|
+
schedulingOptions: number
|
|
8
|
+
}
|
|
@@ -76,8 +76,6 @@ export const checkDisks = (
|
|
|
76
76
|
backupForm: UI_I_CreateBackupForm,
|
|
77
77
|
wizard: Wizard,
|
|
78
78
|
localization: UI_I_Localization,
|
|
79
|
-
showValidationErrors: (data: string[]) => void,
|
|
80
|
-
onRemoveValidationErrors: () => void
|
|
81
79
|
): UI_I_ValidationReturn => {
|
|
82
80
|
let stepHasError = false
|
|
83
81
|
const isValidStores = !!backupForm?.disk_devices.length
|
|
@@ -87,10 +85,8 @@ export const checkDisks = (
|
|
|
87
85
|
fieldMessage: localization.common.diskIsRequired,
|
|
88
86
|
alertMessage: localization.common.diskIsRequired
|
|
89
87
|
})
|
|
90
|
-
showValidationErrors([localization.common.diskIsRequired])
|
|
91
88
|
} else if (wizard.hasMessage(dynamicSteps.disks, 'disk_devices')) {
|
|
92
89
|
value = wizard.removeValidation(dynamicSteps.disks, 'disk_devices', value)
|
|
93
|
-
onRemoveValidationErrors()
|
|
94
90
|
}
|
|
95
91
|
|
|
96
92
|
return {
|
|
@@ -104,8 +100,6 @@ export const checkDatastore = (
|
|
|
104
100
|
backupForm: UI_I_CreateBackupForm,
|
|
105
101
|
wizard: Wizard,
|
|
106
102
|
localization: UI_I_Localization,
|
|
107
|
-
showValidationErrors: (data: string[]) => void,
|
|
108
|
-
onRemoveValidationErrors: () => void
|
|
109
103
|
): UI_I_ValidationReturn => {
|
|
110
104
|
let stepHasError = false
|
|
111
105
|
const isValidStorage = !!backupForm?.backup_storage.length
|
|
@@ -115,10 +109,8 @@ export const checkDatastore = (
|
|
|
115
109
|
fieldMessage: localization.common.datastoreIsRequired,
|
|
116
110
|
alertMessage: localization.common.datastoreIsRequired
|
|
117
111
|
})
|
|
118
|
-
showValidationErrors([localization.common.datastoreIsRequired])
|
|
119
112
|
} else if (wizard.hasMessage(dynamicSteps.datastores, 'backup_storage')) {
|
|
120
113
|
value = wizard.removeValidation(dynamicSteps.datastores, 'backup_storage', value)
|
|
121
|
-
onRemoveValidationErrors()
|
|
122
114
|
}
|
|
123
115
|
|
|
124
116
|
return { stepHasError, newValue: value }
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="detail-view overflow-auto py-0 px-6">
|
|
3
|
-
<table
|
|
4
|
-
v-if="detailData"
|
|
5
|
-
class="table table-noborder"
|
|
6
|
-
data-id="detail-view-table"
|
|
7
|
-
>
|
|
8
|
-
<tbody>
|
|
9
|
-
<tr>
|
|
10
|
-
<td class="left">{{ localization.common.name }}</td>
|
|
11
|
-
<td class="left snapshot-name-label" data-id="vm-snapshot-name">
|
|
12
|
-
{{ detailData.name }}
|
|
13
|
-
</td>
|
|
14
|
-
</tr>
|
|
15
|
-
<tr>
|
|
16
|
-
<td class="left">{{ localization.common.description }}</td>
|
|
17
|
-
<td
|
|
18
|
-
class="left snapshot-name-label"
|
|
19
|
-
data-id="vm-snapshot-description"
|
|
20
|
-
>
|
|
21
|
-
{{ detailData.description }}
|
|
22
|
-
</td>
|
|
23
|
-
</tr>
|
|
24
|
-
<tr>
|
|
25
|
-
<td class="left">{{ localization.common.timestamp }}</td>
|
|
26
|
-
<td class="left snapshot-name-label" data-id="vm-snapshot-timestamp">
|
|
27
|
-
{{ detailData.timestamp }}
|
|
28
|
-
</td>
|
|
29
|
-
</tr>
|
|
30
|
-
<tr>
|
|
31
|
-
<td class="left">{{ localization.common.size }}</td>
|
|
32
|
-
<td class="left snapshot-name-label">{{ detailData.size }}</td>
|
|
33
|
-
</tr>
|
|
34
|
-
<tr>
|
|
35
|
-
<td class="left">
|
|
36
|
-
{{ localization.common.snapshotTheVirtualMachinesMemory }}
|
|
37
|
-
</td>
|
|
38
|
-
<td class="left snapshot-name-label" data-id="vm-snapshot-of-memory">
|
|
39
|
-
{{ detailData.snapshot_the_virtual_machines_memory }}
|
|
40
|
-
</td>
|
|
41
|
-
</tr>
|
|
42
|
-
<tr>
|
|
43
|
-
<td class="left">
|
|
44
|
-
{{ localization.common.quiesceGuestFileSystem }}
|
|
45
|
-
</td>
|
|
46
|
-
<td
|
|
47
|
-
class="left snapshot-name-label"
|
|
48
|
-
data-id="vm-snapshot-file-system"
|
|
49
|
-
>
|
|
50
|
-
{{ detailData.quiesce_guest_file_system }}
|
|
51
|
-
</td>
|
|
52
|
-
</tr>
|
|
53
|
-
</tbody>
|
|
54
|
-
</table>
|
|
55
|
-
</div>
|
|
56
|
-
</template>
|
|
57
|
-
|
|
58
|
-
<script setup lang="ts">
|
|
59
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
60
|
-
import type { UI_I_SnapshotsDetails } from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
61
|
-
|
|
62
|
-
const props = defineProps<{
|
|
63
|
-
detail: UI_I_SnapshotsDetails | null
|
|
64
|
-
}>()
|
|
65
|
-
|
|
66
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
67
|
-
|
|
68
|
-
const detailData = ref<any | null>(null)
|
|
69
|
-
watch(
|
|
70
|
-
() => props.detail,
|
|
71
|
-
(newValue) => {
|
|
72
|
-
if (!newValue) return
|
|
73
|
-
|
|
74
|
-
detailData.value = newValue
|
|
75
|
-
},
|
|
76
|
-
{ immediate: true, deep: true }
|
|
77
|
-
)
|
|
78
|
-
</script>
|
|
79
|
-
|
|
80
|
-
<style scoped lang="scss">
|
|
81
|
-
.detail-view {
|
|
82
|
-
width: 50%;
|
|
83
|
-
|
|
84
|
-
.table {
|
|
85
|
-
.left:not(.snapshot-name-label) {
|
|
86
|
-
width: 320px;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="detail-view overflow-auto py-0 px-6">
|
|
3
|
+
<table
|
|
4
|
+
v-if="detailData"
|
|
5
|
+
class="table table-noborder"
|
|
6
|
+
data-id="detail-view-table"
|
|
7
|
+
>
|
|
8
|
+
<tbody>
|
|
9
|
+
<tr>
|
|
10
|
+
<td class="left">{{ localization.common.name }}</td>
|
|
11
|
+
<td class="left snapshot-name-label" data-id="vm-snapshot-name">
|
|
12
|
+
{{ detailData.name }}
|
|
13
|
+
</td>
|
|
14
|
+
</tr>
|
|
15
|
+
<tr>
|
|
16
|
+
<td class="left">{{ localization.common.description }}</td>
|
|
17
|
+
<td
|
|
18
|
+
class="left snapshot-name-label"
|
|
19
|
+
data-id="vm-snapshot-description"
|
|
20
|
+
>
|
|
21
|
+
{{ detailData.description }}
|
|
22
|
+
</td>
|
|
23
|
+
</tr>
|
|
24
|
+
<tr>
|
|
25
|
+
<td class="left">{{ localization.common.timestamp }}</td>
|
|
26
|
+
<td class="left snapshot-name-label" data-id="vm-snapshot-timestamp">
|
|
27
|
+
{{ detailData.timestamp }}
|
|
28
|
+
</td>
|
|
29
|
+
</tr>
|
|
30
|
+
<tr>
|
|
31
|
+
<td class="left">{{ localization.common.size }}</td>
|
|
32
|
+
<td class="left snapshot-name-label">{{ detailData.size }}</td>
|
|
33
|
+
</tr>
|
|
34
|
+
<tr>
|
|
35
|
+
<td class="left">
|
|
36
|
+
{{ localization.common.snapshotTheVirtualMachinesMemory }}
|
|
37
|
+
</td>
|
|
38
|
+
<td class="left snapshot-name-label" data-id="vm-snapshot-of-memory">
|
|
39
|
+
{{ detailData.snapshot_the_virtual_machines_memory }}
|
|
40
|
+
</td>
|
|
41
|
+
</tr>
|
|
42
|
+
<tr>
|
|
43
|
+
<td class="left">
|
|
44
|
+
{{ localization.common.quiesceGuestFileSystem }}
|
|
45
|
+
</td>
|
|
46
|
+
<td
|
|
47
|
+
class="left snapshot-name-label"
|
|
48
|
+
data-id="vm-snapshot-file-system"
|
|
49
|
+
>
|
|
50
|
+
{{ detailData.quiesce_guest_file_system }}
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
</tbody>
|
|
54
|
+
</table>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script setup lang="ts">
|
|
59
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
60
|
+
import type { UI_I_SnapshotsDetails } from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
61
|
+
|
|
62
|
+
const props = defineProps<{
|
|
63
|
+
detail: UI_I_SnapshotsDetails | null
|
|
64
|
+
}>()
|
|
65
|
+
|
|
66
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
67
|
+
|
|
68
|
+
const detailData = ref<any | null>(null)
|
|
69
|
+
watch(
|
|
70
|
+
() => props.detail,
|
|
71
|
+
(newValue) => {
|
|
72
|
+
if (!newValue) return
|
|
73
|
+
|
|
74
|
+
detailData.value = newValue
|
|
75
|
+
},
|
|
76
|
+
{ immediate: true, deep: true }
|
|
77
|
+
)
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<style scoped lang="scss">
|
|
81
|
+
.detail-view {
|
|
82
|
+
width: 50%;
|
|
83
|
+
|
|
84
|
+
.table {
|
|
85
|
+
.left:not(.snapshot-name-label) {
|
|
86
|
+
width: 320px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="main-content-snapshots h-full overflow-hidden">
|
|
3
|
-
<common-vm-snapshots-tools
|
|
4
|
-
:snapshots-count="props.snapshotsTree.length"
|
|
5
|
-
:snapshots-loading="props.snapshotsLoading"
|
|
6
|
-
@select="emits('show-modal', $event)"
|
|
7
|
-
/>
|
|
8
|
-
|
|
9
|
-
<atoms-loader-pre-loader
|
|
10
|
-
v-show="props.snapshotsLoading"
|
|
11
|
-
id="loader"
|
|
12
|
-
class="snapshots-loading w-full h-full flex items-center justify-center"
|
|
13
|
-
test-id="snapshots-tree-spinner"
|
|
14
|
-
show
|
|
15
|
-
/>
|
|
16
|
-
<div class="fill-parent w-full h-full">
|
|
17
|
-
<div
|
|
18
|
-
v-if="props.snapshotsTree.length"
|
|
19
|
-
class="snapshot-view mt-1 flex w-full"
|
|
20
|
-
>
|
|
21
|
-
<common-tree-view
|
|
22
|
-
:loading="props.snapshotsLoading"
|
|
23
|
-
:nodes="props.snapshotsTree"
|
|
24
|
-
@select-node="emits('select-node', $event)"
|
|
25
|
-
@show-nodes="emits('show-nodes', $event)"
|
|
26
|
-
/>
|
|
27
|
-
<common-vm-snapshots-detail-view :detail="props.detailData" />
|
|
28
|
-
</div>
|
|
29
|
-
<div v-else class="empty-block flex items-center justify-center w-full">
|
|
30
|
-
{{ localization.common.noSnapshotAvailable }}
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script setup lang="ts">
|
|
37
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
38
|
-
import type {
|
|
39
|
-
UI_I_SnapshotsDetails,
|
|
40
|
-
UI_I_SnapshotsTreeNode,
|
|
41
|
-
} from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
42
|
-
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
43
|
-
|
|
44
|
-
const props = defineProps<{
|
|
45
|
-
snapshotsTree: UI_I_SnapshotsTreeNode[]
|
|
46
|
-
snapshotsLoading: boolean
|
|
47
|
-
detailData: UI_I_SnapshotsDetails | null
|
|
48
|
-
}>()
|
|
49
|
-
|
|
50
|
-
const emits = defineEmits<{
|
|
51
|
-
(event: 'show-modal', value: UI_T_SnapshotActionType): void
|
|
52
|
-
(event: 'select-node', value: UI_I_SnapshotsTreeNode): void
|
|
53
|
-
(event: 'show-nodes', value: string): void
|
|
54
|
-
}>()
|
|
55
|
-
|
|
56
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<style scoped lang="scss">
|
|
60
|
-
.main-content-snapshots {
|
|
61
|
-
padding: 10px 5px 10px 0;
|
|
62
|
-
|
|
63
|
-
.fill-parent {
|
|
64
|
-
overflow: visible;
|
|
65
|
-
|
|
66
|
-
.snapshot-view {
|
|
67
|
-
height: 90%;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="main-content-snapshots h-full overflow-hidden">
|
|
3
|
+
<common-vm-snapshots-tools
|
|
4
|
+
:snapshots-count="props.snapshotsTree.length"
|
|
5
|
+
:snapshots-loading="props.snapshotsLoading"
|
|
6
|
+
@select="emits('show-modal', $event)"
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<atoms-loader-pre-loader
|
|
10
|
+
v-show="props.snapshotsLoading"
|
|
11
|
+
id="loader"
|
|
12
|
+
class="snapshots-loading w-full h-full flex items-center justify-center"
|
|
13
|
+
test-id="snapshots-tree-spinner"
|
|
14
|
+
show
|
|
15
|
+
/>
|
|
16
|
+
<div class="fill-parent w-full h-full">
|
|
17
|
+
<div
|
|
18
|
+
v-if="props.snapshotsTree.length"
|
|
19
|
+
class="snapshot-view mt-1 flex w-full"
|
|
20
|
+
>
|
|
21
|
+
<common-tree-view
|
|
22
|
+
:loading="props.snapshotsLoading"
|
|
23
|
+
:nodes="props.snapshotsTree"
|
|
24
|
+
@select-node="emits('select-node', $event)"
|
|
25
|
+
@show-nodes="emits('show-nodes', $event)"
|
|
26
|
+
/>
|
|
27
|
+
<common-vm-snapshots-detail-view :detail="props.detailData" />
|
|
28
|
+
</div>
|
|
29
|
+
<div v-else class="empty-block flex items-center justify-center w-full">
|
|
30
|
+
{{ localization.common.noSnapshotAvailable }}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
38
|
+
import type {
|
|
39
|
+
UI_I_SnapshotsDetails,
|
|
40
|
+
UI_I_SnapshotsTreeNode,
|
|
41
|
+
} from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
42
|
+
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
43
|
+
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
snapshotsTree: UI_I_SnapshotsTreeNode[]
|
|
46
|
+
snapshotsLoading: boolean
|
|
47
|
+
detailData: UI_I_SnapshotsDetails | null
|
|
48
|
+
}>()
|
|
49
|
+
|
|
50
|
+
const emits = defineEmits<{
|
|
51
|
+
(event: 'show-modal', value: UI_T_SnapshotActionType): void
|
|
52
|
+
(event: 'select-node', value: UI_I_SnapshotsTreeNode): void
|
|
53
|
+
(event: 'show-nodes', value: string): void
|
|
54
|
+
}>()
|
|
55
|
+
|
|
56
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style scoped lang="scss">
|
|
60
|
+
.main-content-snapshots {
|
|
61
|
+
padding: 10px 5px 10px 0;
|
|
62
|
+
|
|
63
|
+
.fill-parent {
|
|
64
|
+
overflow: visible;
|
|
65
|
+
|
|
66
|
+
.snapshot-view {
|
|
67
|
+
height: 90%;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="currentComponent"
|
|
4
|
-
:snapshots-tree="props.snapshotsTree"
|
|
5
|
-
:snapshots-loading="props.snapshotsLoading"
|
|
6
|
-
:detail-data="detailData"
|
|
7
|
-
@show-modal="onShowModal"
|
|
8
|
-
@select-node="onSelectNode"
|
|
9
|
-
@show-nodes="onShowNodes"
|
|
10
|
-
/>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script setup lang="ts">
|
|
14
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
15
|
-
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
16
|
-
import type {
|
|
17
|
-
UI_I_SnapshotsDetails,
|
|
18
|
-
UI_I_SnapshotsTreeNode,
|
|
19
|
-
} from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
20
|
-
|
|
21
|
-
const props = defineProps<{
|
|
22
|
-
snapshotsTree: UI_I_SnapshotsTreeNode
|
|
23
|
-
snapshotsLoading: boolean
|
|
24
|
-
}>()
|
|
25
|
-
|
|
26
|
-
const emits = defineEmits<{
|
|
27
|
-
(event: 'select-node', value: UI_I_SnapshotsTreeNode): void
|
|
28
|
-
(event: 'show-nodes', value: string): void
|
|
29
|
-
(event: 'show-modal', value: UI_T_SnapshotActionType): void
|
|
30
|
-
}>()
|
|
31
|
-
|
|
32
|
-
const { $recursion, $store }: any = useNuxtApp()
|
|
33
|
-
|
|
34
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
35
|
-
|
|
36
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
37
|
-
const currentComponent = computed(() =>
|
|
38
|
-
isNewView.value
|
|
39
|
-
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
40
|
-
: defineAsyncComponent(() => import('./Old.vue'))
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
const detailData = computed<UI_I_SnapshotsDetails | null>(() => {
|
|
44
|
-
const node: UI_I_SnapshotsTreeNode =
|
|
45
|
-
$recursion.find(props.snapshotsTree, true, 'isActive', 'nodes') || null
|
|
46
|
-
|
|
47
|
-
if (!node) return null
|
|
48
|
-
|
|
49
|
-
let snapshot_the_virtual_machines_memory = ''
|
|
50
|
-
let quiesce_guest_file_system = ''
|
|
51
|
-
|
|
52
|
-
if (isNewView.value) {
|
|
53
|
-
snapshot_the_virtual_machines_memory = node.memory?.enabled ? 'yes' : 'no'
|
|
54
|
-
quiesce_guest_file_system = node.quiesce_fs ? 'yes' : 'no'
|
|
55
|
-
} else {
|
|
56
|
-
snapshot_the_virtual_machines_memory = node.memory?.enabled
|
|
57
|
-
? localization.value.common.yes
|
|
58
|
-
: localization.value.common.no
|
|
59
|
-
quiesce_guest_file_system = node.quiesce_fs
|
|
60
|
-
? localization.value.common.yes
|
|
61
|
-
: localization.value.common.no
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return {
|
|
65
|
-
...node,
|
|
66
|
-
snapshot_the_virtual_machines_memory,
|
|
67
|
-
quiesce_guest_file_system,
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
const onSelectNode = (item: UI_I_SnapshotsTreeNode): void => {
|
|
71
|
-
emits('select-node', item.type === 'location' ? item.parent_id : item.id)
|
|
72
|
-
}
|
|
73
|
-
const onShowNodes = (id: string): void => {
|
|
74
|
-
emits('show-nodes', id)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const onShowModal = (action: UI_T_SnapshotActionType): void => {
|
|
78
|
-
emits('show-modal', action)
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
:snapshots-tree="props.snapshotsTree"
|
|
5
|
+
:snapshots-loading="props.snapshotsLoading"
|
|
6
|
+
:detail-data="detailData"
|
|
7
|
+
@show-modal="onShowModal"
|
|
8
|
+
@select-node="onSelectNode"
|
|
9
|
+
@show-nodes="onShowNodes"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
15
|
+
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
16
|
+
import type {
|
|
17
|
+
UI_I_SnapshotsDetails,
|
|
18
|
+
UI_I_SnapshotsTreeNode,
|
|
19
|
+
} from '~/store/inventory/modules/snapshots/lib/models/interfaces'
|
|
20
|
+
|
|
21
|
+
const props = defineProps<{
|
|
22
|
+
snapshotsTree: UI_I_SnapshotsTreeNode
|
|
23
|
+
snapshotsLoading: boolean
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const emits = defineEmits<{
|
|
27
|
+
(event: 'select-node', value: UI_I_SnapshotsTreeNode): void
|
|
28
|
+
(event: 'show-nodes', value: string): void
|
|
29
|
+
(event: 'show-modal', value: UI_T_SnapshotActionType): void
|
|
30
|
+
}>()
|
|
31
|
+
|
|
32
|
+
const { $recursion, $store }: any = useNuxtApp()
|
|
33
|
+
|
|
34
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
35
|
+
|
|
36
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
37
|
+
const currentComponent = computed(() =>
|
|
38
|
+
isNewView.value
|
|
39
|
+
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
40
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
const detailData = computed<UI_I_SnapshotsDetails | null>(() => {
|
|
44
|
+
const node: UI_I_SnapshotsTreeNode =
|
|
45
|
+
$recursion.find(props.snapshotsTree, true, 'isActive', 'nodes') || null
|
|
46
|
+
|
|
47
|
+
if (!node) return null
|
|
48
|
+
|
|
49
|
+
let snapshot_the_virtual_machines_memory = ''
|
|
50
|
+
let quiesce_guest_file_system = ''
|
|
51
|
+
|
|
52
|
+
if (isNewView.value) {
|
|
53
|
+
snapshot_the_virtual_machines_memory = node.memory?.enabled ? 'yes' : 'no'
|
|
54
|
+
quiesce_guest_file_system = node.quiesce_fs ? 'yes' : 'no'
|
|
55
|
+
} else {
|
|
56
|
+
snapshot_the_virtual_machines_memory = node.memory?.enabled
|
|
57
|
+
? localization.value.common.yes
|
|
58
|
+
: localization.value.common.no
|
|
59
|
+
quiesce_guest_file_system = node.quiesce_fs
|
|
60
|
+
? localization.value.common.yes
|
|
61
|
+
: localization.value.common.no
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
...node,
|
|
66
|
+
snapshot_the_virtual_machines_memory,
|
|
67
|
+
quiesce_guest_file_system,
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
const onSelectNode = (item: UI_I_SnapshotsTreeNode): void => {
|
|
71
|
+
emits('select-node', item.type === 'location' ? item.parent_id : item.id)
|
|
72
|
+
}
|
|
73
|
+
const onShowNodes = (id: string): void => {
|
|
74
|
+
emits('show-nodes', id)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const onShowModal = (action: UI_T_SnapshotActionType): void => {
|
|
78
|
+
emits('show-modal', action)
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style scoped lang="scss"></style>
|