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.
Files changed (25) hide show
  1. package/components/common/backup/storage/actions/add/Old.vue +22 -1
  2. package/components/common/backup/storage/actions/add/steps/typeMode/TypeModeOld.vue +1 -48
  3. package/components/common/backup/storage/actions/add/steps/typeMode/tooltip/Tooltip.vue +33 -0
  4. package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
  5. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
  6. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  7. package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
  8. package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
  9. package/components/common/wizards/datastore/add/Old.vue +16 -0
  10. package/components/common/wizards/datastore/add/steps/typeMode/TypeModeOld.vue +1 -48
  11. package/components/common/wizards/datastore/add/steps/typeMode/tooltip/Tooltip.vue +33 -0
  12. package/package.json +1 -1
  13. package/components/common/vm/snapshots/DetailView.vue +0 -90
  14. package/components/common/vm/snapshots/Old.vue +0 -71
  15. package/components/common/vm/snapshots/Snapshots.vue +0 -82
  16. package/components/common/vm/snapshots/lib/models/types.ts +0 -8
  17. package/components/common/vm/snapshots/new/New.vue +0 -389
  18. package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +0 -96
  19. package/components/common/vm/snapshots/new/contextMenuView/lib/config/contextMenuItems.ts +0 -34
  20. package/components/common/vm/snapshots/new/lib/models/interfaces.ts +0 -12
  21. package/components/common/vm/snapshots/new/lib/utils/contextMenu.ts +0 -29
  22. package/components/common/vm/snapshots/new/lib/utils/details.ts +0 -48
  23. package/components/common/vm/snapshots/tools/Tools.vue +0 -56
  24. package/components/common/vm/snapshots/tools/lib/config/tabsPannel.ts +0 -39
  25. package/store/inventory/modules/snapshots/lib/models/interfaces.ts +0 -40
