bfg-common 1.5.749 → 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 +9 -11
- package/assets/localization/local_en.json +9 -11
- package/assets/localization/local_hy.json +9 -11
- package/assets/localization/local_kk.json +9 -11
- package/assets/localization/local_ru.json +9 -11
- package/assets/localization/local_zh.json +9 -11
- 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 +0 -4
- 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/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/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 +1 -1
- package/plugins/time.ts +58 -58
- package/plugins/validation.ts +6 -6
|
@@ -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
package/plugins/time.ts
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { defineNuxtPlugin } from '#app'
|
|
2
|
-
import type { UI_T_LangValue } from '~/lib/models/types'
|
|
3
|
-
export default defineNuxtPlugin(() => {
|
|
4
|
-
const time = function (): any {
|
|
5
|
-
const self: any = {}
|
|
6
|
-
self.millisecondsToHour = function (ms: number): number {
|
|
7
|
-
return ~~(ms / 1000 / 60 / 60 / 24)
|
|
8
|
-
}
|
|
9
|
-
self.formatTime = (
|
|
10
|
-
seconds: number,
|
|
11
|
-
lang: UI_T_LangValue = 'ru_RU'
|
|
12
|
-
): string => {
|
|
13
|
-
const units = {
|
|
14
|
-
en_US: { s: 's', m: 'm', h: 'h' },
|
|
15
|
-
ru_RU: { s: 'с', m: 'м', h: 'ч' },
|
|
16
|
-
hy_AM: { s: 'վ', m: 'ր', h: 'ժ' },
|
|
17
|
-
be_BY: { s: 'с', m: 'хв', h: 'г' },
|
|
18
|
-
kk_KZ: { s: 'сек', m: 'мин', h: 'сағ' },
|
|
19
|
-
zh_CHS: { s: '秒', m: '分', h: '时' },
|
|
20
|
-
BROWSER: { s: 's', m: 'm', h: 'h' },
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const unit = units[lang] || units.en_US
|
|
24
|
-
|
|
25
|
-
if (seconds < 60) {
|
|
26
|
-
return `${seconds}${unit.s}`
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const hours = Math.floor(seconds / 3600)
|
|
30
|
-
const minutes = Math.floor((seconds % 3600) / 60)
|
|
31
|
-
const secs = seconds % 60
|
|
32
|
-
|
|
33
|
-
let result = ''
|
|
34
|
-
|
|
35
|
-
if (hours > 0) {
|
|
36
|
-
result += `${hours}${unit.h} `
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (minutes > 0) {
|
|
40
|
-
result += `${minutes}${unit.m} `
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (secs > 0) {
|
|
44
|
-
result += `${secs}${unit.s}`
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return result.trim()
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return self
|
|
51
|
-
}.call({})
|
|
52
|
-
|
|
53
|
-
return {
|
|
54
|
-
provide: {
|
|
55
|
-
time,
|
|
56
|
-
},
|
|
57
|
-
}
|
|
58
|
-
})
|
|
1
|
+
import { defineNuxtPlugin } from '#app'
|
|
2
|
+
import type { UI_T_LangValue } from '~/lib/models/types'
|
|
3
|
+
export default defineNuxtPlugin(() => {
|
|
4
|
+
const time = function (): any {
|
|
5
|
+
const self: any = {}
|
|
6
|
+
self.millisecondsToHour = function (ms: number): number {
|
|
7
|
+
return ~~(ms / 1000 / 60 / 60 / 24)
|
|
8
|
+
}
|
|
9
|
+
self.formatTime = (
|
|
10
|
+
seconds: number,
|
|
11
|
+
lang: UI_T_LangValue = 'ru_RU'
|
|
12
|
+
): string => {
|
|
13
|
+
const units = {
|
|
14
|
+
en_US: { s: 's', m: 'm', h: 'h' },
|
|
15
|
+
ru_RU: { s: 'с', m: 'м', h: 'ч' },
|
|
16
|
+
hy_AM: { s: 'վ', m: 'ր', h: 'ժ' },
|
|
17
|
+
be_BY: { s: 'с', m: 'хв', h: 'г' },
|
|
18
|
+
kk_KZ: { s: 'сек', m: 'мин', h: 'сағ' },
|
|
19
|
+
zh_CHS: { s: '秒', m: '分', h: '时' },
|
|
20
|
+
BROWSER: { s: 's', m: 'm', h: 'h' },
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const unit = units[lang] || units.en_US
|
|
24
|
+
|
|
25
|
+
if (seconds < 60) {
|
|
26
|
+
return `${seconds}${unit.s}`
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const hours = Math.floor(seconds / 3600)
|
|
30
|
+
const minutes = Math.floor((seconds % 3600) / 60)
|
|
31
|
+
const secs = seconds % 60
|
|
32
|
+
|
|
33
|
+
let result = ''
|
|
34
|
+
|
|
35
|
+
if (hours > 0) {
|
|
36
|
+
result += `${hours}${unit.h} `
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (minutes > 0) {
|
|
40
|
+
result += `${minutes}${unit.m} `
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (secs > 0) {
|
|
44
|
+
result += `${secs}${unit.s}`
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return result.trim()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return self
|
|
51
|
+
}.call({})
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
provide: {
|
|
55
|
+
time,
|
|
56
|
+
},
|
|
57
|
+
}
|
|
58
|
+
})
|
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
|