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.
Files changed (33) 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/CreateBackup.vue +6 -10
  5. package/components/common/pages/backups/modals/createBackup/Old.vue +8 -10
  6. package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
  7. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
  8. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  9. package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
  10. package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +6 -0
  11. package/components/common/pages/backups/modals/createBackup/datastores/DatastoresOld.vue +22 -2
  12. package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +6 -0
  13. package/components/common/pages/backups/modals/createBackup/disks/DisksOld.vue +22 -1
  14. package/components/common/pages/backups/modals/createBackup/general/General.vue +7 -1
  15. package/components/common/pages/backups/modals/createBackup/general/GeneralOld.vue +17 -0
  16. package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
  17. package/components/common/pages/backups/modals/createBackup/lib/validation/validations.ts +0 -8
  18. package/components/common/vm/snapshots/DetailView.vue +90 -90
  19. package/components/common/vm/snapshots/Old.vue +71 -71
  20. package/components/common/vm/snapshots/Snapshots.vue +82 -82
  21. package/components/common/vm/snapshots/lib/models/types.ts +8 -8
  22. package/components/common/vm/snapshots/new/New.vue +389 -389
  23. package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +96 -96
  24. package/components/common/vm/snapshots/new/contextMenuView/lib/config/contextMenuItems.ts +34 -34
  25. package/components/common/vm/snapshots/new/lib/models/interfaces.ts +12 -12
  26. package/components/common/vm/snapshots/new/lib/utils/contextMenu.ts +29 -29
  27. package/components/common/vm/snapshots/new/lib/utils/details.ts +48 -48
  28. package/components/common/vm/snapshots/tools/Tools.vue +56 -56
  29. package/components/common/wizards/datastore/add/Old.vue +16 -0
  30. package/components/common/wizards/datastore/add/steps/typeMode/TypeModeOld.vue +1 -48
  31. package/components/common/wizards/datastore/add/steps/typeMode/tooltip/Tooltip.vue +33 -0
  32. package/package.json +1 -1
  33. package/store/inventory/modules/snapshots/lib/models/interfaces.ts +45 -40
@@ -1,389 +1,389 @@
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>
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>