@@ -1,90 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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,8 +0,0 @@
1
- export type UI_T_SnapshotActionType =
2
- | 'take'
3
- | 'edit'
4
- | 'revert'
5
- | 'delete'
6
- | 'delete_all'
7
- | 'group_take'
8
- | 'group_delete_all'
@@ -1,389 +0,0 @@
1
- <template>
2
- <div
3
- :class="[
4
- 'snapshots-page grid h-inherit p-4 overflow-hidden ',
5
- { 'selected gap-3': props.detailData },
6
- ]"
7
- >
8
- <div class="left-content overflow-auto grid p-4">
9
- <div class="flex justify-between">
10
- <h3 class="title-block font-[500] text-[16px]">
11
- {{ localization.inventoryTabs.snapshots }} ({{ snapshotsCount }})
12
- </h3>
13
- <ui-button
14
- test-id="take-snapshot-btn"
15
- size="md"
16
- @click="emits('show-modal', 'take')"
17
- >
18
- <ui-icon
19
- name="icon-snapshotTake"
20
- width="20"
21
- height="20"
22
- class="mr-2"
23
- />
24
- {{ localization.common.takeSnapshot }}
25
- </ui-button>
26
- </div>
27
- <div
28
- v-if="props.snapshotsTree.length"
29
- class="snapshots-tree-content overflow-y-auto my-4 px-2 pb-2"
30
- >
31
- <ui-tree
32
- :is-loading="props.snapshotsLoading"
33
- :nodes="props.snapshotsTree"
34
- @select-node="emits('select-node', $event)"
35
- @toggle-node="emits('show-nodes', $event.id)"
36
- @show-context-menu="showContextMenu"
37
- >
38
- <template #content="{ node }">
39
- <div class="flex-align-center">
40
- <span :class="['node-icon', node.iconClassName]"></span>
41
- <span class="node-name text-ellipsis">{{ node.name }}</span>
42
- </div>
43
- </template>
44
- </ui-tree>
45
- </div>
46
- <div v-else class="empty-block grid justify-items-center content-center">
47
- <ui-icon
48
- name="not-found-magnifier"
49
- width="28"
50
- height="28"
51
- color="#9da6ad"
52
- />
53
- <p class="title-block font-[400] text-[16px] mt-2">
54
- {{ localization.snapshots.noSnapshotsAvailable }}
55
- </p>
56
- <p class="description-block mt-[6px] text-[13px]">
57
- {{ localization.snapshots.noSnapshotsAvailableDesc }}
58
- </p>
59
- </div>
60
- <ui-button
61
- :disabled="!props.snapshotsTree.length"
62
- :class="[
63
- 'delete-all w-max ml-auto',
64
- { disabled: !props.snapshotsTree.length },
65
- ]"
66
- test-id="delete-all-snapshots-btn"
67
- size="md"
68
- variant="text"
69
- is-without-sizes
70
- is-without-height
71
- @click="emits('show-modal', 'delete_all')"
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="snapshot-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.snapshots.snapshotDetails }}
84
- </h3>
85
- <div class="details-actions-block flex column-gap-4">
86
- <ui-tooltip
87
- id="revert-snapshot-btn"
88
- test-id="revert-snapshot-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="revert-snapshot-btn" class="popped tooltip">
96
- <ui-button
97
- test-id="revert-snapshot-btn"
98
- size="md"
99
- variant="text"
100
- class="revert-snapshot-btn"
101
- is-without-sizes
102
- is-without-height
103
- @click="emits('show-modal', 'revert')"
104
- >
105
- <ui-icon name="revert" width="20" height="20" />
106
- </ui-button>
107
- </div>
108
- </template>
109
- <template #content>
110
- {{ localization.common.revert }}
111
- </template>
112
- </ui-tooltip>
113
- <div class="border-line"></div>
114
- <ui-tooltip
115
- id="edit-snapshot-btn"
116
- test-id="edit-snapshot-btn-tooltip"
117
- size="md"
118
- position="bottom"
119
- position-by-tooltip="center"
120
- show-type="variant-1"
121
- >
122
- <template #target>
123
- <div id="edit-snapshot-btn" class="popped tooltip">
124
- <ui-button
125
- test-id="edit-snapshot-btn"
126
- size="md"
127
- variant="text"
128
- class="edit-snapshot-btn"
129
- is-without-sizes
130
- is-without-height
131
- @click="emits('show-modal', 'edit')"
132
- >
133
- <ui-icon name="edit" width="20" height="20" />
134
- </ui-button>
135
- </div>
136
- </template>
137
- <template #content>
138
- {{ localization.common.edit }}
139
- </template>
140
- </ui-tooltip>
141
- <div class="border-line"></div>
142
- <ui-tooltip
143
- id="delete-snapshot-btn"
144
- test-id="delete-snapshot-btn-tooltip"
145
- size="md"
146
- position="bottom"
147
- position-by-tooltip="center"
148
- show-type="variant-1"
149
- >
150
- <template #target>
151
- <div id="delete-snapshot-btn" class="popped tooltip">
152
- <ui-button
153
- test-id="delete-snapshot-btn"
154
- size="md"
155
- variant="text"
156
- class="delete-snapshot-btn"
157
- is-without-sizes
158
- is-without-height
159
- @click="emits('show-modal', 'delete')"
160
- >
161
- <ui-icon name="delete" width="20" height="20" />
162
- </ui-button>
163
- </div>
164
- </template>
165
- <template #content>
166
- {{ localization.common.delete }}
167
- </template>
168
- </ui-tooltip>
169
- </div>
170
- </div>
171
- <div class="grid row-gap-3 overflow-y-auto">
172
- <ui-info-block
173
- v-for="(item, index) in currentDetailsData"
174
- :key="index"
175
- :data="item"
176
- >
177
- <template v-if="item.labelIcon" #labelBlock>
178
- <div class="info-block-label-content flex items-start">
179
- <ui-icon
180
- v-if="item.labelIcon"
181
- :name="item.labelIcon"
182
- width="20"
183
- height="20"
184
- class="info-label-icon mr-[10px]"
185
- />
186
- <span class="info-label">{{ item.label }}</span>
187
- </div>
188
- </template>
189
- <template #valueBlock>
190
- <span
191
- v-if="item.value === 'empty-description'"
192
- class="empty-description"
193
- >
194
- {{ localization.snapshots.snapshotHasNoDescriptionYet }}
195
- </span>
196
- <ui-status-pill
197
- v-if="item.labelIcon === 'settings' && item.value"
198
- :text="localization.common[item.value.toLowerCase()]"
199
- :type="item.value === 'yes' ? 'success' : 'error'"
200
- size="md"
201
- with-icon
202
- />
203
- </template>
204
- </ui-info-block>
205
- </div>
206
- </div>
207
- </div>
208
-
209
- <common-vm-snapshots-new-context-menu-view
210
- :show="contextMenuShow"
211
- :context-data="contextMenu"
212
- @select-action="onSelectContextMenuItem"
213
- />
214
- </template>
215
-
216
- <script setup lang="ts">
217
- import type { UI_I_InfoBlock } from '~/node_modules/bfg-uikit/components/ui/infoBlock/models/interfaces'
218
- import type { UI_I_Localization } from '~/lib/models/interfaces'
219
- import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
220
- import type {
221
- UI_I_SnapshotsDetails,
222
- UI_I_SnapshotsTreeNode,
223
- } from '~/store/inventory/modules/snapshots/lib/models/interfaces'
224
- import * as utils from '~/components/common/vm/snapshots/new/lib/utils/contextMenu'
225
- import { constructDetails } from '~/components/common/vm/snapshots/new/lib/utils/details'
226
-
227
- const props = defineProps<{
228
- snapshotsTree: UI_I_SnapshotsTreeNode[]
229
- snapshotsLoading: boolean
230
- detailData: UI_I_SnapshotsDetails | null
231
- }>()
232
-
233
- const emits = defineEmits<{
234
- (event: 'show-modal', value: UI_T_SnapshotActionType): void
235
- (event: 'select-node', value: UI_I_SnapshotsTreeNode): void
236
- (event: 'show-nodes', value: string): void
237
- }>()
238
-
239
- const { $recursion }: any = useNuxtApp()
240
-
241
- const localization = computed<UI_I_Localization>(() => useLocal())
242
-
243
- const snapshotsCount = computed<string>(() =>
244
- $recursion.calcCount(props.snapshotsTree, 'nodes', ['snapshot'], ['type'])
245
- )
246
-
247
- const currentDetailsData = computed<UI_I_InfoBlock[]>(() =>
248
- constructDetails(localization.value, props.detailData)
249
- )
250
-
251
- const { showContextMenu, contextMenuShow, contextMenu } = utils.getContextMenu()
252
-
253
- const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
254
- emits('show-modal', actionType)
255
- }
256
- </script>
257
-
258
- <style>
259
- :root {
260
- --snapshots-page-inner-block-bg: #ffffff;
261
- --snapshots-page-title-color: #4d5d69;
262
- --snapshots-page-tree-border-color: #e9ebed;
263
- --snapshots-page-details-action-color: #4d5d69;
264
- --snapshots-page-details-action-hover-color: #213444;
265
- --snapshots-page-info-block-label-color: #4d5d69;
266
- --snapshots-page-info-block-value-color: #182531;
267
- }
268
- :root.dark-theme {
269
- --snapshots-page-inner-block-bg: #334453;
270
- --snapshots-page-title-color: #e9eaec;
271
- --snapshots-page-tree-border-color: #e9ebed1f;
272
- --snapshots-page-details-action-color: #e9eaec;
273
- --snapshots-page-details-action-hover-color: #ffffff;
274
- --snapshots-page-info-block-label-color: #e9eaec;
275
- --snapshots-page-info-block-value-color: #e9eaec;
276
- }
277
- </style>
278
-
279
- <style scoped lang="scss">
280
- .snapshots-page {
281
- &.selected {
282
- grid-template-columns: repeat(2, calc(50% - 6px));
283
- }
284
-
285
- .title-block {
286
- color: var(--snapshots-page-title-color);
287
- }
288
-
289
- .left-content {
290
- background-color: var(--snapshots-page-inner-block-bg);
291
- box-shadow: 0 1px 4px 0 #00000014;
292
- border-radius: 8px;
293
- grid-template-rows: max-content 1fr max-content;
294
-
295
- .snapshots-tree-content {
296
- border: 1px solid var(--snapshots-page-tree-border-color);
297
- border-radius: 8px;
298
-
299
- :deep(.tree-container) {
300
- width: max-content;
301
- min-width: 100%;
302
-
303
- .tree-content {
304
- padding-right: 8px;
305
-
306
- .node-wrapper {
307
- border-radius: 4px;
308
-
309
- .node-element {
310
- line-height: 20px;
311
- }
312
- }
313
- }
314
- }
315
- }
316
-
317
- .empty-block {
318
- .description-block {
319
- color: #9da6ad;
320
- }
321
- }
322
- .delete-all {
323
- &:not(.disabled) {
324
- color: #ea3223;
325
- }
326
- }
327
- }
328
- .snapshot-details {
329
- background-color: var(--snapshots-page-inner-block-bg);
330
- box-shadow: 0 1px 4px 0 #00000014;
331
- border-radius: 8px;
332
-
333
- .details-actions-block {
334
- .border-line {
335
- width: 1px;
336
- height: 20px;
337
- background-color: #e9ebeda3;
338
- }
339
- .revert-snapshot-btn,
340
- .edit-snapshot-btn {
341
- color: var(--snapshots-page-details-action-color);
342
-
343
- &:hover {
344
- color: var(--snapshots-page-details-action-hover-color);
345
- }
346
- }
347
- .delete-snapshot-btn {
348
- color: #ea3223;
349
- }
350
- }
351
- .info-block-label-content {
352
- .info-label-icon {
353
- color: #9da6ad;
354
- min-width: 20px;
355
- }
356
- .info-label {
357
- margin-top: 2.5px;
358
- color: var(--snapshots-page-info-block-label-color);
359
- }
360
- }
361
- .empty-description {
362
- color: #9da6ad;
363
- }
364
- :deep(.ui-main-info-block-item-right) {
365
- white-space: unset !important;
366
- max-width: 50%;
367
- }
368
- :deep(.ui-main-info-block-item-right-value-parent) {
369
- white-space: unset !important;
370
- }
371
- :deep(.ui-main-info-block-item-right-value) {
372
- color: var(--snapshots-page-info-block-value-color);
373
- font-size: 13px;
374
- font-weight: 400;
375
- }
376
- :deep(.ui-main-info-block-item-right-open) {
377
- display: none;
378
- }
379
- }
380
- }
381
-
382
- @media (max-width: 1200px) {
383
- .snapshots-page {
384
- &.selected {
385
- grid-template-columns: 1fr;
386
- }
387
- }
388
- }
389
- </style>