API сессий: добавить sessionType и clientPlatform

This commit is contained in:
AidarKC
2026-06-13 14:15:42 +04:00
parent 3b8ea70d3c
commit 919387f581
21 changed files with 446 additions and 15 deletions
+9
View File
@@ -10,6 +10,13 @@ import {
export const pageMeta = { id: 'device-session-view', title: 'Сеанс устройства' };
function formatSessionType(sessionType) {
if (Number(sessionType) === 100) return 'Homeserver';
if (Number(sessionType) === 50) return 'Wallet';
if (Number(sessionType) === 1) return 'Client';
return `Type ${Number(sessionType) || 0}`;
}
function formatSessionTime(ms) {
return new Date(ms).toLocaleString('ru-RU', {
day: '2-digit',
@@ -46,6 +53,8 @@ export function render({ navigate, route }) {
details.className = 'card stack';
details.innerHTML = `
<div><p class="meta-muted">sessionId</p><p>${session.sessionId}</p></div>
<div><p class="meta-muted">sessionType</p><p>${formatSessionType(session.sessionType)}</p></div>
<div><p class="meta-muted">clientPlatform</p><p>${session.clientPlatform || '-'}</p></div>
<div><p class="meta-muted">clientInfoFromClient</p><p>${session.clientInfoFromClient || '-'}</p></div>
<div><p class="meta-muted">clientInfoFromRequest</p><p>${session.clientInfoFromRequest || '-'}</p></div>
<div><p class="meta-muted">geo</p><p>${session.geo || 'unknown'}</p></div>