bfg-common 1.5.773 → 1.5.774
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/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +19 -4
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/configure/advancedSystemSettings/AdvancedSystemSettings.vue +49 -0
- package/components/common/configure/advancedSystemSettings/modals/edit/Edit.vue +55 -0
- package/components/common/configure/advancedSystemSettings/modals/edit/New.vue +37 -0
- package/components/common/configure/advancedSystemSettings/modals/edit/Old.vue +46 -0
- package/components/common/configure/advancedSystemSettings/tableView/TableView.vue +30 -0
- package/components/common/configure/advancedSystemSettings/tableView/new/New.vue +193 -0
- package/components/common/configure/advancedSystemSettings/tableView/new/lib/config/hostTable.ts +308 -0
- package/components/common/configure/advancedSystemSettings/tableView/old/Old.vue +128 -0
- package/components/common/configure/advancedSystemSettings/tableView/old/lib/config/table.ts +93 -0
- package/components/common/configure/advancedSystemSettings/tableView/old/lib/config/tableKeys.ts +9 -0
- package/components/common/configure/advancedSystemSettings/tableView/old/lib/models/types.ts +5 -0
- package/components/common/configure/advancedSystemSettings/tools/New.vue +5 -0
- package/components/common/configure/advancedSystemSettings/tools/Old.vue +28 -0
- package/components/common/configure/advancedSystemSettings/tools/Tools.vue +28 -0
- package/components/common/configure/securityProfile/SecurityProfile.vue +28 -0
- package/components/common/configure/securityProfile/lockdownMode/LockdownMode.vue +112 -0
- package/components/common/configure/securityProfile/lockdownMode/lib/utils/constructData.ts +27 -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 +180 -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/port/Port.vue +580 -580
- package/components/common/layout/console/Console.vue +70 -70
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/New.vue +64 -64
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- 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/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/pages/backups/modals/lib/config/restore.ts +116 -116
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +187 -187
- package/components/common/pages/backups/modals/restore/Restore.vue +302 -302
- package/components/common/pages/backups/modals/restore/disks/Disks.vue +50 -50
- package/components/common/pages/backups/modals/restore/lib/config/readyToCompleteOptions.ts +94 -94
- package/components/common/pages/backups/modals/restore/lib/config/steps.ts +130 -130
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/backups/modals/restore/types/New.vue +95 -95
- package/components/common/pages/backups/modals/restore/types/Old.vue +62 -62
- package/components/common/pages/backups/modals/restore/types/Types.vue +31 -31
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/pages/scheduledTasks/table/Table.vue +3 -11
- package/components/common/pages/scheduledTasks/table/expandDetails/ExpandDetails.vue +30 -0
- package/components/common/pages/scheduledTasks/table/expandDetails/New.vue +61 -0
- package/components/common/pages/scheduledTasks/table/{detailsList/DetailsList.vue → expandDetails/Old.vue} +7 -4
- package/components/common/pages/scheduledTasks/table/{detailsList/Table.vue → expandDetails/historyRun/HistoryRun.vue} +9 -5
- package/components/common/pages/scheduledTasks/table/{detailsList → expandDetails/historyRun}/lib/config/historyRunsTable.ts +4 -2
- package/components/common/pages/scheduledTasks/table/{detailsList → expandDetails/historyRun}/lib/config/tableKeys.ts +1 -1
- package/components/common/pages/scheduledTasks/table/{detailsList/lib/config/tasksRowDetails.ts → expandDetails/lib/config/expandDetails.ts} +3 -1
- package/components/common/pages/scheduledTasks/table/lib/config/scheduledTasksTable.ts +3 -0
- package/components/common/pages/tasks/Tasks.vue +125 -125
- package/components/common/pages/tasks/table/Table.vue +373 -373
- package/components/common/pages/tasks/table/lib/config/config.ts +279 -279
- package/components/common/pages/tasks/table/lib/models/interfaces.ts +9 -9
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
- package/components/common/vm/actions/clone/new/New.vue +438 -438
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/options/New.vue +264 -264
- package/components/common/vm/actions/common/select/options/Options.vue +58 -58
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +227 -227
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/composables/useAppVersion.ts +21 -21
- package/composables/useBrowse.ts +24 -24
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/lib/models/types.ts +59 -59
- package/package.json +1 -1
- package/plugins/console.ts +21 -21
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +128 -128
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +212 -212
- package/public/spice-console/run.js +210 -210
- package/store/inventory/modules/configure/advancedSystemSettings/actions.ts +122 -0
- package/store/inventory/modules/configure/advancedSystemSettings/getters.ts +9 -0
- package/store/inventory/modules/configure/advancedSystemSettings/lib/models/interfaces.ts +11 -0
- package/store/inventory/modules/configure/advancedSystemSettings/mutations.ts +12 -0
- package/store/inventory/modules/configure/advancedSystemSettings/state.ts +9 -0
- package/store/inventory/modules/configure/advancedSystemSettings/store.ts +12 -0
- package/store/inventory/modules/configure/securityProfile/actions.ts +58 -0
- package/store/inventory/modules/configure/securityProfile/getters.ts +10 -0
- package/store/inventory/modules/configure/securityProfile/lib/models/interfaces.ts +16 -0
- package/store/inventory/modules/configure/securityProfile/mutations.ts +13 -0
- package/store/inventory/modules/configure/securityProfile/state.ts +7 -0
- package/store/inventory/modules/configure/securityProfile/store.ts +12 -0
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +123 -123
- package/store/tasks/mutations.ts +82 -82
- /package/components/common/pages/scheduledTasks/table/{detailsList → expandDetails/historyRun}/lib/models/types.ts +0 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="data-table-view">
|
|
3
|
+
<atoms-table-data-grid
|
|
4
|
+
v-model:column-keys="columnKeys"
|
|
5
|
+
v-model:page-size="paginationLocal.pageSize"
|
|
6
|
+
v-model:page="paginationLocal.page"
|
|
7
|
+
:head-items="headItems"
|
|
8
|
+
:body-items="bodyItems"
|
|
9
|
+
:total-items="props.totalItems"
|
|
10
|
+
:total-pages="props.totalPages"
|
|
11
|
+
class="data-table"
|
|
12
|
+
test-id="any-table"
|
|
13
|
+
server-off
|
|
14
|
+
hide-page-size
|
|
15
|
+
hide-pagination
|
|
16
|
+
>
|
|
17
|
+
<template #value="{ item }">
|
|
18
|
+
<div v-if="item.data.type === 'int'">
|
|
19
|
+
<input
|
|
20
|
+
type="number"
|
|
21
|
+
:value="item.data.value"
|
|
22
|
+
@change="onChangeSetting($event, item.data.key)"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
<div v-if="item.data.type === 'string'">
|
|
26
|
+
<input
|
|
27
|
+
type="text"
|
|
28
|
+
:value="item.data.value"
|
|
29
|
+
@change="onChangeSetting($event, item.data.key)"
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
<div v-if="item.data.type === 'boolean'">
|
|
33
|
+
<select
|
|
34
|
+
@change="onChangeSetting($event, item.data.key)"
|
|
35
|
+
:value="item.data.value"
|
|
36
|
+
>
|
|
37
|
+
<option value="false">false</option>
|
|
38
|
+
<option value="true">true</option>
|
|
39
|
+
</select>
|
|
40
|
+
</div>
|
|
41
|
+
<div v-if="item.data.type === 'select'">
|
|
42
|
+
<select
|
|
43
|
+
@change="onChangeSetting($event, item.data.key)"
|
|
44
|
+
:value="item.data.value"
|
|
45
|
+
>
|
|
46
|
+
<option
|
|
47
|
+
v-for="item2 in item.data.options"
|
|
48
|
+
:key="item2.key"
|
|
49
|
+
:value="item2.key"
|
|
50
|
+
>
|
|
51
|
+
{{ item2.value }}
|
|
52
|
+
</option>
|
|
53
|
+
</select>
|
|
54
|
+
</div>
|
|
55
|
+
</template>
|
|
56
|
+
</atoms-table-data-grid>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script lang="ts" setup>
|
|
61
|
+
import type {
|
|
62
|
+
UI_I_ColumnKey,
|
|
63
|
+
UI_I_HeadItem,
|
|
64
|
+
UI_I_BodyItem,
|
|
65
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
66
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
67
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
68
|
+
import * as table from '~/components/common/configure/advancedSystemSettings/tableView/old/lib/config/table'
|
|
69
|
+
|
|
70
|
+
const settings = defineModel<any>('settings', { required: true })
|
|
71
|
+
|
|
72
|
+
const props = defineProps<{
|
|
73
|
+
dataTable: any[]
|
|
74
|
+
totalItems: number
|
|
75
|
+
totalPages: number
|
|
76
|
+
isEdit: boolean
|
|
77
|
+
}>()
|
|
78
|
+
|
|
79
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
80
|
+
|
|
81
|
+
const onChangeSetting = (event: any, key: string): void => {
|
|
82
|
+
let value = event.target.value
|
|
83
|
+
settings.value.items = settings.value.items.map((item) => {
|
|
84
|
+
if (item.key === key) {
|
|
85
|
+
if (item.type === 'boolean') value = !!value
|
|
86
|
+
if (item.type === 'int') value = +value
|
|
87
|
+
item.value = value
|
|
88
|
+
}
|
|
89
|
+
return item
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const paginationLocal = ref<UI_I_Pagination>({
|
|
94
|
+
page: 1,
|
|
95
|
+
pageSize: 100,
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
99
|
+
table.headItems(localization.value, props.isEdit)
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
const columnKeys = computed<UI_I_ColumnKey[]>(() =>
|
|
103
|
+
table.columnKeys(localization.value, props.isEdit)
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
107
|
+
return table.bodyItems(props.dataTable, localization.value, props.isEdit)
|
|
108
|
+
})
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<style lang="scss" scoped>
|
|
112
|
+
@import 'assets/scss/common/mixins.scss';
|
|
113
|
+
.data-table-view {
|
|
114
|
+
@include flex($dir: column);
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
height: inherit;
|
|
117
|
+
max-height: 250px;
|
|
118
|
+
.data-table {
|
|
119
|
+
@include flex($dir: column);
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
height: inherit;
|
|
123
|
+
:deep(.datagrid-outer-wrapper) {
|
|
124
|
+
height: inherit;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_ColumnKey,
|
|
3
|
+
UI_I_HeadItem,
|
|
4
|
+
UI_I_BodyItem,
|
|
5
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
6
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
7
|
+
import {
|
|
8
|
+
constructColumnKey,
|
|
9
|
+
constructHeadItem,
|
|
10
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
|
11
|
+
import { tableItemKeys } from '~/components/common/configure/advancedSystemSettings/tableView/old/lib/config/tableKeys'
|
|
12
|
+
|
|
13
|
+
const getItems = (
|
|
14
|
+
_localization: UI_I_Localization,
|
|
15
|
+
isEdit = false
|
|
16
|
+
): [string, boolean, string, string][] => {
|
|
17
|
+
const items: [string, boolean, string, string][] = [
|
|
18
|
+
['localization.common.key', true, '280px', tableItemKeys[0]],
|
|
19
|
+
['localization.common.value', true, '280px', tableItemKeys[1]],
|
|
20
|
+
]
|
|
21
|
+
if (!isEdit) {
|
|
22
|
+
items.push(['localization.common.summary', true, '280px', tableItemKeys[2]])
|
|
23
|
+
}
|
|
24
|
+
return items
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const columnKeys = (
|
|
28
|
+
localization: UI_I_Localization,
|
|
29
|
+
isEdit = false
|
|
30
|
+
): UI_I_ColumnKey[] => {
|
|
31
|
+
const result: UI_I_ColumnKey[] = []
|
|
32
|
+
getItems(localization, isEdit).forEach((item, i) => {
|
|
33
|
+
const col = isEdit && i === 1 ? 'value' : `col${i}`
|
|
34
|
+
result.push(constructColumnKey(col, item[0], item[1]))
|
|
35
|
+
})
|
|
36
|
+
return result
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const headItems = (
|
|
40
|
+
localization: UI_I_Localization,
|
|
41
|
+
isEdit = false
|
|
42
|
+
): UI_I_HeadItem[] => {
|
|
43
|
+
const result: UI_I_HeadItem[] = []
|
|
44
|
+
getItems(localization, isEdit).forEach((item, i) => {
|
|
45
|
+
const col = isEdit && i === 1 ? 'value' : `col${i}`
|
|
46
|
+
result.push(
|
|
47
|
+
constructHeadItem(col, item[0], item[3], false, item[2], '', 'any')
|
|
48
|
+
)
|
|
49
|
+
})
|
|
50
|
+
return result
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const bodyItems = (
|
|
54
|
+
data: any[],
|
|
55
|
+
_localization: UI_I_Localization,
|
|
56
|
+
isEdit = false
|
|
57
|
+
): UI_I_BodyItem[][] => {
|
|
58
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
|
59
|
+
data.forEach((item, key) => {
|
|
60
|
+
const editData = {
|
|
61
|
+
key: item.key,
|
|
62
|
+
type: item.type,
|
|
63
|
+
value: item.value,
|
|
64
|
+
validation: item.validation,
|
|
65
|
+
options: item.options,
|
|
66
|
+
}
|
|
67
|
+
const cols = [
|
|
68
|
+
{
|
|
69
|
+
key: 'col0',
|
|
70
|
+
text: item[tableItemKeys[0]],
|
|
71
|
+
id: key,
|
|
72
|
+
testId: `any-table-item-${key}`,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: isEdit ? 'value' : 'col1',
|
|
76
|
+
text: item[tableItemKeys[1]],
|
|
77
|
+
id: key,
|
|
78
|
+
testId: `any-table-item-${key}`,
|
|
79
|
+
data: isEdit ? editData : null
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
if (!isEdit) {
|
|
83
|
+
cols.push({
|
|
84
|
+
key: 'col2',
|
|
85
|
+
text: item[tableItemKeys[2]],
|
|
86
|
+
id: key,
|
|
87
|
+
testId: `any-table-item-${key}`,
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
bodyItems.push(cols)
|
|
91
|
+
})
|
|
92
|
+
return bodyItems
|
|
93
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-headline :headline="props.title" class="items-center">
|
|
3
|
+
<template #action>
|
|
4
|
+
<button
|
|
5
|
+
class="btn btn-sm btn-secondary ng-star-inserted"
|
|
6
|
+
@click="emits('show-edit')"
|
|
7
|
+
>
|
|
8
|
+
{{ localization.common.edit }}...
|
|
9
|
+
</button>
|
|
10
|
+
</template>
|
|
11
|
+
</common-headline>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
title: string
|
|
19
|
+
}>()
|
|
20
|
+
|
|
21
|
+
const emits = defineEmits<{
|
|
22
|
+
(event: 'show-edit'): void
|
|
23
|
+
}>()
|
|
24
|
+
|
|
25
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
:title="localization.common.advancedSystemSettings"
|
|
5
|
+
@show-edit="emits('show-edit')"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
11
|
+
|
|
12
|
+
const emits = defineEmits<{
|
|
13
|
+
(event: 'show-edit'): void
|
|
14
|
+
}>()
|
|
15
|
+
|
|
16
|
+
const { $store }: any = useNuxtApp()
|
|
17
|
+
|
|
18
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
19
|
+
|
|
20
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
21
|
+
const currentComponent = computed(() =>
|
|
22
|
+
isNewView.value
|
|
23
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
24
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
25
|
+
)
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<common-configure-security-profile-lockdown-mode
|
|
3
|
+
:active-node-name="props.activeNodeName"
|
|
4
|
+
/>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
activeNodeName: string
|
|
10
|
+
nodeId: string
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const { $store }: any = useNuxtApp()
|
|
14
|
+
|
|
15
|
+
const getData = (): void => {
|
|
16
|
+
$store.dispatch('securityProfile/A_GET_SECURITY_PROFILE', props.nodeId)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
onMounted(() => {
|
|
20
|
+
getData()
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
onUnmounted(() => {
|
|
24
|
+
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hostSystemSecurityProfile')
|
|
25
|
+
})
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="lockdown-mode">
|
|
3
|
+
<common-configure-security-profile-lockdown-mode-tools
|
|
4
|
+
@show-edit="isShowEdit = true"
|
|
5
|
+
/>
|
|
6
|
+
|
|
7
|
+
<div class="stack-view">
|
|
8
|
+
<atoms-stack-block
|
|
9
|
+
:has-children="false"
|
|
10
|
+
test-id="certificate-subject-stack-block"
|
|
11
|
+
>
|
|
12
|
+
<template #stackBlockKey>
|
|
13
|
+
<div class="flex-align-center">
|
|
14
|
+
<span data-id="certificate-subject">
|
|
15
|
+
{{ localization.common.lockdownMode }}
|
|
16
|
+
</span>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
<template #stackBlockContent>
|
|
20
|
+
<span data-id="certificate-subject-value">
|
|
21
|
+
{{ currentTextLockdownMode }}
|
|
22
|
+
</span>
|
|
23
|
+
</template>
|
|
24
|
+
</atoms-stack-block>
|
|
25
|
+
<atoms-stack-block
|
|
26
|
+
:has-children="false"
|
|
27
|
+
test-id="certificate-subject-stack-block"
|
|
28
|
+
>
|
|
29
|
+
<template #stackBlockKey>
|
|
30
|
+
<div class="flex-align-center">
|
|
31
|
+
<span data-id="certificate-subject">
|
|
32
|
+
{{ localization.configureSecurityProfile.exceptionUsers }}
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<template #stackBlockContent>
|
|
37
|
+
<span data-id="certificate-subject-value">
|
|
38
|
+
{{ lockdownModeExceptionUsers }}
|
|
39
|
+
</span>
|
|
40
|
+
</template>
|
|
41
|
+
</atoms-stack-block>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<common-configure-security-profile-lockdown-mode-modals-lockdown-mode-edit
|
|
46
|
+
v-if="isShowEdit"
|
|
47
|
+
:active-node-name="props.activeNodeName"
|
|
48
|
+
:edit-data="securityProfileData.lockdownMode"
|
|
49
|
+
@hide="isShowEdit = false"
|
|
50
|
+
@submit="isShowEdit = false"
|
|
51
|
+
/>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script setup lang="ts">
|
|
55
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
56
|
+
import type { UI_I_SecurityProfileData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
57
|
+
import { constructData } from '~/components/common/configure/securityProfile/lockdownMode/lib/utils/constructData'
|
|
58
|
+
|
|
59
|
+
const props = defineProps<{
|
|
60
|
+
activeNodeName: string
|
|
61
|
+
}>()
|
|
62
|
+
|
|
63
|
+
const { $store }: any = useNuxtApp()
|
|
64
|
+
|
|
65
|
+
const nodeId = useRoute().params.id
|
|
66
|
+
|
|
67
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
68
|
+
|
|
69
|
+
const systemSecurityProfile = computed<UI_I_SecurityProfileData | null>(
|
|
70
|
+
() => $store.getters['securityProfile/getSystemSecurityProfile']
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
const securityProfileData = computed<UI_I_SecurityProfileData>(() =>
|
|
74
|
+
constructData(systemSecurityProfile.value)
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
const lockdownModeExceptionUsers = computed<string>(() =>
|
|
78
|
+
securityProfileData.value.lockdownMode.exceptionUsers.join(', ')
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
const currentTextLockdownMode = computed<string>(() => {
|
|
82
|
+
let result = ''
|
|
83
|
+
|
|
84
|
+
switch (securityProfileData.value.lockdownMode.lockdownMode) {
|
|
85
|
+
case 'disabled':
|
|
86
|
+
result = localization.value.common.disabled
|
|
87
|
+
break
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return result
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
const getData = (): void => {
|
|
94
|
+
$store.dispatch('securityProfile/A_GET_SECURITY_PROFILE', nodeId)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const isShowEdit = ref<boolean>(false)
|
|
98
|
+
|
|
99
|
+
onMounted(() => {
|
|
100
|
+
getData()
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
onUnmounted(() => {
|
|
104
|
+
$store.dispatch('main/A_PAUSE_GLOBAL_REFRESH', 'hostSystemSecurityProfile')
|
|
105
|
+
})
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
<style scoped lang="scss">
|
|
109
|
+
.stack-view {
|
|
110
|
+
margin-top: 10px;
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { UI_I_SecurityProfileData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
2
|
+
|
|
3
|
+
const getLockdownModeCurrentText = (data: string): string => {
|
|
4
|
+
switch (data) {
|
|
5
|
+
case 'disabled':
|
|
6
|
+
return 'disabled'
|
|
7
|
+
default:
|
|
8
|
+
return ''
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const constructData = (
|
|
13
|
+
data: UI_I_SecurityProfileData | null
|
|
14
|
+
): UI_I_SecurityProfileData => {
|
|
15
|
+
let result: UI_I_SecurityProfileData | null = null
|
|
16
|
+
|
|
17
|
+
result = {
|
|
18
|
+
lockdownMode: {
|
|
19
|
+
lockdownMode: getLockdownModeCurrentText(
|
|
20
|
+
data?.lockdownMode.lockdownMode || ''
|
|
21
|
+
),
|
|
22
|
+
exceptionUsers: data?.lockdownMode.exceptionUsers || [],
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return result
|
|
27
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
v-model:local-edit-data="localEditData"
|
|
5
|
+
:title="title"
|
|
6
|
+
:selected-tab="selectedTab"
|
|
7
|
+
:tab-items="tabItems"
|
|
8
|
+
@add-new-user="onAddNewUser"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
14
|
+
import type { UI_I_VerticalTabs } from '~/components/atoms/tabs/lib/models/interfaces'
|
|
15
|
+
import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
16
|
+
import { navigateTabsFunc } from '~/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/lib/config/tabs'
|
|
17
|
+
|
|
18
|
+
const props = defineProps<{
|
|
19
|
+
activeNodeName: string
|
|
20
|
+
editData: UI_I_LockdownModeData
|
|
21
|
+
}>()
|
|
22
|
+
|
|
23
|
+
const { $store }: any = useNuxtApp()
|
|
24
|
+
|
|
25
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
26
|
+
|
|
27
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
28
|
+
const currentComponent = computed(() =>
|
|
29
|
+
isNewView.value
|
|
30
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
31
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
const title = computed<string>(
|
|
35
|
+
() => props.activeNodeName + ' - ' + localization.value.common.lockdownMode
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
const selectedTab = ref<number>(1)
|
|
39
|
+
const tabItems = computed<UI_I_VerticalTabs[]>(() =>
|
|
40
|
+
navigateTabsFunc(localization.value)
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
const localEditData = ref<UI_I_LockdownModeData>({
|
|
44
|
+
lockdownMode: '',
|
|
45
|
+
exceptionUsers: [],
|
|
46
|
+
})
|
|
47
|
+
watch(
|
|
48
|
+
() => props.editData,
|
|
49
|
+
(newValue) => {
|
|
50
|
+
localEditData.value.lockdownMode = newValue.lockdownMode
|
|
51
|
+
localEditData.value.exceptionUsers = newValue.exceptionUsers
|
|
52
|
+
},
|
|
53
|
+
{ immediate: true, deep: true }
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
const onAddNewUser = (value: string): void => {
|
|
57
|
+
localEditData.value.exceptionUsers.push(value)
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<style scoped lang="scss"></style>
|
package/components/common/configure/securityProfile/lockdownMode/modals/lockdownModeEdit/Old.vue
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-modal
|
|
3
|
+
:title="props.title"
|
|
4
|
+
width="862px"
|
|
5
|
+
class="lockdown-mode-edit"
|
|
6
|
+
test-id="lockdown-mode-edit"
|
|
7
|
+
show
|
|
8
|
+
@hide="emits('hide')"
|
|
9
|
+
@submit="emits('submit')"
|
|
10
|
+
>
|
|
11
|
+
<template #modalBody>
|
|
12
|
+
<div class="flex column-gap-6 lockdown-mode-edit__content">
|
|
13
|
+
<atoms-tabs-vertical-tabs
|
|
14
|
+
v-model="selectedTab"
|
|
15
|
+
:items="props.tabItems"
|
|
16
|
+
test-id="lockdown-mode-edit-tabs"
|
|
17
|
+
class="lockdown-mode-edit__tabs"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<common-configure-security-profile-lockdown-mode-modals-lockdown-mode-edit-lockdown-mode
|
|
21
|
+
v-if="selectedTab === 1"
|
|
22
|
+
v-model:form="localEditData"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<common-configure-security-profile-lockdown-mode-modals-lockdown-mode-edit-exception-users
|
|
26
|
+
v-if="selectedTab === 2"
|
|
27
|
+
v-model:form="localEditData"
|
|
28
|
+
@add="emits('add-new-user', $event)"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
</atoms-modal>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script lang="ts" setup>
|
|
36
|
+
import type { UI_I_VerticalTabs } from '~/components/atoms/tabs/lib/models/interfaces'
|
|
37
|
+
import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
38
|
+
|
|
39
|
+
const selectedTab = defineModel<number>('selectedTab', { required: true })
|
|
40
|
+
const localEditData = defineModel<UI_I_LockdownModeData>('localEditData', {
|
|
41
|
+
required: true,
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
title: string
|
|
46
|
+
tabItems: UI_I_VerticalTabs[]
|
|
47
|
+
}>()
|
|
48
|
+
|
|
49
|
+
const emits = defineEmits<{
|
|
50
|
+
(event: 'add-new-user', value: string): void
|
|
51
|
+
(event: 'hide'): void
|
|
52
|
+
(event: 'submit'): void
|
|
53
|
+
}>()
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style lang="scss" scoped>
|
|
57
|
+
.lockdown-mode-edit {
|
|
58
|
+
&__content {
|
|
59
|
+
height: inherit;
|
|
60
|
+
}
|
|
61
|
+
&__tabs {
|
|
62
|
+
&.vertical-groups-sidenav {
|
|
63
|
+
background: initial;
|
|
64
|
+
&.sidenav {
|
|
65
|
+
border-right: 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
&__alert {
|
|
70
|
+
margin-bottom: 10px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:deep(.modal-body) {
|
|
74
|
+
height: inherit;
|
|
75
|
+
|
|
76
|
+
.custom-radio-label {
|
|
77
|
+
padding-left: 23px;
|
|
78
|
+
}
|
|
79
|
+
.add-new-name-input {
|
|
80
|
+
width: 170px;
|
|
81
|
+
}
|
|
82
|
+
.sub-text-input {
|
|
83
|
+
position: absolute;
|
|
84
|
+
left: 0;
|
|
85
|
+
top: 22px;
|
|
86
|
+
font-size: 11px;
|
|
87
|
+
}
|
|
88
|
+
.add-user-btn {
|
|
89
|
+
margin-left: 20px;
|
|
90
|
+
text-transform: uppercase;
|
|
91
|
+
color: #0079ad;
|
|
92
|
+
font-size: 11px;
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
|
|
96
|
+
&:hover {
|
|
97
|
+
color: #00608a;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
.ellipsis-vertical-btn {
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
|
|
103
|
+
svg {
|
|
104
|
+
width: 15px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
v-model:local-edit-data="form"
|
|
5
|
+
@add="emits('add', $event)"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import type { UI_I_LockdownModeData } from '~/store/inventory/modules/configure/securityProfile/lib/models/interfaces'
|
|
11
|
+
|
|
12
|
+
const form = defineModel<UI_I_LockdownModeData>('form')
|
|
13
|
+
|
|
14
|
+
const emits = defineEmits<{
|
|
15
|
+
(event: 'add', value: string): void
|
|
16
|
+
}>()
|
|
17
|
+
|
|
18
|
+
const { $store }: any = useNuxtApp()
|
|
19
|
+
|
|
20
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
21
|
+
const currentComponent = computed(() =>
|
|
22
|
+
isNewView.value
|
|
23
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
24
|
+
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
25
|
+
)
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped lang="scss"></style>
|