bfg-common 1.5.752 → 1.5.754
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 +17 -13
- package/assets/localization/local_en.json +17 -13
- package/assets/localization/local_hy.json +16 -12
- package/assets/localization/local_kk.json +16 -12
- package/assets/localization/local_ru.json +17 -13
- package/assets/localization/local_zh.json +17 -13
- package/components/common/diagramMain/Header.vue +4 -0
- 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/backupsNew/BackupsNew.vue +110 -19
- package/components/common/pages/backups/backupsNew/Skeleton.vue +112 -0
- package/components/common/pages/backups/backupsNew/contextMenuView/ContextMenuView.vue +16 -10
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/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 +99 -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/validation.ts +6 -6
|
@@ -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
|
|
@@ -84,57 +84,67 @@ export const bodyItems = (
|
|
|
84
84
|
key: 'col0',
|
|
85
85
|
text: disk[vmMigrateDiskTableItemKeys[0]],
|
|
86
86
|
id: key,
|
|
87
|
+
testId: `disk-table-${key}`,
|
|
87
88
|
},
|
|
88
89
|
{
|
|
89
90
|
key: 'col1',
|
|
90
91
|
text: disk[vmMigrateDiskTableItemKeys[1]],
|
|
91
92
|
id: key,
|
|
93
|
+
testId: `disk-table-${key}`,
|
|
92
94
|
},
|
|
93
95
|
{
|
|
94
96
|
key: 'col2',
|
|
95
97
|
text: file,
|
|
96
98
|
id: key,
|
|
99
|
+
testId: `disk-table-${key}`,
|
|
97
100
|
},
|
|
98
101
|
{
|
|
99
102
|
key: 'col3',
|
|
100
103
|
text: disk[vmMigrateDiskTableItemKeys[3]],
|
|
101
104
|
id: key,
|
|
105
|
+
testId: `disk-table-${key}`,
|
|
102
106
|
},
|
|
103
107
|
{
|
|
104
108
|
key: 'col4',
|
|
105
109
|
text: diskFormat,
|
|
106
110
|
id: key,
|
|
111
|
+
testId: `disk-table-${key}`,
|
|
107
112
|
},
|
|
108
113
|
{
|
|
109
114
|
key: 'col5',
|
|
110
115
|
text: disk.extra[vmMigrateDiskTableItemKeys[5]],
|
|
111
116
|
id: key,
|
|
117
|
+
testId: `disk-table-${key}`,
|
|
112
118
|
},
|
|
113
|
-
|
|
114
119
|
{
|
|
115
120
|
key: 'col6',
|
|
116
121
|
text: disk.extra[vmMigrateDiskTableItemKeys[6]],
|
|
117
122
|
id: key,
|
|
123
|
+
testId: `disk-table-${key}`,
|
|
118
124
|
},
|
|
119
125
|
{
|
|
120
126
|
key: 'col7',
|
|
121
127
|
text: disk.extra[vmMigrateDiskTableItemKeys[7]],
|
|
122
128
|
id: key,
|
|
129
|
+
testId: `disk-table-${key}`,
|
|
123
130
|
},
|
|
124
131
|
{
|
|
125
132
|
key: 'col8',
|
|
126
133
|
text: disk.extra[vmMigrateDiskTableItemKeys[8]],
|
|
127
134
|
id: key,
|
|
135
|
+
testId: `disk-table-${key}`,
|
|
128
136
|
},
|
|
129
137
|
{
|
|
130
138
|
key: 'col9',
|
|
131
139
|
text: disk.extra[vmMigrateDiskTableItemKeys[9]],
|
|
132
140
|
id: key,
|
|
141
|
+
testId: `disk-table-${key}`,
|
|
133
142
|
},
|
|
134
143
|
{
|
|
135
144
|
key: 'col10',
|
|
136
145
|
text: disk.extra[vmMigrateDiskTableItemKeys[10]],
|
|
137
146
|
id: key,
|
|
147
|
+
testId: `disk-table-${key}`,
|
|
138
148
|
},
|
|
139
149
|
])
|
|
140
150
|
})
|
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 allRegExp = {
|
|
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.754",
|
|
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.539",
|
|
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 { allRegExp } 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 = allRegExp.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 ? allRegExp.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 ? allRegExp.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 ? allRegExp.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 ? allRegExp.cron.test(value) : true
|
|
154
154
|
|
|
155
155
|
if (!isValid) {
|
|
156
156
|
error = validation.errorText
|