bfg-common 1.5.752 → 1.5.753
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/assets/localization/local_be.json +19 -15
- package/assets/localization/local_en.json +19 -15
- package/assets/localization/local_hy.json +18 -14
- package/assets/localization/local_kk.json +18 -14
- package/assets/localization/local_ru.json +19 -15
- package/assets/localization/local_zh.json +19 -15
- package/components/atoms/table/dataGrid/DataGrid.vue +8 -8
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/diagramMain/Header.vue +4 -0
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +2 -2
- package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +2 -2
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/New.vue +2 -2
- package/components/common/vm/snapshots/modals/confirm/New.vue +5 -0
- package/components/common/vm/snapshots/modals/confirm/lib/models/enums.ts +2 -2
- package/components/common/vm/snapshots/modals/takeOrEdit/new/New.vue +23 -7
- package/components/common/vm/snapshots/new/New.vue +96 -13
- package/components/common/vm/snapshots/new/Skeleton.vue +112 -0
- package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +17 -10
- package/components/common/vm/snapshots/new/lib/utils/details.ts +1 -1
- package/components/common/wizards/network/add/Add.vue +25 -5
- package/components/common/wizards/network/add/lib/config/config.ts +1 -1
- package/components/common/wizards/network/add/lib/config/initialData.ts +5 -3
- package/components/common/wizards/network/add/lib/config/selectConnectionTypeStep.ts +1 -0
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +2 -1
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +18 -6
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/old/lib/config/hostTable.ts +1 -1
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +11 -1
- package/lib/config/regExp.ts +1 -1
- package/package.json +2 -2
- package/plugins/time.ts +58 -58
- package/plugins/validation.ts +6 -6
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<common-vm-snapshots-new-skeleton v-if="props.snapshotsLoading" />
|
|
2
3
|
<div
|
|
4
|
+
v-else
|
|
3
5
|
:class="[
|
|
4
6
|
'snapshots-page grid h-inherit p-4 overflow-hidden ',
|
|
5
7
|
{ 'selected gap-3': props.detailData },
|
|
6
8
|
]"
|
|
7
9
|
>
|
|
8
10
|
<div class="left-content overflow-auto grid p-4">
|
|
9
|
-
<div class="flex justify-between">
|
|
11
|
+
<div class="flex justify-between gap-4 flex-wrap">
|
|
10
12
|
<h3 class="title-block font-[500] text-[16px]">
|
|
11
13
|
{{ localization.inventoryTabs.snapshots }} ({{ snapshotsCount }})
|
|
12
14
|
</h3>
|
|
13
15
|
<ui-button
|
|
14
16
|
test-id="take-snapshot-btn"
|
|
15
17
|
size="md"
|
|
18
|
+
class="take-snapshot-button"
|
|
16
19
|
@click="emits('show-modal', 'take')"
|
|
17
20
|
>
|
|
18
21
|
<ui-icon
|
|
19
22
|
name="icon-snapshotTake"
|
|
20
23
|
width="20"
|
|
21
24
|
height="20"
|
|
22
|
-
class="mr-2"
|
|
25
|
+
class="mr-2 icon"
|
|
23
26
|
/>
|
|
24
|
-
{{ localization.
|
|
27
|
+
{{ localization.snapshots.takeSnapshot }}
|
|
25
28
|
</ui-button>
|
|
26
29
|
</div>
|
|
27
30
|
<div
|
|
@@ -29,16 +32,17 @@
|
|
|
29
32
|
class="snapshots-tree-content overflow-y-auto my-4 px-2 pb-2"
|
|
30
33
|
>
|
|
31
34
|
<ui-tree
|
|
32
|
-
:is-loading="props.snapshotsLoading"
|
|
33
35
|
:nodes="props.snapshotsTree"
|
|
34
36
|
@select-node="emits('select-node', $event)"
|
|
35
37
|
@toggle-node="emits('show-nodes', $event.id)"
|
|
36
38
|
@show-context-menu="showContextMenu"
|
|
37
39
|
>
|
|
38
40
|
<template #content="{ node }">
|
|
39
|
-
<div class="flex-align-center">
|
|
41
|
+
<div class="flex-align-center gap-2">
|
|
40
42
|
<span :class="['node-icon', node.iconClassName]"></span>
|
|
41
|
-
<span class="node-name text-ellipsis">{{
|
|
43
|
+
<span class="node-name text-ellipsis text-3">{{
|
|
44
|
+
node.name
|
|
45
|
+
}}</span>
|
|
42
46
|
</div>
|
|
43
47
|
</template>
|
|
44
48
|
</ui-tree>
|
|
@@ -53,7 +57,7 @@
|
|
|
53
57
|
<p class="title-block font-[400] text-[16px] mt-2">
|
|
54
58
|
{{ localization.snapshots.noSnapshotsAvailable }}
|
|
55
59
|
</p>
|
|
56
|
-
<p class="description-block mt-[6px] text-[13px]">
|
|
60
|
+
<p class="description-block mt-[6px] text-[13px] text-center">
|
|
57
61
|
{{ localization.snapshots.noSnapshotsAvailableDesc }}
|
|
58
62
|
</p>
|
|
59
63
|
</div>
|
|
@@ -78,7 +82,7 @@
|
|
|
78
82
|
v-if="props.detailData"
|
|
79
83
|
class="snapshot-details overflow-hidden flex-direction-column p-4"
|
|
80
84
|
>
|
|
81
|
-
<div class="flex justify-between mb-6">
|
|
85
|
+
<div class="flex justify-between mb-6 gap-4 pr-4 flex-wrap">
|
|
82
86
|
<h3 class="title-block font-[500] text-[16px]">
|
|
83
87
|
{{ localization.snapshots.snapshotDetails }}
|
|
84
88
|
</h3>
|
|
@@ -168,7 +172,13 @@
|
|
|
168
172
|
</ui-tooltip>
|
|
169
173
|
</div>
|
|
170
174
|
</div>
|
|
171
|
-
<div
|
|
175
|
+
<div
|
|
176
|
+
ref="detailsScrollBlock"
|
|
177
|
+
:class="[
|
|
178
|
+
'grid row-gap-3 pr-4 overflow-y-auto details-scroll-block',
|
|
179
|
+
{ 'has-scroll': hasScroll },
|
|
180
|
+
]"
|
|
181
|
+
>
|
|
172
182
|
<ui-info-block
|
|
173
183
|
v-for="(item, index) in currentDetailsData"
|
|
174
184
|
:key="index"
|
|
@@ -179,9 +189,12 @@
|
|
|
179
189
|
<ui-icon
|
|
180
190
|
v-if="item.labelIcon"
|
|
181
191
|
:name="item.labelIcon"
|
|
192
|
+
:class="[
|
|
193
|
+
'info-label-icon mr-[10px]',
|
|
194
|
+
`icon-name-${item.labelIcon}`,
|
|
195
|
+
]"
|
|
182
196
|
width="20"
|
|
183
197
|
height="20"
|
|
184
|
-
class="info-label-icon mr-[10px]"
|
|
185
198
|
/>
|
|
186
199
|
<span class="info-label">{{ item.label }}</span>
|
|
187
200
|
</div>
|
|
@@ -214,6 +227,7 @@
|
|
|
214
227
|
</template>
|
|
215
228
|
|
|
216
229
|
<script setup lang="ts">
|
|
230
|
+
import { useElementSize } from '@vueuse/core'
|
|
217
231
|
import type { UI_I_InfoBlock } from '~/node_modules/bfg-uikit/components/ui/infoBlock/models/interfaces'
|
|
218
232
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
219
233
|
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
@@ -253,6 +267,20 @@ const { showContextMenu, contextMenuShow, contextMenu } = utils.getContextMenu()
|
|
|
253
267
|
const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
254
268
|
emits('show-modal', actionType)
|
|
255
269
|
}
|
|
270
|
+
|
|
271
|
+
const detailsScrollBlock = ref<HTMLElement | null>(null)
|
|
272
|
+
const { height } = useElementSize(detailsScrollBlock)
|
|
273
|
+
const hasScroll = ref<boolean>(false)
|
|
274
|
+
const checkScroll = (): void => {
|
|
275
|
+
const element = detailsScrollBlock.value
|
|
276
|
+
if (element) {
|
|
277
|
+
hasScroll.value = element.scrollHeight > element.clientHeight
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
watch(height, () => {
|
|
282
|
+
checkScroll()
|
|
283
|
+
})
|
|
256
284
|
</script>
|
|
257
285
|
|
|
258
286
|
<style>
|
|
@@ -260,7 +288,9 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
260
288
|
--snapshots-page-inner-block-bg: #ffffff;
|
|
261
289
|
--snapshots-page-title-color: #4d5d69;
|
|
262
290
|
--snapshots-page-tree-border-color: #e9ebed;
|
|
291
|
+
--snapshots-page-tree-block-bg-color: #ffffff;
|
|
263
292
|
--snapshots-page-details-action-color: #4d5d69;
|
|
293
|
+
--snapshots-page-details-action-line-color: #e9ebeda3;
|
|
264
294
|
--snapshots-page-details-action-hover-color: #213444;
|
|
265
295
|
--snapshots-page-info-block-label-color: #4d5d69;
|
|
266
296
|
--snapshots-page-info-block-value-color: #182531;
|
|
@@ -269,7 +299,9 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
269
299
|
--snapshots-page-inner-block-bg: #334453;
|
|
270
300
|
--snapshots-page-title-color: #e9eaec;
|
|
271
301
|
--snapshots-page-tree-border-color: #e9ebed1f;
|
|
302
|
+
--snapshots-page-tree-block-bg-color: #1b2a371f;
|
|
272
303
|
--snapshots-page-details-action-color: #e9eaec;
|
|
304
|
+
--snapshots-page-details-action-line-color: #e9ebed1f;
|
|
273
305
|
--snapshots-page-details-action-hover-color: #ffffff;
|
|
274
306
|
--snapshots-page-info-block-label-color: #e9eaec;
|
|
275
307
|
--snapshots-page-info-block-value-color: #e9eaec;
|
|
@@ -285,6 +317,13 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
285
317
|
.title-block {
|
|
286
318
|
color: var(--snapshots-page-title-color);
|
|
287
319
|
}
|
|
320
|
+
.take-snapshot-button {
|
|
321
|
+
white-space: nowrap;
|
|
322
|
+
|
|
323
|
+
.icon {
|
|
324
|
+
min-width: 20px;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
288
327
|
|
|
289
328
|
.left-content {
|
|
290
329
|
background-color: var(--snapshots-page-inner-block-bg);
|
|
@@ -295,13 +334,14 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
295
334
|
.snapshots-tree-content {
|
|
296
335
|
border: 1px solid var(--snapshots-page-tree-border-color);
|
|
297
336
|
border-radius: 8px;
|
|
337
|
+
background-color: var(--snapshots-page-tree-block-bg-color);
|
|
298
338
|
|
|
299
339
|
:deep(.tree-container) {
|
|
300
340
|
width: max-content;
|
|
301
341
|
min-width: 100%;
|
|
302
342
|
|
|
303
343
|
.tree-content {
|
|
304
|
-
padding-right: 8px;
|
|
344
|
+
//padding-right: 8px;
|
|
305
345
|
|
|
306
346
|
.node-wrapper {
|
|
307
347
|
border-radius: 4px;
|
|
@@ -320,6 +360,10 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
320
360
|
}
|
|
321
361
|
}
|
|
322
362
|
.delete-all {
|
|
363
|
+
&.disabled {
|
|
364
|
+
color: #bdc3c7;
|
|
365
|
+
}
|
|
366
|
+
|
|
323
367
|
&:not(.disabled) {
|
|
324
368
|
color: #ea3223;
|
|
325
369
|
}
|
|
@@ -329,12 +373,18 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
329
373
|
background-color: var(--snapshots-page-inner-block-bg);
|
|
330
374
|
box-shadow: 0 1px 4px 0 #00000014;
|
|
331
375
|
border-radius: 8px;
|
|
376
|
+
padding-right: 0;
|
|
332
377
|
|
|
333
378
|
.details-actions-block {
|
|
334
379
|
.border-line {
|
|
335
380
|
width: 1px;
|
|
336
381
|
height: 20px;
|
|
337
|
-
background-color:
|
|
382
|
+
background-color: var(--snapshots-page-details-action-line-color);
|
|
383
|
+
}
|
|
384
|
+
.revert-snapshot-btn {
|
|
385
|
+
:deep(path) {
|
|
386
|
+
stroke-width: 1.6;
|
|
387
|
+
}
|
|
338
388
|
}
|
|
339
389
|
.revert-snapshot-btn,
|
|
340
390
|
.edit-snapshot-btn {
|
|
@@ -348,18 +398,40 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
348
398
|
color: #ea3223;
|
|
349
399
|
}
|
|
350
400
|
}
|
|
401
|
+
.details-scroll-block {
|
|
402
|
+
padding-right: 0;
|
|
403
|
+
|
|
404
|
+
&:not(.has-scroll) {
|
|
405
|
+
padding-right: 16px;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
351
408
|
.info-block-label-content {
|
|
352
409
|
.info-label-icon {
|
|
353
410
|
color: #9da6ad;
|
|
354
411
|
min-width: 20px;
|
|
412
|
+
|
|
413
|
+
&.icon-name-icon-snapshotTake {
|
|
414
|
+
:deep(path) {
|
|
415
|
+
stroke-width: 1.3;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
&.icon-name-settings {
|
|
419
|
+
:deep(path) {
|
|
420
|
+
stroke-width: 1.7;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
355
423
|
}
|
|
356
424
|
.info-label {
|
|
357
|
-
margin-top:
|
|
425
|
+
margin-top: 1px;
|
|
426
|
+
line-height: 18px;
|
|
358
427
|
color: var(--snapshots-page-info-block-label-color);
|
|
359
428
|
}
|
|
360
429
|
}
|
|
361
430
|
.empty-description {
|
|
362
431
|
color: #9da6ad;
|
|
432
|
+
margin-top: 1px;
|
|
433
|
+
line-height: 18px;
|
|
434
|
+
text-align: right;
|
|
363
435
|
}
|
|
364
436
|
:deep(.ui-main-info-block-item-right) {
|
|
365
437
|
white-space: unset !important;
|
|
@@ -372,12 +444,23 @@ const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
|
372
444
|
color: var(--snapshots-page-info-block-value-color);
|
|
373
445
|
font-size: 13px;
|
|
374
446
|
font-weight: 400;
|
|
447
|
+
line-height: 18px;
|
|
448
|
+
margin-top: 1px;
|
|
375
449
|
}
|
|
376
450
|
:deep(.ui-main-info-block-item-right-open) {
|
|
377
451
|
display: none;
|
|
378
452
|
}
|
|
379
453
|
}
|
|
380
454
|
}
|
|
455
|
+
:root.dark-theme {
|
|
456
|
+
.left-content {
|
|
457
|
+
.delete-all {
|
|
458
|
+
&.disabled {
|
|
459
|
+
opacity: 0.44;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
381
464
|
|
|
382
465
|
@media (max-width: 1200px) {
|
|
383
466
|
.snapshots-page {
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="skeleton-page grid gap-3 p-4 h-inherit overflow-hidden">
|
|
3
|
+
<div class="left-content grid p-4">
|
|
4
|
+
<div class="flex justify-between gap-4 flex-wrap">
|
|
5
|
+
<ui-skeleton-item width="80" height="20" />
|
|
6
|
+
<ui-skeleton-item width="160" height="36" />
|
|
7
|
+
</div>
|
|
8
|
+
<div class="border-block flex flex-col py-3 px-4 my-4">
|
|
9
|
+
<ui-skeleton-item width="100%" height="20" />
|
|
10
|
+
<ui-skeleton-item width="50%" height="20" />
|
|
11
|
+
<ui-skeleton-item width="30%" height="20" />
|
|
12
|
+
<ui-skeleton-item width="70%" height="20" />
|
|
13
|
+
<ui-skeleton-item width="20%" height="20" />
|
|
14
|
+
<ui-skeleton-item width="50%" height="20" />
|
|
15
|
+
<ui-skeleton-item width="80%" height="20" />
|
|
16
|
+
<ui-skeleton-item width="70%" height="20" />
|
|
17
|
+
<ui-skeleton-item width="20%" height="20" />
|
|
18
|
+
</div>
|
|
19
|
+
<ui-skeleton-item width="96" height="20" class="ml-auto" />
|
|
20
|
+
</div>
|
|
21
|
+
<div class="right-content grid p-4">
|
|
22
|
+
<div class="flex justify-between gap-4 flex-wrap top-container">
|
|
23
|
+
<ui-skeleton-item width="80" height="20" />
|
|
24
|
+
<div class="actions-block flex">
|
|
25
|
+
<ui-skeleton-item width="20" height="20" />
|
|
26
|
+
<div class="line-border"></div>
|
|
27
|
+
<ui-skeleton-item width="20" height="20" />
|
|
28
|
+
<div class="line-border"></div>
|
|
29
|
+
<ui-skeleton-item width="20" height="20" />
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="details-block flex flex-col my-6">
|
|
33
|
+
<div
|
|
34
|
+
v-for="index in detailsItemsCount"
|
|
35
|
+
:key="index"
|
|
36
|
+
class="details-block-item flex p-3"
|
|
37
|
+
>
|
|
38
|
+
<ui-skeleton-item width="20" height="20" class="mr-[10px]" />
|
|
39
|
+
<ui-skeleton-item width="144" height="20" />
|
|
40
|
+
<ui-skeleton-item width="144" height="20" class="ml-auto" />
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script setup lang="ts">
|
|
48
|
+
const detailsItemsCount = ref<number>(6)
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style>
|
|
52
|
+
:root {
|
|
53
|
+
--snapshots-left-skeleton-border-color: #e9ebed;
|
|
54
|
+
--snapshots-right-skeleton-action-line-border-color: #e9ebeda3;
|
|
55
|
+
--snapshots-right-skeleton-item-bg-color: #e9ebed66;
|
|
56
|
+
}
|
|
57
|
+
:root.dark-theme {
|
|
58
|
+
--snapshots-left-skeleton-border-color: #e9ebed1f;
|
|
59
|
+
--snapshots-right-skeleton-action-line-border-color: #e9ebed1f;
|
|
60
|
+
--snapshots-right-skeleton-item-bg-color: #e9ebed0f;
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
63
|
+
|
|
64
|
+
<style scoped lang="scss">
|
|
65
|
+
.skeleton-page {
|
|
66
|
+
grid-template-columns: repeat(2, calc(50% - 6px));
|
|
67
|
+
|
|
68
|
+
.left-content,
|
|
69
|
+
.right-content {
|
|
70
|
+
background-color: var(--snapshots-page-inner-block-bg);
|
|
71
|
+
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.0784313725);
|
|
72
|
+
border-radius: 8px;
|
|
73
|
+
grid-template-rows: max-content 1fr max-content;
|
|
74
|
+
overflow: hidden;
|
|
75
|
+
}
|
|
76
|
+
.border-block {
|
|
77
|
+
border: 1px solid var(--snapshots-left-skeleton-border-color);
|
|
78
|
+
border-radius: 8px;
|
|
79
|
+
grid-row-gap: 10px;
|
|
80
|
+
overflow: auto;
|
|
81
|
+
|
|
82
|
+
:deep(.skeleton-item) {
|
|
83
|
+
min-height: 20px;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
.right-content {
|
|
87
|
+
.top-container {
|
|
88
|
+
.actions-block {
|
|
89
|
+
grid-column-gap: 10px;
|
|
90
|
+
|
|
91
|
+
.line-border {
|
|
92
|
+
border: 1px solid
|
|
93
|
+
var(--snapshots-right-skeleton-action-line-border-color);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
.details-block {
|
|
98
|
+
grid-row-gap: 10px;
|
|
99
|
+
overflow: auto;
|
|
100
|
+
|
|
101
|
+
.details-block-item {
|
|
102
|
+
background-color: var(--snapshots-right-skeleton-item-bg-color);
|
|
103
|
+
border-radius: 6px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
:deep(.skeleton-item) {
|
|
107
|
+
min-height: 20px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
@@ -54,6 +54,7 @@ const showContextMenu = (data: UI_I_ContextData): void => {
|
|
|
54
54
|
contextMenu.value.type = node.type
|
|
55
55
|
contextMenu.value.titleText = node.name
|
|
56
56
|
contextMenu.value.titleIconClassName = node.iconClassName
|
|
57
|
+
contextMenu.value.items = contextMenuItemsFunc(localization.value)
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
watch(
|
|
@@ -75,20 +76,26 @@ const onSelectContextMenuItem = (item: UI_I_ContextMenuItem): void => {
|
|
|
75
76
|
|
|
76
77
|
<style scoped lang="scss">
|
|
77
78
|
.snapshot-context-menu-view {
|
|
78
|
-
:deep(.
|
|
79
|
-
|
|
80
|
-
display: none;
|
|
81
|
-
}
|
|
79
|
+
:deep(.context-wrap) {
|
|
80
|
+
min-width: 112px;
|
|
82
81
|
|
|
83
|
-
.item
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
.menu-item {
|
|
83
|
+
.context-icon {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
.item-ui-icon {
|
|
88
|
+
margin-right: 8px;
|
|
89
|
+
width: 16px;
|
|
90
|
+
height: 16px;
|
|
91
|
+
}
|
|
89
92
|
|
|
90
|
-
|
|
93
|
+
&:last-child {
|
|
91
94
|
color: #ea3223;
|
|
95
|
+
|
|
96
|
+
.context-link:hover {
|
|
97
|
+
color: #ea3223;
|
|
98
|
+
}
|
|
92
99
|
}
|
|
93
100
|
}
|
|
94
101
|
}
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
connectionSettingsInitial,
|
|
147
147
|
portPropertiesInitial,
|
|
148
148
|
ipFourSettingsInitial,
|
|
149
|
-
|
|
149
|
+
targetDeviceInitialFunc,
|
|
150
150
|
addNetworkingZeroOrFirstSchemeDataFunc,
|
|
151
151
|
addNetworkingSecondOrThirdSchemeDataFunc,
|
|
152
152
|
addNetworkingFourthOrFifthSchemeDataFunc,
|
|
@@ -245,8 +245,19 @@ const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
|
|
|
245
245
|
|
|
246
246
|
const readyCompleteFields = ref<UI_I_ReadyCompleteFields[]>([])
|
|
247
247
|
|
|
248
|
+
const globalPermissions = computed<any>(
|
|
249
|
+
() => $store.getters['globalPermissions/getPermissions']
|
|
250
|
+
)
|
|
251
|
+
|
|
248
252
|
// Step's content data (connectionType)
|
|
249
|
-
const connectionType = ref<string>(
|
|
253
|
+
const connectionType = ref<string>(
|
|
254
|
+
!globalPermissions.value['Networks.CreateSysx'] &&
|
|
255
|
+
!globalPermissions.value['Networks.CreatePortGroup']
|
|
256
|
+
? '2'
|
|
257
|
+
: !globalPermissions.value['Networks.CreateSysx']
|
|
258
|
+
? '1'
|
|
259
|
+
: '0'
|
|
260
|
+
)
|
|
250
261
|
|
|
251
262
|
const connectionTypeLocal = computed<string>({
|
|
252
263
|
get() {
|
|
@@ -278,7 +289,11 @@ const onChangeAdapterStatus = (adapterStatusNew: UI_I_AdapterStatus): void => {
|
|
|
278
289
|
}
|
|
279
290
|
|
|
280
291
|
// Step's content data and changers (targetDevice)
|
|
281
|
-
const targetDevice = ref<UI_I_TargetDevice>(
|
|
292
|
+
const targetDevice = ref<UI_I_TargetDevice>(
|
|
293
|
+
useDeepCopy(
|
|
294
|
+
targetDeviceInitialFunc(globalPermissions.value['Networks.UpdateSwitch'])
|
|
295
|
+
)
|
|
296
|
+
)
|
|
282
297
|
const mtuFromSwitch = ref<number>(1500)
|
|
283
298
|
|
|
284
299
|
const onChangeTargetDevice = (newTargetDevice: UI_I_TargetDevice): void => {
|
|
@@ -369,7 +384,10 @@ watch(
|
|
|
369
384
|
? (targetDevice.value.selected = '1')
|
|
370
385
|
: (targetDevice.value.selected = '0')
|
|
371
386
|
newCT === '1' && (targetDevice.value.selected = '1')
|
|
372
|
-
newCT === '2' &&
|
|
387
|
+
newCT === '2' &&
|
|
388
|
+
(globalPermissions.value['Networks.UpdateSwitch']
|
|
389
|
+
? (targetDevice.value.selected = '2')
|
|
390
|
+
: (targetDevice.value.selected = '3'))
|
|
373
391
|
}
|
|
374
392
|
if (newCT === '0') {
|
|
375
393
|
;(newTD.selected === '0' || newTD.selected === '1') &&
|
|
@@ -496,7 +514,9 @@ watch(
|
|
|
496
514
|
const reset = (): void => {
|
|
497
515
|
wizard.reset()
|
|
498
516
|
connectionTypeLocal.value = '0'
|
|
499
|
-
targetDevice.value = useDeepCopy(
|
|
517
|
+
targetDevice.value = useDeepCopy(
|
|
518
|
+
targetDeviceInitialFunc(globalPermissions.value['Networks.UpdateSwitch'])
|
|
519
|
+
)
|
|
500
520
|
connectionSettings.value = useDeepCopy(connectionSettingsInitial)
|
|
501
521
|
portProperties.value = useDeepCopy(portPropertiesInitial)
|
|
502
522
|
ipFourSettings.value = useDeepCopy(ipFourSettingsInitial)
|
|
@@ -22,13 +22,15 @@ export const servicesInitial: UI_I_Services = {
|
|
|
22
22
|
nVMeOverRDMA: false,
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export const
|
|
26
|
-
|
|
25
|
+
export const targetDeviceInitialFunc = (
|
|
26
|
+
updateSwitchPermission: boolean
|
|
27
|
+
): UI_I_TargetDevice => ({
|
|
28
|
+
selected: updateSwitchPermission ? '1' : '3',
|
|
27
29
|
network: '',
|
|
28
30
|
switch: '',
|
|
29
31
|
standardSwitch: '',
|
|
30
32
|
mtu: 1500,
|
|
31
|
-
}
|
|
33
|
+
})
|
|
32
34
|
|
|
33
35
|
export const portPropertiesInitial: UI_I_PortProperties = {
|
|
34
36
|
networkLabel: '',
|
package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
<div
|
|
36
36
|
v-show="props.connectionType === '2'"
|
|
37
|
+
v-permission="'Networks.UpdateSwitch'"
|
|
37
38
|
:class="['radio-block', { selected: fieldsLocal.selected === '2' }]"
|
|
38
39
|
@click="fieldsLocal.selected = '2'"
|
|
39
40
|
>
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
/>
|
|
47
48
|
</div>
|
|
48
49
|
|
|
49
|
-
<!-- v-permission="'Networks.CreateSwitch'" -->
|
|
50
50
|
<div
|
|
51
|
+
v-permission="'Networks.CreateSwitch'"
|
|
51
52
|
:class="['radio-block', { selected: fieldsLocal.selected === '3' }]"
|
|
52
53
|
@click="fieldsLocal.selected = '3'"
|
|
53
54
|
>
|
package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue
CHANGED
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
</div>
|
|
136
136
|
|
|
137
137
|
<div v-show="props.connectionType === '2'">
|
|
138
|
-
<div class="radio">
|
|
138
|
+
<div v-permission="'Networks.UpdateSwitch'" class="radio">
|
|
139
139
|
<input
|
|
140
140
|
id="existing-switch"
|
|
141
141
|
v-model="fieldsLocal.selected"
|
|
@@ -149,6 +149,7 @@
|
|
|
149
149
|
</label>
|
|
150
150
|
</div>
|
|
151
151
|
<fieldset
|
|
152
|
+
v-permission="'Networks.UpdateSwitch'"
|
|
152
153
|
:class="{
|
|
153
154
|
disabled: fieldsLocal.selected !== '2',
|
|
154
155
|
}"
|
|
@@ -197,8 +198,7 @@
|
|
|
197
198
|
</div>
|
|
198
199
|
|
|
199
200
|
<div>
|
|
200
|
-
|
|
201
|
-
<div class="radio">
|
|
201
|
+
<div v-permission="'Networks.CreateSwitch'" class="radio">
|
|
202
202
|
<input
|
|
203
203
|
id="standard-switch"
|
|
204
204
|
v-model="fieldsLocal.selected"
|
|
@@ -213,6 +213,7 @@
|
|
|
213
213
|
</label>
|
|
214
214
|
</div>
|
|
215
215
|
<fieldset
|
|
216
|
+
v-permission="'Networks.CreateSwitch'"
|
|
216
217
|
:class="{
|
|
217
218
|
disabled: fieldsLocal.selected !== '3',
|
|
218
219
|
}"
|
|
@@ -267,9 +268,7 @@ import type {
|
|
|
267
268
|
UI_I_ArbitraryObject,
|
|
268
269
|
UI_I_Localization,
|
|
269
270
|
} from '~/lib/models/interfaces'
|
|
270
|
-
import type {
|
|
271
|
-
UI_I_TargetDevice,
|
|
272
|
-
} from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
271
|
+
import type { UI_I_TargetDevice } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
273
272
|
|
|
274
273
|
const props = defineProps<{
|
|
275
274
|
fields: UI_I_TargetDevice
|
|
@@ -288,6 +287,19 @@ const emits = defineEmits<{
|
|
|
288
287
|
|
|
289
288
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
290
289
|
|
|
290
|
+
const existingStandardSwitchPermission = computed<string>(() => {
|
|
291
|
+
switch (props.connectionType) {
|
|
292
|
+
case '0':
|
|
293
|
+
return 'Networks.CreateSysx'
|
|
294
|
+
case '1':
|
|
295
|
+
return 'Networks.CreatePortGroup'
|
|
296
|
+
case '2':
|
|
297
|
+
return 'Networks.UpdateSwitch'
|
|
298
|
+
default:
|
|
299
|
+
return ''
|
|
300
|
+
}
|
|
301
|
+
})
|
|
302
|
+
|
|
291
303
|
const fieldsLocal = computed({
|
|
292
304
|
get() {
|
|
293
305
|
return props.fields
|