bfg-common 1.5.763 → 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/configure/securityProfile/SecurityProfile.vue +4 -0
- package/components/common/configure/securityProfile/lockdownMode/LockdownMode.vue +5 -2
- package/components/common/configure/securityProfile/lockdownMode/lib/utils/constructData.ts +10 -4
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/LockdownModeEdit.vue +1 -0
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/Old.vue +0 -41
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/ExceptionUsers.vue +2 -2
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/Old.vue +45 -3
- package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/table.ts +26 -5
- package/components/common/configure/securityProfile/lockdownMode/tools/Tools.vue +5 -0
- package/package.json +1 -1
- package/store/inventory/modules/configure/securityProfile/lib/models/interfaces.ts +2 -2
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<common-configure-security-profile-lockdown-mode
|
|
3
3
|
:active-node-name="props.activeNodeName"
|
|
4
|
+
:api-data="props.apiData"
|
|
4
5
|
/>
|
|
5
6
|
</template>
|
|
6
7
|
|
|
7
8
|
<script setup lang="ts">
|
|
9
|
+
import type { UI_I_SecurityProfileData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
10
|
+
|
|
8
11
|
const props = defineProps<{
|
|
9
12
|
activeNodeName: string
|
|
13
|
+
apiData: UI_I_SecurityProfileData
|
|
10
14
|
}>()
|
|
11
15
|
</script>
|
|
12
16
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="lockdown-mode">
|
|
3
|
-
<common-configure-security-profile-lockdown-mode-tools
|
|
3
|
+
<common-configure-security-profile-lockdown-mode-tools
|
|
4
|
+
@show-edit="isShowEdit = true"
|
|
5
|
+
/>
|
|
4
6
|
|
|
5
7
|
<div class="stack-view">
|
|
6
8
|
<atoms-stack-block
|
|
@@ -56,6 +58,7 @@ import { constructData } from '~/components/common/configure/securityProfile/loc
|
|
|
56
58
|
|
|
57
59
|
const props = defineProps<{
|
|
58
60
|
activeNodeName: string
|
|
61
|
+
apiData: UI_I_SecurityProfileData
|
|
59
62
|
}>()
|
|
60
63
|
|
|
61
64
|
const { $store }: any = useNuxtApp()
|
|
@@ -65,7 +68,7 @@ const nodeId = useRoute().params.id
|
|
|
65
68
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
66
69
|
|
|
67
70
|
const securityProfileData = computed<UI_I_SecurityProfileData>(() =>
|
|
68
|
-
constructData(
|
|
71
|
+
constructData(props.apiData, localization.value)
|
|
69
72
|
)
|
|
70
73
|
|
|
71
74
|
const lockdownModeExceptionUsers = computed<string>(() =>
|
|
@@ -1,23 +1,29 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
1
2
|
import type { UI_I_SecurityProfileData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
2
3
|
|
|
3
|
-
const getLockdownModeCurrentText = (
|
|
4
|
+
const getLockdownModeCurrentText = (
|
|
5
|
+
data: string,
|
|
6
|
+
localization: UI_I_Localization
|
|
7
|
+
): string => {
|
|
4
8
|
switch (data) {
|
|
5
9
|
case 'disabled':
|
|
6
|
-
return
|
|
10
|
+
return localization.common.disabled
|
|
7
11
|
default:
|
|
8
12
|
return ''
|
|
9
13
|
}
|
|
10
14
|
}
|
|
11
15
|
|
|
12
16
|
export const constructData = (
|
|
13
|
-
data: UI_I_SecurityProfileData | null
|
|
17
|
+
data: UI_I_SecurityProfileData | null,
|
|
18
|
+
localization: UI_I_Localization
|
|
14
19
|
): UI_I_SecurityProfileData => {
|
|
15
20
|
let result: UI_I_SecurityProfileData | null = null
|
|
16
21
|
|
|
17
22
|
result = {
|
|
18
23
|
lockdownMode: {
|
|
19
24
|
lockdownMode: getLockdownModeCurrentText(
|
|
20
|
-
data?.lockdownMode.lockdownMode || ''
|
|
25
|
+
data?.lockdownMode.lockdownMode || '',
|
|
26
|
+
localization
|
|
21
27
|
),
|
|
22
28
|
exceptionUsers: data?.lockdownMode.exceptionUsers || [],
|
|
23
29
|
},
|
package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/Old.vue
CHANGED
|
@@ -106,45 +106,4 @@ const emits = defineEmits<{
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
.action-container {
|
|
110
|
-
position: absolute;
|
|
111
|
-
top: -33px;
|
|
112
|
-
left: 5px;
|
|
113
|
-
background: var(--block-view-bg-color2);
|
|
114
|
-
border: 1px solid var(--block-border-color);
|
|
115
|
-
padding: 5px 6px;
|
|
116
|
-
border-radius: 3px;
|
|
117
|
-
|
|
118
|
-
.action-wrap {
|
|
119
|
-
&::after {
|
|
120
|
-
content: '';
|
|
121
|
-
display: block;
|
|
122
|
-
position: absolute;
|
|
123
|
-
width: 8px;
|
|
124
|
-
height: 8px;
|
|
125
|
-
background: var(--block-view-bg-color2);
|
|
126
|
-
transform: rotate(45deg);
|
|
127
|
-
left: -11px;
|
|
128
|
-
bottom: calc(50% - 4px);
|
|
129
|
-
border-left: 0.5px solid var(--block-border-color);
|
|
130
|
-
border-bottom: 0.5px solid var(--block-border-color);
|
|
131
|
-
z-index: var(--z-dropdown);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
.action {
|
|
135
|
-
border: none;
|
|
136
|
-
padding: 1px 20px;
|
|
137
|
-
width: 100%;
|
|
138
|
-
text-align: left;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
background: var(--block-view-bg-color2);
|
|
141
|
-
color: var(--global-font-color3);
|
|
142
|
-
white-space: nowrap;
|
|
143
|
-
text-transform: capitalize;
|
|
144
|
-
|
|
145
|
-
&:hover {
|
|
146
|
-
background: var(--vertical-nav-hover-bg-color);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
109
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component
|
|
3
3
|
:is="currentComponent"
|
|
4
|
-
v-model:local-edit-data="
|
|
4
|
+
v-model:local-edit-data="form"
|
|
5
5
|
@add="emits('add', $event)"
|
|
6
6
|
/>
|
|
7
7
|
</template>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
11
11
|
|
|
12
|
-
const
|
|
12
|
+
const form = defineModel<UI_I_LockdownModeData>('form')
|
|
13
13
|
|
|
14
14
|
const emits = defineEmits<{
|
|
15
15
|
(event: 'add', value: string): void
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<div class="mt-3">
|
|
20
20
|
<atoms-table-data-grid
|
|
21
|
-
:column-keys="
|
|
21
|
+
v-model:column-keys="columnItems"
|
|
22
22
|
:head-items="headItems"
|
|
23
23
|
:body-items="bodyItems"
|
|
24
24
|
:total-items="bodyItems.length"
|
|
@@ -87,7 +87,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
87
87
|
|
|
88
88
|
const newUserName = ref<string>('')
|
|
89
89
|
|
|
90
|
-
const
|
|
90
|
+
const columnItems = computed<UI_I_ColumnKey[]>(() =>
|
|
91
91
|
exceptionUsersTable.columnKeys(localization.value)
|
|
92
92
|
)
|
|
93
93
|
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
@@ -134,4 +134,46 @@ onUnmounted(() => {
|
|
|
134
134
|
})
|
|
135
135
|
</script>
|
|
136
136
|
|
|
137
|
-
<style scoped lang="scss"
|
|
137
|
+
<style scoped lang="scss">
|
|
138
|
+
.action-container {
|
|
139
|
+
position: absolute;
|
|
140
|
+
top: -33px;
|
|
141
|
+
left: 5px;
|
|
142
|
+
background: var(--block-view-bg-color2);
|
|
143
|
+
border: 1px solid var(--block-border-color);
|
|
144
|
+
padding: 5px 6px;
|
|
145
|
+
border-radius: 3px;
|
|
146
|
+
|
|
147
|
+
.action-wrap {
|
|
148
|
+
&::after {
|
|
149
|
+
content: '';
|
|
150
|
+
display: block;
|
|
151
|
+
position: absolute;
|
|
152
|
+
width: 8px;
|
|
153
|
+
height: 8px;
|
|
154
|
+
background: var(--block-view-bg-color2);
|
|
155
|
+
transform: rotate(45deg);
|
|
156
|
+
left: -11px;
|
|
157
|
+
bottom: calc(50% - 4px);
|
|
158
|
+
border-left: 0.5px solid var(--block-border-color);
|
|
159
|
+
border-bottom: 0.5px solid var(--block-border-color);
|
|
160
|
+
z-index: var(--z-dropdown);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
.action {
|
|
164
|
+
border: none;
|
|
165
|
+
padding: 1px 20px;
|
|
166
|
+
width: 100%;
|
|
167
|
+
text-align: left;
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
background: var(--block-view-bg-color2);
|
|
170
|
+
color: var(--global-font-color3);
|
|
171
|
+
white-space: nowrap;
|
|
172
|
+
text-transform: capitalize;
|
|
173
|
+
|
|
174
|
+
&:hover {
|
|
175
|
+
background: var(--vertical-nav-hover-bg-color);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
</style>
|
|
@@ -4,8 +4,11 @@ import type {
|
|
|
4
4
|
UI_I_HeadItem,
|
|
5
5
|
UI_I_BodyItem,
|
|
6
6
|
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
7
|
-
import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
|
|
8
7
|
import { exceptionUsersTableKeys } from '~/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/exceptionUsers/old/lib/config/tableKeys'
|
|
8
|
+
import {
|
|
9
|
+
constructColumnKey,
|
|
10
|
+
constructHeadItem,
|
|
11
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
9
12
|
|
|
10
13
|
const getItems = (
|
|
11
14
|
localization: UI_I_Localization
|
|
@@ -16,11 +19,28 @@ const getItems = (
|
|
|
16
19
|
]
|
|
17
20
|
}
|
|
18
21
|
|
|
19
|
-
export const columnKeys = (
|
|
20
|
-
|
|
22
|
+
export const columnKeys = (
|
|
23
|
+
localization: UI_I_Localization
|
|
24
|
+
): UI_I_ColumnKey[] => {
|
|
25
|
+
const result: UI_I_ColumnKey[] = []
|
|
26
|
+
getItems(localization).forEach((item, i) => {
|
|
27
|
+
const col = `col${i + 1}`
|
|
28
|
+
result.push(constructColumnKey(col, item[0], item[1]))
|
|
29
|
+
})
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
return result
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
|
35
|
+
const result: UI_I_HeadItem[] = []
|
|
36
|
+
getItems(localization).forEach((item, i) => {
|
|
37
|
+
const col = `col${i + 1}`
|
|
38
|
+
result.push(
|
|
39
|
+
constructHeadItem(col, item[0], item[3], false, item[2], '', item[3])
|
|
40
|
+
)
|
|
41
|
+
})
|
|
42
|
+
return result
|
|
43
|
+
}
|
|
24
44
|
|
|
25
45
|
export const bodyItems = (data: string[]): UI_I_BodyItem[][] => {
|
|
26
46
|
const bodyItems: UI_I_BodyItem[][] = []
|
|
@@ -39,5 +59,6 @@ export const bodyItems = (data: string[]): UI_I_BodyItem[][] => {
|
|
|
39
59
|
},
|
|
40
60
|
])
|
|
41
61
|
})
|
|
62
|
+
|
|
42
63
|
return bodyItems
|
|
43
64
|
}
|
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
:is="currentComponent"
|
|
4
4
|
:title="localization.common.lockdownMode"
|
|
5
5
|
:description="localization.configureSecurityProfile.lockdownModeDesc"
|
|
6
|
+
@show-edit="emits('show-edit')"
|
|
6
7
|
/>
|
|
7
8
|
</template>
|
|
8
9
|
|
|
9
10
|
<script setup lang="ts">
|
|
10
11
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
11
12
|
|
|
13
|
+
const emits = defineEmits<{
|
|
14
|
+
(event: 'show-edit'): void
|
|
15
|
+
}>()
|
|
16
|
+
|
|
12
17
|
const { $store }: any = useNuxtApp()
|
|
13
18
|
|
|
14
19
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@ export interface UI_API_I_LockdownModeData {
|
|
|
3
3
|
exceptionUsers: string[]
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface UI_API_I_SecurityProfileData {
|
|
7
7
|
lockdownMode: UI_API_I_LockdownModeData
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface UI_I_LockdownModeData extends UI_API_I_LockdownModeData {}
|
|
11
11
|
|
|
12
|
-
export interface UI_I_SecurityProfileData extends
|
|
12
|
+
export interface UI_I_SecurityProfileData extends UI_API_I_SecurityProfileData {}
|