bfg-common 1.5.708 → 1.5.709
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-1.svg +2 -3
- 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-1.svg +3 -4
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/localization/local_be.json +46 -3
- package/assets/localization/local_en.json +46 -3
- package/assets/localization/local_hy.json +46 -3
- package/assets/localization/local_kk.json +46 -3
- package/assets/localization/local_ru.json +48 -5
- package/assets/localization/local_zh.json +46 -3
- package/assets/scss/common/icons/icons-1.scss +1 -1
- package/assets/scss/common/icons/icons-2.scss +18 -0
- package/assets/scss/common/theme.scss +2 -0
- package/assets/scss/components/auth.scss +32 -5
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/dropdown/tree/Tree.vue +2 -0
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/switch/Switch.vue +7 -1
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- 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/atoms/wizard/Wizard.vue +1 -1
- 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/certificate/Certificate.vue +27 -0
- package/components/common/certificate/CertificateInfo.vue +139 -0
- package/components/common/certificate/Tools.vue +59 -0
- package/components/common/certificate/lib/config/tabsPannel.ts +22 -0
- package/components/common/certificate/lib/models/interfaces.ts +9 -0
- package/components/common/certificate/lib/models/types.ts +1 -0
- package/components/common/certificate/modals/renew/New.vue +64 -0
- package/components/common/certificate/modals/renew/Old.vue +122 -0
- package/components/common/certificate/modals/renew/Renew.vue +67 -0
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/help/navbar/left/lib/utils/constructAccordion.ts +2 -1
- package/components/common/help/navbar/right/Right.vue +86 -23
- package/components/common/layout/theHeader/TheHeader.vue +186 -191
- package/components/common/layout/theHeader/TheHeaderNew.vue +3 -7
- package/components/common/layout/theHeader/TheHeaderOld.vue +3 -7
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/layout/theHeader/modals/reconnect/ReconnectOld.vue +2 -0
- package/components/common/layout/theHeader/userMenu/UserMenu.vue +109 -113
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +12 -21
- package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +36 -43
- package/components/common/layout/theHeader/userMenu/modals/changePassword/Old.vue +0 -2
- package/components/common/layout/theHeader/userMenu/modals/changePassword/lib/utils.ts +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/Preferences.vue +81 -86
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesNew.vue +113 -102
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +2 -4
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +114 -115
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/{ChangeLanguageNew.vue → New.vue} +65 -89
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/{ChangeLanguageOld.vue → Old.vue} +66 -91
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +8 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/{DefaultConsoleNew.vue → New.vue} +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/{DefaultConsoleOld.vue → Old.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/Inventory.vue +7 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/{InventoryNew.vue → New.vue} +3 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/{InventoryOld.vue → Old.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/New.vue +277 -12
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Old.vue +30 -56
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Security.vue +65 -6
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/{TimeFormatNew.vue → New.vue} +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/{TimeFormatOld.vue → Old.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +8 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/{ViewNew.vue → New.vue} +12 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/{ViewOld.vue → Old.vue} +2 -2
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +33 -45
- package/components/common/monitor/advanced/graphView/GraphView.vue +8 -0
- package/components/common/monitor/advanced/tools/Tools.vue +5 -1
- package/components/common/pages/auth/TheFooter.vue +104 -0
- 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/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/files/lib/models/enums.ts +10 -0
- package/components/common/pages/hardwareHealth/historyTestimony/tools/Tools.vue +7 -2
- package/components/common/pages/hardwareHealth/tableView/TableView.vue +8 -0
- package/components/common/pages/hardwareHealth/tableView/lib/config/sensorTable.ts +13 -1
- package/components/common/pages/hardwareHealth/toolsPanel/lib/config/actionsPanel.ts +4 -4
- 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/tasks/table/expandDetails/ExpandDetails.vue +1 -1
- package/components/common/qr/Qr.vue +69 -0
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/selectLanguage/SelectLanguage.vue +200 -200
- 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/split/horizontal/New.vue +0 -2
- package/components/common/split/vertical/New.vue +2 -1
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/New.vue +1 -1
- package/components/common/vm/actions/add/Old.vue +1 -1
- 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/clone/old/Old.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/New.vue +10 -34
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/Old.vue +15 -37
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +49 -50
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/coresPerSocket/CoresPerSocket.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces.ts +3 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +13 -7
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/New.vue +7 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +52 -45
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/Old.vue +5 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +1 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/New.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/Old.vue +2 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/New.vue +1 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/Old.vue +1 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/New.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/Old.vue +1 -1
- 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/Old.vue +1 -2
- 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/New.vue +311 -311
- 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/compatibility/New.vue +1 -1
- package/components/common/wizards/common/compatibility/Old.vue +1 -1
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- 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 +228 -228
- package/components/common/wizards/datastore/add/lib/config/createDatastore.ts +1 -0
- package/components/common/wizards/datastore/add/lib/models/interfaces.ts +1 -0
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +5 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceOld.vue +5 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/AdvancedOptions.vue +43 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +114 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/Old.vue +114 -0
- package/components/common/wizards/datastore/add/steps/nameAndDevice/table/old/Old.vue +2 -3
- package/components/common/wizards/datastore/add/steps/readyComplete/lib/config/propertiesDetails.ts +8 -1
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/lib/models/enums.ts +2 -2
- package/components/common/wizards/vm/migrate/steps/selectStorage/SelectStorage.vue +4 -4
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +6 -2
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +18 -12
- package/composables/useAppVersion.ts +21 -21
- package/composables/useEnvLanguage.ts +7 -8
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/lib/models/interfaces.ts +1 -0
- package/package.json +3 -4
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +14 -37
- 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/main/getters.ts +2 -2
- 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/qrcode/Qrcode.vue +0 -56
|
@@ -13,7 +13,7 @@ export const constructItems = (
|
|
|
13
13
|
!parent || (item.title !== parent.title && item._path !== parent._path)
|
|
14
14
|
)
|
|
15
15
|
})
|
|
16
|
-
.map((item: UI_I_ContentNavigation): UI_I_AccordionRecursion => {
|
|
16
|
+
.map((item: UI_I_ContentNavigation, key: number): UI_I_AccordionRecursion => {
|
|
17
17
|
const children = constructItems(item.children, item)
|
|
18
18
|
return {
|
|
19
19
|
children,
|
|
@@ -22,6 +22,7 @@ export const constructItems = (
|
|
|
22
22
|
name: item.title,
|
|
23
23
|
hasChild: !!children.length,
|
|
24
24
|
isOpen: !parent,
|
|
25
|
+
testId: `nav-accordion-${key}`,
|
|
25
26
|
}
|
|
26
27
|
})
|
|
27
28
|
}
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
>
|
|
9
9
|
<atoms-the-icon name="arrow" />
|
|
10
10
|
</button>
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
<div v-else class="h-full flex-direction-column">
|
|
12
13
|
<div class="navbar__header">
|
|
13
14
|
<p class="title">{{ props.title }}</p>
|
|
14
15
|
<button
|
|
@@ -19,15 +20,17 @@
|
|
|
19
20
|
<atoms-the-icon name="close" />
|
|
20
21
|
</button>
|
|
21
22
|
</div>
|
|
23
|
+
|
|
22
24
|
<div class="navbar__content content-links">
|
|
23
25
|
<a
|
|
24
26
|
v-for="item in props.items"
|
|
25
27
|
:key="item.text"
|
|
26
28
|
:data-id="item.testId"
|
|
27
29
|
:href="item.to"
|
|
28
|
-
:class="['link-item', { active:
|
|
29
|
-
>{{ item.text }}</a
|
|
30
|
+
:class="['link-item', { active: activeHash === item.to }]"
|
|
30
31
|
>
|
|
32
|
+
{{ item.text }}
|
|
33
|
+
</a>
|
|
31
34
|
</div>
|
|
32
35
|
</div>
|
|
33
36
|
</div>
|
|
@@ -41,39 +44,96 @@ const props = defineProps<{
|
|
|
41
44
|
items: UI_I_ContentNavbarItem[]
|
|
42
45
|
}>()
|
|
43
46
|
|
|
44
|
-
const route = useRoute()
|
|
45
|
-
|
|
46
47
|
const isShow = ref<boolean>(true)
|
|
48
|
+
const activeHash = ref<string>('')
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
let observer: IntersectionObserver | null = null
|
|
51
|
+
let rootElement: Element | null = null
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
const setActiveHashFromLocation = () => {
|
|
54
|
+
// decodeURIComponent чтобы корректно читать хэши с кириллицей/спецсимволами
|
|
55
|
+
activeHash.value =
|
|
56
|
+
typeof window !== 'undefined'
|
|
57
|
+
? decodeURIComponent(window.location.hash || '')
|
|
58
|
+
: ''
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const observeLinks = (): void => {
|
|
62
|
+
const headingsSelector =
|
|
63
|
+
'.help .content-renderer h1, .help .content-renderer h2, .help .content-renderer h3, .help .content-renderer h4, .help .content-renderer h5, .help .content-renderer h6'
|
|
52
64
|
|
|
53
|
-
|
|
54
|
-
|
|
65
|
+
const headingNodes = Array.from(
|
|
66
|
+
document.querySelectorAll<HTMLElement>(headingsSelector)
|
|
67
|
+
).filter((h) => !!h.id)
|
|
55
68
|
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
69
|
+
if (headingNodes.length) {
|
|
70
|
+
const options: IntersectionObserverInit = {
|
|
71
|
+
root: rootElement || null,
|
|
72
|
+
rootMargin: '0px 0px -99% 0px', // активна пока верх секции у top root
|
|
73
|
+
threshold: 0,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
observer = new IntersectionObserver((entries) => {
|
|
77
|
+
entries.forEach((entry) => {
|
|
78
|
+
if (!entry.isIntersecting) return
|
|
79
|
+
const id = entry.target.getAttribute('id')
|
|
80
|
+
if (!id) return
|
|
81
|
+
const newHash = `#${id}`
|
|
82
|
+
|
|
83
|
+
// Если уже такой hash — ничего не делаем
|
|
84
|
+
if (decodeURIComponent(window.location.hash || '') === newHash) {
|
|
85
|
+
activeHash.value = newHash
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Обновляем URL без скролла
|
|
90
|
+
history.replaceState(null, '', newHash)
|
|
91
|
+
activeHash.value = newHash
|
|
92
|
+
})
|
|
93
|
+
}, options)
|
|
94
|
+
|
|
95
|
+
headingNodes.forEach((h) => observer?.observe(h))
|
|
96
|
+
}
|
|
61
97
|
}
|
|
62
98
|
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
99
|
+
const init = (): void => {
|
|
100
|
+
rootElement = document.querySelector('.help__content')
|
|
101
|
+
|
|
102
|
+
setActiveHashFromLocation()
|
|
66
103
|
|
|
67
|
-
|
|
104
|
+
if (props.items?.length) {
|
|
105
|
+
const first = props.items[0]?.to ?? ''
|
|
106
|
+
if (first) {
|
|
107
|
+
history.replaceState(null, '', first)
|
|
108
|
+
setActiveHashFromLocation()
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
observeLinks()
|
|
68
113
|
}
|
|
69
114
|
|
|
115
|
+
onMounted(() => {
|
|
116
|
+
init()
|
|
117
|
+
})
|
|
118
|
+
let isRouteUpdated = false
|
|
70
119
|
onUpdated(() => {
|
|
71
|
-
|
|
72
|
-
|
|
120
|
+
if (isRouteUpdated) {
|
|
121
|
+
init()
|
|
122
|
+
isRouteUpdated = false
|
|
123
|
+
}
|
|
73
124
|
})
|
|
74
125
|
|
|
75
|
-
|
|
76
|
-
|
|
126
|
+
// cleanup при unmount
|
|
127
|
+
onUnmounted(() => {
|
|
128
|
+
observer?.disconnect()
|
|
129
|
+
})
|
|
130
|
+
onBeforeRouteUpdate((to, from, next) => {
|
|
131
|
+
// обработка оснавной навигации, делаем cleanup
|
|
132
|
+
if (from.path !== to.path) {
|
|
133
|
+
observer?.disconnect()
|
|
134
|
+
isRouteUpdated = true
|
|
135
|
+
}
|
|
136
|
+
next()
|
|
77
137
|
})
|
|
78
138
|
</script>
|
|
79
139
|
|
|
@@ -101,6 +161,7 @@ onMounted(() => {
|
|
|
101
161
|
cursor: pointer;
|
|
102
162
|
margin: 12px 6px;
|
|
103
163
|
}
|
|
164
|
+
|
|
104
165
|
&__header {
|
|
105
166
|
display: flex;
|
|
106
167
|
justify-content: space-between;
|
|
@@ -128,10 +189,12 @@ onMounted(() => {
|
|
|
128
189
|
}
|
|
129
190
|
}
|
|
130
191
|
}
|
|
192
|
+
|
|
131
193
|
&__content {
|
|
132
194
|
height: 100%;
|
|
133
195
|
overflow: auto;
|
|
134
196
|
}
|
|
197
|
+
|
|
135
198
|
.link-item {
|
|
136
199
|
display: block;
|
|
137
200
|
color: var(--global-font-color);
|
|
@@ -1,191 +1,186 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-layout-the-header-new
|
|
3
|
-
v-if="props.newView"
|
|
4
|
-
v-model:security="security"
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
:
|
|
12
|
-
:
|
|
13
|
-
:selected-
|
|
14
|
-
:
|
|
15
|
-
:new-view
|
|
16
|
-
:time-format="props.timeFormat"
|
|
17
|
-
:project="props.project"
|
|
18
|
-
:is-dark-theme="props.isDarkTheme"
|
|
19
|
-
:remote-console="props.remoteConsole"
|
|
20
|
-
:vm-cluster="props.vmCluster"
|
|
21
|
-
:security-loader="props.securityLoader"
|
|
22
|
-
:recovery="props.recovery"
|
|
23
|
-
@toggle-main-menu="emits('toggle-main-menu')"
|
|
24
|
-
@show-preference="emits('show-preference')"
|
|
25
|
-
@reset-preference="emits('reset-preference')"
|
|
26
|
-
@hide-preference="emits('hide-preference')"
|
|
27
|
-
@global-refresh="emits('global-refresh')"
|
|
28
|
-
@update-time-format="emits('update-time-format', $event)"
|
|
29
|
-
@change-theme-mode="emits('change-theme-mode')"
|
|
30
|
-
@update-language="emits('update-language', $event)"
|
|
31
|
-
@update-is-browser="emits('update-is-browser', $event)"
|
|
32
|
-
@update-
|
|
33
|
-
@update-
|
|
34
|
-
@
|
|
35
|
-
@
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
v-
|
|
40
|
-
v-model:
|
|
41
|
-
:company-name="props.companyName"
|
|
42
|
-
:beta-text="props.betaText"
|
|
43
|
-
:global-refresh-loading="props.globalRefreshLoading"
|
|
44
|
-
:hostname="props.hostname"
|
|
45
|
-
:project-name="props.projectName"
|
|
46
|
-
:is-preference="props.isPreference"
|
|
47
|
-
:selected-language-type="props.selectedLanguageType"
|
|
48
|
-
:selected-lang="props.selectedLang"
|
|
49
|
-
:new-view="props.newView"
|
|
50
|
-
:
|
|
51
|
-
:
|
|
52
|
-
:
|
|
53
|
-
:
|
|
54
|
-
:
|
|
55
|
-
:
|
|
56
|
-
|
|
57
|
-
@
|
|
58
|
-
@
|
|
59
|
-
@
|
|
60
|
-
@
|
|
61
|
-
@
|
|
62
|
-
@
|
|
63
|
-
@update-
|
|
64
|
-
@update-
|
|
65
|
-
@update-
|
|
66
|
-
@
|
|
67
|
-
@
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
import type {
|
|
78
|
-
import type {
|
|
79
|
-
import
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
(event: '
|
|
120
|
-
(event: '
|
|
121
|
-
(event: '
|
|
122
|
-
(event: '
|
|
123
|
-
(event: '
|
|
124
|
-
(event: '
|
|
125
|
-
(event: 'update-
|
|
126
|
-
(event: '
|
|
127
|
-
(event: '
|
|
128
|
-
(event: '
|
|
129
|
-
(event: '
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
inactivityTimer.value !== null && clearTimeout(inactivityTimer.value)
|
|
188
|
-
})
|
|
189
|
-
</script>
|
|
190
|
-
|
|
191
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-layout-the-header-new
|
|
3
|
+
v-if="props.newView"
|
|
4
|
+
v-model:security="security"
|
|
5
|
+
v-model:new-view-local="newViewLocal"
|
|
6
|
+
:is-show-main-menu="props.isShowMainMenu"
|
|
7
|
+
:company-name="props.companyName"
|
|
8
|
+
:beta-text="props.betaText"
|
|
9
|
+
:global-refresh-loading="props.globalRefreshLoading"
|
|
10
|
+
:hostname="props.hostname"
|
|
11
|
+
:project-name="props.projectName"
|
|
12
|
+
:is-preference="props.isPreference"
|
|
13
|
+
:selected-language-type="props.selectedLanguageType"
|
|
14
|
+
:selected-lang="props.selectedLang"
|
|
15
|
+
:new-view="props.newView"
|
|
16
|
+
:time-format="props.timeFormat"
|
|
17
|
+
:project="props.project"
|
|
18
|
+
:is-dark-theme="props.isDarkTheme"
|
|
19
|
+
:remote-console="props.remoteConsole"
|
|
20
|
+
:vm-cluster="props.vmCluster"
|
|
21
|
+
:security-loader="props.securityLoader"
|
|
22
|
+
:recovery="props.recovery"
|
|
23
|
+
@toggle-main-menu="emits('toggle-main-menu')"
|
|
24
|
+
@show-preference="emits('show-preference')"
|
|
25
|
+
@reset-preference="emits('reset-preference')"
|
|
26
|
+
@hide-preference="emits('hide-preference')"
|
|
27
|
+
@global-refresh="emits('global-refresh')"
|
|
28
|
+
@update-time-format="emits('update-time-format', $event)"
|
|
29
|
+
@change-theme-mode="emits('change-theme-mode')"
|
|
30
|
+
@update-language="emits('update-language', $event)"
|
|
31
|
+
@update-is-browser="emits('update-is-browser', $event)"
|
|
32
|
+
@update-remote-console="emits('update-remote-console', $event)"
|
|
33
|
+
@update-vm-clusters="emits('update-vm-clusters', $event)"
|
|
34
|
+
@security-confirm="emits('security-confirm', $event)"
|
|
35
|
+
@submit-preferences="emits('submit-preferences')"
|
|
36
|
+
/>
|
|
37
|
+
<common-layout-the-header-old
|
|
38
|
+
v-else
|
|
39
|
+
v-model:security="security"
|
|
40
|
+
v-model:new-view-local="newViewLocal"
|
|
41
|
+
:company-name="props.companyName"
|
|
42
|
+
:beta-text="props.betaText"
|
|
43
|
+
:global-refresh-loading="props.globalRefreshLoading"
|
|
44
|
+
:hostname="props.hostname"
|
|
45
|
+
:project-name="props.projectName"
|
|
46
|
+
:is-preference="props.isPreference"
|
|
47
|
+
:selected-language-type="props.selectedLanguageType"
|
|
48
|
+
:selected-lang="props.selectedLang"
|
|
49
|
+
:new-view="props.newView"
|
|
50
|
+
:time-format="props.timeFormat"
|
|
51
|
+
:project="props.project"
|
|
52
|
+
:remote-console="props.remoteConsole"
|
|
53
|
+
:vm-cluster="props.vmCluster"
|
|
54
|
+
:security-loader="props.securityLoader"
|
|
55
|
+
:recovery="props.recovery"
|
|
56
|
+
@toggle-main-menu="emits('toggle-main-menu')"
|
|
57
|
+
@show-preference="emits('show-preference')"
|
|
58
|
+
@hide-preference="emits('hide-preference')"
|
|
59
|
+
@global-refresh="emits('global-refresh')"
|
|
60
|
+
@update-time-format="emits('update-time-format', $event)"
|
|
61
|
+
@change-theme-mode="emits('change-theme-mode')"
|
|
62
|
+
@update-language="emits('update-language', $event)"
|
|
63
|
+
@update-is-browser="emits('update-is-browser', $event)"
|
|
64
|
+
@update-remote-console="emits('update-remote-console', $event)"
|
|
65
|
+
@update-vm-clusters="emits('update-vm-clusters', $event)"
|
|
66
|
+
@security-confirm="emits('security-confirm', $event)"
|
|
67
|
+
@submit-preferences="emits('submit-preferences')"
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<common-layout-the-header-modals-reconnect />
|
|
71
|
+
<common-layout-the-header-modals-redirect-login />
|
|
72
|
+
</template>
|
|
73
|
+
|
|
74
|
+
<script setup lang="ts">
|
|
75
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
76
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
77
|
+
import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
|
|
78
|
+
import type { UI_I_Recovery } from '~/components/common/layout/theHeader/userMenu/modals/preferences/security/lib/models/interfaces'
|
|
79
|
+
import { checkIsTokenExpired } from '~/lib/utils/token'
|
|
80
|
+
|
|
81
|
+
const security = defineModel<boolean>('security')
|
|
82
|
+
const newViewLocal = defineModel<boolean>('newViewLocal')
|
|
83
|
+
|
|
84
|
+
const props = withDefaults(
|
|
85
|
+
defineProps<{
|
|
86
|
+
isShowMainMenu: boolean
|
|
87
|
+
companyName: string
|
|
88
|
+
betaText: string
|
|
89
|
+
globalRefreshLoading: boolean
|
|
90
|
+
project: UI_T_Project
|
|
91
|
+
projectName: string
|
|
92
|
+
hostname: string
|
|
93
|
+
isPreference: boolean
|
|
94
|
+
selectedLanguageType: string
|
|
95
|
+
selectedLang: UI_I_Dropdown
|
|
96
|
+
remoteConsole: string
|
|
97
|
+
vmCluster: boolean
|
|
98
|
+
newView: boolean
|
|
99
|
+
timeFormat: string
|
|
100
|
+
isDarkTheme: boolean
|
|
101
|
+
isPauseReconnect: boolean
|
|
102
|
+
expireTimeFromState: number
|
|
103
|
+
isShowReconnectModal: boolean
|
|
104
|
+
isShowRedirectLoginModal: boolean
|
|
105
|
+
securityLoader?: boolean // для Сферы
|
|
106
|
+
recovery?: UI_I_Recovery | null // для Сферы
|
|
107
|
+
}>(),
|
|
108
|
+
{
|
|
109
|
+
securityLoader: false,
|
|
110
|
+
recovery: null,
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
const emits = defineEmits<{
|
|
115
|
+
(event: 'toggle-main-menu'): void
|
|
116
|
+
(event: 'global-refresh'): void
|
|
117
|
+
(event: 'show-preference'): void
|
|
118
|
+
(event: 'reset-preference'): void
|
|
119
|
+
(event: 'hide-preference'): void
|
|
120
|
+
(event: 'change-theme-mode'): void
|
|
121
|
+
(event: 'update-time-format', value: UI_T_TimeValue): void
|
|
122
|
+
(event: 'update-language', value: UI_I_Dropdown): void
|
|
123
|
+
(event: 'update-is-browser', value: string): void
|
|
124
|
+
(event: 'update-remote-console', value: string): void
|
|
125
|
+
(event: 'update-vm-clusters', value: boolean): void
|
|
126
|
+
(event: 'security-confirm', value: boolean): void
|
|
127
|
+
(event: 'submit-preferences'): void
|
|
128
|
+
(event: 'show-redirect-login-modal', value: boolean): void
|
|
129
|
+
(event: 'show-reconnect-modal', value: boolean): void
|
|
130
|
+
}>()
|
|
131
|
+
|
|
132
|
+
const inactivityTimer = ref<NodeJS.Timeout | undefined>(undefined)
|
|
133
|
+
const inactivityTimeout = ref<number>(10 * 60 * 1000)
|
|
134
|
+
|
|
135
|
+
const startInactivityTimer = (): void => {
|
|
136
|
+
inactivityTimer.value = setTimeout(() => {
|
|
137
|
+
// Проверяем если isPauseReconnect истина то не показываем модальное окно переподключения,
|
|
138
|
+
// к примеру если загружаем файл и он загружается дольше чем срабатывает таймаут
|
|
139
|
+
|
|
140
|
+
if (props.isPauseReconnect) {
|
|
141
|
+
startInactivityTimer()
|
|
142
|
+
return
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const expireTime =
|
|
146
|
+
props.expireTimeFromState || useCookie('token-expired-time').value
|
|
147
|
+
|
|
148
|
+
const isExpiredToken = checkIsTokenExpired(expireTime)
|
|
149
|
+
|
|
150
|
+
if (isExpiredToken) {
|
|
151
|
+
emits('show-redirect-login-modal', true)
|
|
152
|
+
|
|
153
|
+
if (props.isShowReconnectModal) {
|
|
154
|
+
emits('show-reconnect-modal', false)
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
if (!isExpiredToken && !props.isShowRedirectLoginModal) {
|
|
159
|
+
emits('show-reconnect-modal', true)
|
|
160
|
+
startInactivityTimer()
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
console.log('Пользователь бездействует!')
|
|
164
|
+
}, inactivityTimeout.value)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const resetInactivityTimer = (): void => {
|
|
168
|
+
// Сброс таймера бездействия при каждом действии пользователя
|
|
169
|
+
inactivityTimer.value !== null && clearTimeout(inactivityTimer.value)
|
|
170
|
+
startInactivityTimer()
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
onMounted(() => {
|
|
174
|
+
document.addEventListener('mousemove', resetInactivityTimer)
|
|
175
|
+
|
|
176
|
+
startInactivityTimer()
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
onBeforeUnmount(() => {
|
|
180
|
+
document.removeEventListener('mousemove', resetInactivityTimer)
|
|
181
|
+
|
|
182
|
+
inactivityTimer.value !== null && clearTimeout(inactivityTimer.value)
|
|
183
|
+
})
|
|
184
|
+
</script>
|
|
185
|
+
|
|
186
|
+
<style scoped lang="scss"></style>
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
<div class="container-content user-menu-container">
|
|
103
103
|
<common-layout-the-header-user-menu
|
|
104
104
|
v-model:security="security"
|
|
105
|
+
v-model:new-view-local="newViewLocal"
|
|
105
106
|
:hostname="props.hostname"
|
|
106
107
|
:is-preference="isPreference"
|
|
107
108
|
:time-format="props.timeFormat"
|
|
108
109
|
:selected-language-type="props.selectedLanguageType"
|
|
109
110
|
:selected-language="props.selectedLang"
|
|
110
111
|
:new-view="props.newView"
|
|
111
|
-
:new-view-local="props.newViewLocal"
|
|
112
112
|
:project="props.project"
|
|
113
113
|
:remote-console="props.remoteConsole"
|
|
114
114
|
:vm-cluster="props.vmCluster"
|
|
@@ -121,7 +121,6 @@
|
|
|
121
121
|
@update-time-format="emits('update-time-format', $event)"
|
|
122
122
|
@update-language="emits('update-language', $event)"
|
|
123
123
|
@update-is-browser="emits('update-is-browser', $event)"
|
|
124
|
-
@update-is-new-view="emits('update-is-new-view', $event)"
|
|
125
124
|
@update-remote-console="emits('update-remote-console', $event)"
|
|
126
125
|
@update-vm-clusters="emits('update-vm-clusters', $event)"
|
|
127
126
|
@security-confirm="emits('security-confirm', $event)"
|
|
@@ -138,11 +137,10 @@ import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropd
|
|
|
138
137
|
import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
|
|
139
138
|
import type { UI_T_Project } from '~/lib/models/types'
|
|
140
139
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
141
|
-
import type {
|
|
142
|
-
UI_I_Recovery
|
|
143
|
-
} from "~/components/common/layout/theHeader/userMenu/modals/preferences/security/lib/models/interfaces";
|
|
140
|
+
import type { UI_I_Recovery } from '~/components/common/layout/theHeader/userMenu/modals/preferences/security/lib/models/interfaces'
|
|
144
141
|
|
|
145
142
|
const security = defineModel<boolean>('security')
|
|
143
|
+
const newViewLocal = defineModel<boolean>('newViewLocal')
|
|
146
144
|
|
|
147
145
|
const props = defineProps<{
|
|
148
146
|
isShowMainMenu: boolean
|
|
@@ -158,7 +156,6 @@ const props = defineProps<{
|
|
|
158
156
|
remoteConsole: string
|
|
159
157
|
vmCluster: boolean
|
|
160
158
|
newView: boolean
|
|
161
|
-
newViewLocal: boolean
|
|
162
159
|
timeFormat: string
|
|
163
160
|
isDarkTheme: boolean
|
|
164
161
|
securityLoader: boolean // для Сферы
|
|
@@ -175,7 +172,6 @@ const emits = defineEmits<{
|
|
|
175
172
|
(event: 'update-time-format', value: UI_T_TimeValue): void
|
|
176
173
|
(event: 'update-language', value: UI_I_Dropdown): void
|
|
177
174
|
(event: 'update-is-browser', value: string): void
|
|
178
|
-
(event: 'update-is-new-view', value: boolean): void
|
|
179
175
|
(event: 'update-remote-console', value: string): void
|
|
180
176
|
(event: 'update-vm-clusters', value: boolean): void
|
|
181
177
|
(event: 'security-confirm', value: boolean): void
|