bfg-common 1.5.750 → 1.5.752
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 +13 -17
- package/assets/localization/local_en.json +13 -17
- package/assets/localization/local_hy.json +12 -16
- package/assets/localization/local_kk.json +12 -16
- package/assets/localization/local_ru.json +13 -17
- package/assets/localization/local_zh.json +13 -17
- package/components/common/diagramMain/Header.vue +0 -4
- 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/add/New.vue +12 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +1 -1
- package/components/common/vm/actions/common/select/compatibility/New.vue +0 -1
- package/components/common/vm/actions/common/select/storage/new/New.vue +1 -1
- package/components/common/vm/snapshots/modals/confirm/New.vue +0 -5
- package/components/common/vm/snapshots/modals/confirm/lib/models/enums.ts +2 -2
- package/components/common/vm/snapshots/modals/takeOrEdit/new/New.vue +7 -23
- package/components/common/vm/snapshots/new/New.vue +13 -96
- package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +10 -17
- package/components/common/vm/snapshots/new/lib/utils/details.ts +1 -1
- package/components/common/wizards/common/steps/computeResource/New.vue +9 -1
- package/components/common/wizards/network/add/Add.vue +5 -25
- package/components/common/wizards/network/add/lib/config/config.ts +1 -1
- package/components/common/wizards/network/add/lib/config/initialData.ts +3 -5
- package/components/common/wizards/network/add/lib/config/selectConnectionTypeStep.ts +0 -1
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +1 -2
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +6 -18
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +1 -11
- package/lib/config/regExp.ts +1 -1
- package/package.json +2 -2
- package/plugins/validation.ts +6 -6
- package/components/common/vm/snapshots/new/Skeleton.vue +0 -112
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<common-vm-snapshots-new-skeleton v-if="props.snapshotsLoading" />
|
|
3
2
|
<div
|
|
4
|
-
v-else
|
|
5
3
|
:class="[
|
|
6
4
|
'snapshots-page grid h-inherit p-4 overflow-hidden ',
|
|
7
5
|
{ 'selected gap-3': props.detailData },
|
|
8
6
|
]"
|
|
9
7
|
>
|
|
10
8
|
<div class="left-content overflow-auto grid p-4">
|
|
11
|
-
<div class="flex justify-between
|
|
9
|
+
<div class="flex justify-between">
|
|
12
10
|
<h3 class="title-block font-[500] text-[16px]">
|
|
13
11
|
{{ localization.inventoryTabs.snapshots }} ({{ snapshotsCount }})
|
|
14
12
|
</h3>
|
|
15
13
|
<ui-button
|
|
16
14
|
test-id="take-snapshot-btn"
|
|
17
15
|
size="md"
|
|
18
|
-
class="take-snapshot-button"
|
|
19
16
|
@click="emits('show-modal', 'take')"
|
|
20
17
|
>
|
|
21
18
|
<ui-icon
|
|
22
19
|
name="icon-snapshotTake"
|
|
23
20
|
width="20"
|
|
24
21
|
height="20"
|
|
25
|
-
class="mr-2
|
|
22
|
+
class="mr-2"
|
|
26
23
|
/>
|
|
27
|
-
{{ localization.
|
|
24
|
+
{{ localization.common.takeSnapshot }}
|
|
28
25
|
</ui-button>
|
|
29
26
|
</div>
|
|
30
27
|
<div
|
|
@@ -32,17 +29,16 @@
|
|
|
32
29
|
class="snapshots-tree-content overflow-y-auto my-4 px-2 pb-2"
|
|
33
30
|
>
|
|
34
31
|
<ui-tree
|
|
32
|
+
:is-loading="props.snapshotsLoading"
|
|
35
33
|
:nodes="props.snapshotsTree"
|
|
36
34
|
@select-node="emits('select-node', $event)"
|
|
37
35
|
@toggle-node="emits('show-nodes', $event.id)"
|
|
38
36
|
@show-context-menu="showContextMenu"
|
|
39
37
|
>
|
|
40
38
|
<template #content="{ node }">
|
|
41
|
-
<div class="flex-align-center
|
|
39
|
+
<div class="flex-align-center">
|
|
42
40
|
<span :class="['node-icon', node.iconClassName]"></span>
|
|
43
|
-
<span class="node-name text-ellipsis
|
|
44
|
-
node.name
|
|
45
|
-
}}</span>
|
|
41
|
+
<span class="node-name text-ellipsis">{{ node.name }}</span>
|
|
46
42
|
</div>
|
|
47
43
|
</template>
|
|
48
44
|
</ui-tree>
|
|
@@ -57,7 +53,7 @@
|
|
|
57
53
|
<p class="title-block font-[400] text-[16px] mt-2">
|
|
58
54
|
{{ localization.snapshots.noSnapshotsAvailable }}
|
|
59
55
|
</p>
|
|
60
|
-
<p class="description-block mt-[6px] text-[13px]
|
|
56
|
+
<p class="description-block mt-[6px] text-[13px]">
|
|
61
57
|
{{ localization.snapshots.noSnapshotsAvailableDesc }}
|
|
62
58
|
</p>
|
|
63
59
|
</div>
|
|
@@ -82,7 +78,7 @@
|
|
|
82
78
|
v-if="props.detailData"
|
|
83
79
|
class="snapshot-details overflow-hidden flex-direction-column p-4"
|
|
84
80
|
>
|
|
85
|
-
<div class="flex justify-between mb-6
|
|
81
|
+
<div class="flex justify-between mb-6">
|
|
86
82
|
<h3 class="title-block font-[500] text-[16px]">
|
|
87
83
|
{{ localization.snapshots.snapshotDetails }}
|
|
88
84
|
</h3>
|
|
@@ -172,13 +168,7 @@
|
|
|
172
168
|
</ui-tooltip>
|
|
173
169
|
</div>
|
|
174
170
|
</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
|
-
>
|
|
171
|
+
<div class="grid row-gap-3 overflow-y-auto">
|
|
182
172
|
<ui-info-block
|
|
183
173
|
v-for="(item, index) in currentDetailsData"
|
|
184
174
|
:key="index"
|
|
@@ -189,12 +179,9 @@
|
|
|
189
179
|
<ui-icon
|
|
190
180
|
v-if="item.labelIcon"
|
|
191
181
|
:name="item.labelIcon"
|
|
192
|
-
:class="[
|
|
193
|
-
'info-label-icon mr-[10px]',
|
|
194
|
-
`icon-name-${item.labelIcon}`,
|
|
195
|
-
]"
|
|
196
182
|
width="20"
|
|
197
183
|
height="20"
|
|
184
|
+
class="info-label-icon mr-[10px]"
|
|
198
185
|
/>
|
|
199
186
|
<span class="info-label">{{ item.label }}</span>
|
|
200
187
|
</div>
|
|
@@ -227,7 +214,6 @@
|
|
|
227
214
|
</template>
|
|
228
215
|
|
|
229
216
|
<script setup lang="ts">
|
|
230
|
-
import { useElementSize } from '@vueuse/core'
|
|
231
217
|
import type { UI_I_InfoBlock } from '~/node_modules/bfg-uikit/components/ui/infoBlock/models/interfaces'
|
|
232
218
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
233
219
|
import type { UI_T_SnapshotActionType } from '~/components/common/vm/snapshots/lib/models/types'
|
|
@@ -267,20 +253,6 @@ const { showContextMenu, contextMenuShow, contextMenu } = utils.getContextMenu()
|
|
|
267
253
|
const onSelectContextMenuItem = (actionType: UI_T_SnapshotActionType): void => {
|
|
268
254
|
emits('show-modal', actionType)
|
|
269
255
|
}
|
|
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
|
-
})
|
|
284
256
|
</script>
|
|
285
257
|
|
|
286
258
|
<style>
|
|
@@ -288,9 +260,7 @@ watch(height, () => {
|
|
|
288
260
|
--snapshots-page-inner-block-bg: #ffffff;
|
|
289
261
|
--snapshots-page-title-color: #4d5d69;
|
|
290
262
|
--snapshots-page-tree-border-color: #e9ebed;
|
|
291
|
-
--snapshots-page-tree-block-bg-color: #ffffff;
|
|
292
263
|
--snapshots-page-details-action-color: #4d5d69;
|
|
293
|
-
--snapshots-page-details-action-line-color: #e9ebeda3;
|
|
294
264
|
--snapshots-page-details-action-hover-color: #213444;
|
|
295
265
|
--snapshots-page-info-block-label-color: #4d5d69;
|
|
296
266
|
--snapshots-page-info-block-value-color: #182531;
|
|
@@ -299,9 +269,7 @@ watch(height, () => {
|
|
|
299
269
|
--snapshots-page-inner-block-bg: #334453;
|
|
300
270
|
--snapshots-page-title-color: #e9eaec;
|
|
301
271
|
--snapshots-page-tree-border-color: #e9ebed1f;
|
|
302
|
-
--snapshots-page-tree-block-bg-color: #1b2a371f;
|
|
303
272
|
--snapshots-page-details-action-color: #e9eaec;
|
|
304
|
-
--snapshots-page-details-action-line-color: #e9ebed1f;
|
|
305
273
|
--snapshots-page-details-action-hover-color: #ffffff;
|
|
306
274
|
--snapshots-page-info-block-label-color: #e9eaec;
|
|
307
275
|
--snapshots-page-info-block-value-color: #e9eaec;
|
|
@@ -317,13 +285,6 @@ watch(height, () => {
|
|
|
317
285
|
.title-block {
|
|
318
286
|
color: var(--snapshots-page-title-color);
|
|
319
287
|
}
|
|
320
|
-
.take-snapshot-button {
|
|
321
|
-
white-space: nowrap;
|
|
322
|
-
|
|
323
|
-
.icon {
|
|
324
|
-
min-width: 20px;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
288
|
|
|
328
289
|
.left-content {
|
|
329
290
|
background-color: var(--snapshots-page-inner-block-bg);
|
|
@@ -334,14 +295,13 @@ watch(height, () => {
|
|
|
334
295
|
.snapshots-tree-content {
|
|
335
296
|
border: 1px solid var(--snapshots-page-tree-border-color);
|
|
336
297
|
border-radius: 8px;
|
|
337
|
-
background-color: var(--snapshots-page-tree-block-bg-color);
|
|
338
298
|
|
|
339
299
|
:deep(.tree-container) {
|
|
340
300
|
width: max-content;
|
|
341
301
|
min-width: 100%;
|
|
342
302
|
|
|
343
303
|
.tree-content {
|
|
344
|
-
|
|
304
|
+
padding-right: 8px;
|
|
345
305
|
|
|
346
306
|
.node-wrapper {
|
|
347
307
|
border-radius: 4px;
|
|
@@ -360,10 +320,6 @@ watch(height, () => {
|
|
|
360
320
|
}
|
|
361
321
|
}
|
|
362
322
|
.delete-all {
|
|
363
|
-
&.disabled {
|
|
364
|
-
color: #bdc3c7;
|
|
365
|
-
}
|
|
366
|
-
|
|
367
323
|
&:not(.disabled) {
|
|
368
324
|
color: #ea3223;
|
|
369
325
|
}
|
|
@@ -373,18 +329,12 @@ watch(height, () => {
|
|
|
373
329
|
background-color: var(--snapshots-page-inner-block-bg);
|
|
374
330
|
box-shadow: 0 1px 4px 0 #00000014;
|
|
375
331
|
border-radius: 8px;
|
|
376
|
-
padding-right: 0;
|
|
377
332
|
|
|
378
333
|
.details-actions-block {
|
|
379
334
|
.border-line {
|
|
380
335
|
width: 1px;
|
|
381
336
|
height: 20px;
|
|
382
|
-
background-color:
|
|
383
|
-
}
|
|
384
|
-
.revert-snapshot-btn {
|
|
385
|
-
:deep(path) {
|
|
386
|
-
stroke-width: 1.6;
|
|
387
|
-
}
|
|
337
|
+
background-color: #e9ebeda3;
|
|
388
338
|
}
|
|
389
339
|
.revert-snapshot-btn,
|
|
390
340
|
.edit-snapshot-btn {
|
|
@@ -398,40 +348,18 @@ watch(height, () => {
|
|
|
398
348
|
color: #ea3223;
|
|
399
349
|
}
|
|
400
350
|
}
|
|
401
|
-
.details-scroll-block {
|
|
402
|
-
padding-right: 0;
|
|
403
|
-
|
|
404
|
-
&:not(.has-scroll) {
|
|
405
|
-
padding-right: 16px;
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
351
|
.info-block-label-content {
|
|
409
352
|
.info-label-icon {
|
|
410
353
|
color: #9da6ad;
|
|
411
354
|
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
|
-
}
|
|
423
355
|
}
|
|
424
356
|
.info-label {
|
|
425
|
-
margin-top:
|
|
426
|
-
line-height: 18px;
|
|
357
|
+
margin-top: 2.5px;
|
|
427
358
|
color: var(--snapshots-page-info-block-label-color);
|
|
428
359
|
}
|
|
429
360
|
}
|
|
430
361
|
.empty-description {
|
|
431
362
|
color: #9da6ad;
|
|
432
|
-
margin-top: 1px;
|
|
433
|
-
line-height: 18px;
|
|
434
|
-
text-align: right;
|
|
435
363
|
}
|
|
436
364
|
:deep(.ui-main-info-block-item-right) {
|
|
437
365
|
white-space: unset !important;
|
|
@@ -444,23 +372,12 @@ watch(height, () => {
|
|
|
444
372
|
color: var(--snapshots-page-info-block-value-color);
|
|
445
373
|
font-size: 13px;
|
|
446
374
|
font-weight: 400;
|
|
447
|
-
line-height: 18px;
|
|
448
|
-
margin-top: 1px;
|
|
449
375
|
}
|
|
450
376
|
:deep(.ui-main-info-block-item-right-open) {
|
|
451
377
|
display: none;
|
|
452
378
|
}
|
|
453
379
|
}
|
|
454
380
|
}
|
|
455
|
-
:root.dark-theme {
|
|
456
|
-
.left-content {
|
|
457
|
-
.delete-all {
|
|
458
|
-
&.disabled {
|
|
459
|
-
opacity: 0.44;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
381
|
|
|
465
382
|
@media (max-width: 1200px) {
|
|
466
383
|
.snapshots-page {
|
|
@@ -54,7 +54,6 @@ 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)
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
watch(
|
|
@@ -76,26 +75,20 @@ const onSelectContextMenuItem = (item: UI_I_ContextMenuItem): void => {
|
|
|
76
75
|
|
|
77
76
|
<style scoped lang="scss">
|
|
78
77
|
.snapshot-context-menu-view {
|
|
79
|
-
:deep(.
|
|
80
|
-
|
|
78
|
+
:deep(.menu-item) {
|
|
79
|
+
.context-icon {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
81
82
|
|
|
82
|
-
.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
83
|
+
.item-ui-icon {
|
|
84
|
+
margin-right: 8px;
|
|
85
|
+
}
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
width: 16px;
|
|
90
|
-
height: 16px;
|
|
91
|
-
}
|
|
87
|
+
&:last-child {
|
|
88
|
+
color: #ea3223;
|
|
92
89
|
|
|
93
|
-
|
|
90
|
+
.context-link:hover {
|
|
94
91
|
color: #ea3223;
|
|
95
|
-
|
|
96
|
-
.context-link:hover {
|
|
97
|
-
color: #ea3223;
|
|
98
|
-
}
|
|
99
92
|
}
|
|
100
93
|
}
|
|
101
94
|
}
|
|
@@ -52,8 +52,16 @@ const onSelectNode = (node: UI_I_TreeNode): void => emits('select-node', node)
|
|
|
52
52
|
<style scoped lang="scss">
|
|
53
53
|
@import 'assets/scss/common/mixins.scss';
|
|
54
54
|
.compute-resource {
|
|
55
|
+
display: grid;
|
|
56
|
+
grid-template-rows: 1fr auto;
|
|
57
|
+
min-height: 100%;
|
|
58
|
+
padding-top: 16px;
|
|
59
|
+
padding-bottom: 16px;
|
|
60
|
+
grid-row-gap: 24px;
|
|
61
|
+
|
|
55
62
|
&__container-tree {
|
|
56
|
-
height: 240px;
|
|
63
|
+
max-height: 240px;
|
|
64
|
+
height: 100%;
|
|
57
65
|
background: var(--input-bg);
|
|
58
66
|
border: 1px solid var(--line-color);
|
|
59
67
|
border-radius: 8px;
|
|
@@ -146,7 +146,7 @@ import {
|
|
|
146
146
|
connectionSettingsInitial,
|
|
147
147
|
portPropertiesInitial,
|
|
148
148
|
ipFourSettingsInitial,
|
|
149
|
-
|
|
149
|
+
targetDeviceInitial,
|
|
150
150
|
addNetworkingZeroOrFirstSchemeDataFunc,
|
|
151
151
|
addNetworkingSecondOrThirdSchemeDataFunc,
|
|
152
152
|
addNetworkingFourthOrFifthSchemeDataFunc,
|
|
@@ -245,19 +245,8 @@ 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
|
-
|
|
252
248
|
// Step's content data (connectionType)
|
|
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
|
-
)
|
|
249
|
+
const connectionType = ref<string>('0')
|
|
261
250
|
|
|
262
251
|
const connectionTypeLocal = computed<string>({
|
|
263
252
|
get() {
|
|
@@ -289,11 +278,7 @@ const onChangeAdapterStatus = (adapterStatusNew: UI_I_AdapterStatus): void => {
|
|
|
289
278
|
}
|
|
290
279
|
|
|
291
280
|
// Step's content data and changers (targetDevice)
|
|
292
|
-
const targetDevice = ref<UI_I_TargetDevice>(
|
|
293
|
-
useDeepCopy(
|
|
294
|
-
targetDeviceInitialFunc(globalPermissions.value['Networks.UpdateSwitch'])
|
|
295
|
-
)
|
|
296
|
-
)
|
|
281
|
+
const targetDevice = ref<UI_I_TargetDevice>(useDeepCopy(targetDeviceInitial))
|
|
297
282
|
const mtuFromSwitch = ref<number>(1500)
|
|
298
283
|
|
|
299
284
|
const onChangeTargetDevice = (newTargetDevice: UI_I_TargetDevice): void => {
|
|
@@ -384,10 +369,7 @@ watch(
|
|
|
384
369
|
? (targetDevice.value.selected = '1')
|
|
385
370
|
: (targetDevice.value.selected = '0')
|
|
386
371
|
newCT === '1' && (targetDevice.value.selected = '1')
|
|
387
|
-
newCT === '2' &&
|
|
388
|
-
(globalPermissions.value['Networks.UpdateSwitch']
|
|
389
|
-
? (targetDevice.value.selected = '2')
|
|
390
|
-
: (targetDevice.value.selected = '3'))
|
|
372
|
+
newCT === '2' && (targetDevice.value.selected = '2')
|
|
391
373
|
}
|
|
392
374
|
if (newCT === '0') {
|
|
393
375
|
;(newTD.selected === '0' || newTD.selected === '1') &&
|
|
@@ -514,9 +496,7 @@ watch(
|
|
|
514
496
|
const reset = (): void => {
|
|
515
497
|
wizard.reset()
|
|
516
498
|
connectionTypeLocal.value = '0'
|
|
517
|
-
targetDevice.value = useDeepCopy(
|
|
518
|
-
targetDeviceInitialFunc(globalPermissions.value['Networks.UpdateSwitch'])
|
|
519
|
-
)
|
|
499
|
+
targetDevice.value = useDeepCopy(targetDeviceInitial)
|
|
520
500
|
connectionSettings.value = useDeepCopy(connectionSettingsInitial)
|
|
521
501
|
portProperties.value = useDeepCopy(portPropertiesInitial)
|
|
522
502
|
ipFourSettings.value = useDeepCopy(ipFourSettingsInitial)
|
|
@@ -22,15 +22,13 @@ export const servicesInitial: UI_I_Services = {
|
|
|
22
22
|
nVMeOverRDMA: false,
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export const
|
|
26
|
-
|
|
27
|
-
): UI_I_TargetDevice => ({
|
|
28
|
-
selected: updateSwitchPermission ? '1' : '3',
|
|
25
|
+
export const targetDeviceInitial: UI_I_TargetDevice = {
|
|
26
|
+
selected: '1',
|
|
29
27
|
network: '',
|
|
30
28
|
switch: '',
|
|
31
29
|
standardSwitch: '',
|
|
32
30
|
mtu: 1500,
|
|
33
|
-
}
|
|
31
|
+
}
|
|
34
32
|
|
|
35
33
|
export const portPropertiesInitial: UI_I_PortProperties = {
|
|
36
34
|
networkLabel: '',
|
package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
|
|
35
35
|
<div
|
|
36
36
|
v-show="props.connectionType === '2'"
|
|
37
|
-
v-permission="'Networks.UpdateSwitch'"
|
|
38
37
|
:class="['radio-block', { selected: fieldsLocal.selected === '2' }]"
|
|
39
38
|
@click="fieldsLocal.selected = '2'"
|
|
40
39
|
>
|
|
@@ -47,8 +46,8 @@
|
|
|
47
46
|
/>
|
|
48
47
|
</div>
|
|
49
48
|
|
|
49
|
+
<!-- v-permission="'Networks.CreateSwitch'" -->
|
|
50
50
|
<div
|
|
51
|
-
v-permission="'Networks.CreateSwitch'"
|
|
52
51
|
:class="['radio-block', { selected: fieldsLocal.selected === '3' }]"
|
|
53
52
|
@click="fieldsLocal.selected = '3'"
|
|
54
53
|
>
|
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
|
|
138
|
+
<div class="radio">
|
|
139
139
|
<input
|
|
140
140
|
id="existing-switch"
|
|
141
141
|
v-model="fieldsLocal.selected"
|
|
@@ -149,7 +149,6 @@
|
|
|
149
149
|
</label>
|
|
150
150
|
</div>
|
|
151
151
|
<fieldset
|
|
152
|
-
v-permission="'Networks.UpdateSwitch'"
|
|
153
152
|
:class="{
|
|
154
153
|
disabled: fieldsLocal.selected !== '2',
|
|
155
154
|
}"
|
|
@@ -198,7 +197,8 @@
|
|
|
198
197
|
</div>
|
|
199
198
|
|
|
200
199
|
<div>
|
|
201
|
-
|
|
200
|
+
<!-- v-permission="'Networks.CreateSwitch'"-->
|
|
201
|
+
<div class="radio">
|
|
202
202
|
<input
|
|
203
203
|
id="standard-switch"
|
|
204
204
|
v-model="fieldsLocal.selected"
|
|
@@ -213,7 +213,6 @@
|
|
|
213
213
|
</label>
|
|
214
214
|
</div>
|
|
215
215
|
<fieldset
|
|
216
|
-
v-permission="'Networks.CreateSwitch'"
|
|
217
216
|
:class="{
|
|
218
217
|
disabled: fieldsLocal.selected !== '3',
|
|
219
218
|
}"
|
|
@@ -268,7 +267,9 @@ import type {
|
|
|
268
267
|
UI_I_ArbitraryObject,
|
|
269
268
|
UI_I_Localization,
|
|
270
269
|
} from '~/lib/models/interfaces'
|
|
271
|
-
import type {
|
|
270
|
+
import type {
|
|
271
|
+
UI_I_TargetDevice,
|
|
272
|
+
} from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
272
273
|
|
|
273
274
|
const props = defineProps<{
|
|
274
275
|
fields: UI_I_TargetDevice
|
|
@@ -287,19 +288,6 @@ const emits = defineEmits<{
|
|
|
287
288
|
|
|
288
289
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
289
290
|
|
|
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
|
-
|
|
303
291
|
const fieldsLocal = computed({
|
|
304
292
|
get() {
|
|
305
293
|
return props.fields
|
|
@@ -84,67 +84,57 @@ export const bodyItems = (
|
|
|
84
84
|
key: 'col0',
|
|
85
85
|
text: disk[vmMigrateDiskTableItemKeys[0]],
|
|
86
86
|
id: key,
|
|
87
|
-
testId: `disk-table-${key}`,
|
|
88
87
|
},
|
|
89
88
|
{
|
|
90
89
|
key: 'col1',
|
|
91
90
|
text: disk[vmMigrateDiskTableItemKeys[1]],
|
|
92
91
|
id: key,
|
|
93
|
-
testId: `disk-table-${key}`,
|
|
94
92
|
},
|
|
95
93
|
{
|
|
96
94
|
key: 'col2',
|
|
97
95
|
text: file,
|
|
98
96
|
id: key,
|
|
99
|
-
testId: `disk-table-${key}`,
|
|
100
97
|
},
|
|
101
98
|
{
|
|
102
99
|
key: 'col3',
|
|
103
100
|
text: disk[vmMigrateDiskTableItemKeys[3]],
|
|
104
101
|
id: key,
|
|
105
|
-
testId: `disk-table-${key}`,
|
|
106
102
|
},
|
|
107
103
|
{
|
|
108
104
|
key: 'col4',
|
|
109
105
|
text: diskFormat,
|
|
110
106
|
id: key,
|
|
111
|
-
testId: `disk-table-${key}`,
|
|
112
107
|
},
|
|
113
108
|
{
|
|
114
109
|
key: 'col5',
|
|
115
110
|
text: disk.extra[vmMigrateDiskTableItemKeys[5]],
|
|
116
111
|
id: key,
|
|
117
|
-
testId: `disk-table-${key}`,
|
|
118
112
|
},
|
|
113
|
+
|
|
119
114
|
{
|
|
120
115
|
key: 'col6',
|
|
121
116
|
text: disk.extra[vmMigrateDiskTableItemKeys[6]],
|
|
122
117
|
id: key,
|
|
123
|
-
testId: `disk-table-${key}`,
|
|
124
118
|
},
|
|
125
119
|
{
|
|
126
120
|
key: 'col7',
|
|
127
121
|
text: disk.extra[vmMigrateDiskTableItemKeys[7]],
|
|
128
122
|
id: key,
|
|
129
|
-
testId: `disk-table-${key}`,
|
|
130
123
|
},
|
|
131
124
|
{
|
|
132
125
|
key: 'col8',
|
|
133
126
|
text: disk.extra[vmMigrateDiskTableItemKeys[8]],
|
|
134
127
|
id: key,
|
|
135
|
-
testId: `disk-table-${key}`,
|
|
136
128
|
},
|
|
137
129
|
{
|
|
138
130
|
key: 'col9',
|
|
139
131
|
text: disk.extra[vmMigrateDiskTableItemKeys[9]],
|
|
140
132
|
id: key,
|
|
141
|
-
testId: `disk-table-${key}`,
|
|
142
133
|
},
|
|
143
134
|
{
|
|
144
135
|
key: 'col10',
|
|
145
136
|
text: disk.extra[vmMigrateDiskTableItemKeys[10]],
|
|
146
137
|
id: key,
|
|
147
|
-
testId: `disk-table-${key}`,
|
|
148
138
|
},
|
|
149
139
|
])
|
|
150
140
|
})
|
package/lib/config/regExp.ts
CHANGED
|
@@ -8,7 +8,7 @@ const url = /https?:\/\/([a-zA-Zа-яА-Я0-9.-]+\.[a-zA-Zа-яА-Я]{2,6})\b/
|
|
|
8
8
|
const specialChar = /[!@#$%^&*(),.?":{}|<>]/
|
|
9
9
|
const specialCharWidthSpace = /[!@#$%^&*(),?":{}|<>]|(\s)|\.$/
|
|
10
10
|
const cron = /^(\*|([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])|\*\/([0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9])) (\*|([0-9]|1[0-9]|2[0-3])|\*\/([0-9]|1[0-9]|2[0-3])) (\*|([1-9]|1[0-9]|2[0-9]|3[0-1])|\*\/([1-9]|1[0-9]|2[0-9]|3[0-1])) (\*|([1-9]|1[0-2])|\*\/([1-9]|1[0-2])) (\*|([0-6])|\*\/([0-6]))$/
|
|
11
|
-
export const
|
|
11
|
+
export const RegExp = {
|
|
12
12
|
ip,
|
|
13
13
|
email,
|
|
14
14
|
password,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.752",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@vueuse/core": "10.1.2",
|
|
19
19
|
"@vueuse/nuxt": "10.1.2",
|
|
20
20
|
"bfg-nuxt-3-graph": "1.0.27",
|
|
21
|
-
"bfg-uikit": "1.0.
|
|
21
|
+
"bfg-uikit": "1.0.538",
|
|
22
22
|
"eslint-config-prettier": "^8.5.0",
|
|
23
23
|
"eslint-plugin-myrules": "file:./eslint",
|
|
24
24
|
"nuxt": "3.11.2",
|
package/plugins/validation.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RegExp } from '~/lib/config/regExp'
|
|
2
2
|
import type {
|
|
3
3
|
UI_I_Validation,
|
|
4
4
|
UI_I_ValidationOption,
|
|
@@ -127,30 +127,30 @@ export default defineNuxtPlugin(() => {
|
|
|
127
127
|
error = validation.errorText
|
|
128
128
|
}
|
|
129
129
|
} else if (validation.value === 'ip') {
|
|
130
|
-
const isValid =
|
|
130
|
+
const isValid = RegExp.ip.test(value)
|
|
131
131
|
if (!isValid) {
|
|
132
132
|
error = validation.errorText
|
|
133
133
|
}
|
|
134
134
|
} else if (validation.value === 'password') {
|
|
135
|
-
const isValid = value ?
|
|
135
|
+
const isValid = value ? RegExp.password.test(value) : true
|
|
136
136
|
|
|
137
137
|
if (!isValid) {
|
|
138
138
|
error = validation.errorText
|
|
139
139
|
}
|
|
140
140
|
} else if (validation.value === 'email') {
|
|
141
|
-
const isValid = value ?
|
|
141
|
+
const isValid = value ? RegExp.email.test(value) : true
|
|
142
142
|
|
|
143
143
|
if (!isValid) {
|
|
144
144
|
error = validation.errorText
|
|
145
145
|
}
|
|
146
146
|
} else if (validation.value === 'url') {
|
|
147
|
-
const isValid = value ?
|
|
147
|
+
const isValid = value ? RegExp.url.test(value) : true
|
|
148
148
|
|
|
149
149
|
if (!isValid) {
|
|
150
150
|
error = validation.errorText
|
|
151
151
|
}
|
|
152
152
|
} else if (validation.value === 'cron') {
|
|
153
|
-
const isValid = value ?
|
|
153
|
+
const isValid = value ? RegExp.cron.test(value) : true
|
|
154
154
|
|
|
155
155
|
if (!isValid) {
|
|
156
156
|
error = validation.errorText
|