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.
Files changed (42) hide show
  1. package/assets/localization/local_be.json +19 -15
  2. package/assets/localization/local_en.json +19 -15
  3. package/assets/localization/local_hy.json +18 -14
  4. package/assets/localization/local_kk.json +18 -14
  5. package/assets/localization/local_ru.json +19 -15
  6. package/assets/localization/local_zh.json +19 -15
  7. package/components/atoms/table/dataGrid/DataGrid.vue +8 -8
  8. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  9. package/components/common/browse/lib/models/interfaces.ts +5 -5
  10. package/components/common/diagramMain/Header.vue +4 -0
  11. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  12. package/components/common/diagramMain/network/Contents.vue +497 -497
  13. package/components/common/diagramMain/port/Port.vue +580 -580
  14. package/components/common/layout/theHeader/feedback/new/email/Email.vue +2 -2
  15. package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +2 -2
  16. package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
  17. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
  18. package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
  19. package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
  20. package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +1 -1
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +1 -0
  23. package/components/common/vm/actions/common/customizeHardware/vmoptions/New.vue +2 -2
  24. package/components/common/vm/snapshots/modals/confirm/New.vue +5 -0
  25. package/components/common/vm/snapshots/modals/confirm/lib/models/enums.ts +2 -2
  26. package/components/common/vm/snapshots/modals/takeOrEdit/new/New.vue +23 -7
  27. package/components/common/vm/snapshots/new/New.vue +96 -13
  28. package/components/common/vm/snapshots/new/Skeleton.vue +112 -0
  29. package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +17 -10
  30. package/components/common/vm/snapshots/new/lib/utils/details.ts +1 -1
  31. package/components/common/wizards/network/add/Add.vue +25 -5
  32. package/components/common/wizards/network/add/lib/config/config.ts +1 -1
  33. package/components/common/wizards/network/add/lib/config/initialData.ts +5 -3
  34. package/components/common/wizards/network/add/lib/config/selectConnectionTypeStep.ts +1 -0
  35. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +2 -1
  36. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +18 -6
  37. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/old/lib/config/hostTable.ts +1 -1
  38. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +11 -1
  39. package/lib/config/regExp.ts +1 -1
  40. package/package.json +2 -2
  41. package/plugins/time.ts +58 -58
  42. package/plugins/validation.ts +6 -6
@@ -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
  })
@@ -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 RegExp = {
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.752",
4
+ "version": "1.5.753",
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.538",
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/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
+ })
@@ -1,4 +1,4 @@
1
- import { RegExp } from '~/lib/config/regExp'
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 = RegExp.ip.test(value)
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 ? RegExp.password.test(value) : true
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 ? RegExp.email.test(value) : true
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 ? RegExp.url.test(value) : true
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 ? RegExp.cron.test(value) : true
153
+ const isValid = value ? allRegExp.cron.test(value) : true
154
154
 
155
155
  if (!isValid) {
156
156
  error = validation.errorText