bfg-common 1.5.762 → 1.5.764
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/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/configure/securityProfile/SecurityProfile.vue +17 -0
- package/components/common/configure/securityProfile/lockdownMode/LockdownMode.vue +97 -0
- package/components/common/configure/securityProfile/lockdownMode/lib/utils/constructData.ts +33 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/LockdownModeEdit.vue +61 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/New.vue +5 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/Old.vue +109 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/ExceptionUsers.vue +28 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/New.vue +5 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/Old.vue +179 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/table.ts +64 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/tableKeys.ts +6 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/models/types.ts +1 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lib/config/tabs.ts +19 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lockdownMode/LockdownMode.vue +22 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lockdownMode/New.vue +5 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lockdownMode/Old.vue +76 -0
- package/components/common/configure/securityProfile/lockdownMode/tools/New.vue +5 -0
- package/components/common/configure/securityProfile/lockdownMode/tools/Old.vue +30 -0
- package/components/common/configure/securityProfile/lockdownMode/tools/Tools.vue +29 -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/package.json +1 -1
- package/plugins/time.ts +58 -58
- package/store/inventory/modules/configure/securityProfile/lib/models/interfaces.ts +12 -0
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
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface UI_API_I_LockdownModeData {
|
|
2
|
+
lockdownMode: string
|
|
3
|
+
exceptionUsers: string[]
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface UI_API_I_SecurityProfileData {
|
|
7
|
+
lockdownMode: UI_API_I_LockdownModeData
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UI_I_LockdownModeData extends UI_API_I_LockdownModeData {}
|
|
11
|
+
|
|
12
|
+
export interface UI_I_SecurityProfileData extends UI_API_I_SecurityProfileData {}
|