From 5d226bdafc30414b0350911f48d054ac5e16c28d Mon Sep 17 00:00:00 2001 From: berkio_admin_gitea Date: Wed, 8 Jul 2026 06:57:18 +0000 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=BA=D0=B0:=20?= =?UTF-8?q?=D1=81=D1=82=D0=B5=D0=BA=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=82=D0=BE=D0=B2=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20abs?= =?UTF-8?q?olute-=D0=BF=D0=BE=D0=B7=D0=B8=D1=86=D0=B8=D0=BE=D0=BD=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20(=D0=B1=D0=B5?= =?UTF-8?q?=D0=B7=20=D0=B7=D0=B0=D0=B7=D0=BE=D1=80=D0=BE=D0=B2),=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BF=D0=B0=D0=BA=D1=82=D0=BD=D1=8B=D0=B5=20=D0=BF?= =?UTF-8?q?=D0=BB=D0=B8=D1=82=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Документы: сегменты сайт/бот позиционируются absolute от низа (bottom:0 и bottom:siPx), стыкуются вплотную — flex-подход давал зазор из-за нерезолвимых высот - Плитки метрик ~вдвое ниже (padding 9px, val 20px); убрана плитка «Среднее на страницу» (среднее с/стр перенесено в подпись «Общее время обработки») Co-Authored-By: Claude Opus 4.8 --- app/main.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/main.py b/app/main.py index 9f68490..c226661 100644 --- a/app/main.py +++ b/app/main.py @@ -3035,11 +3035,11 @@ _ADMIN_HTML = """ .top .sp{ flex:1; } button{ font:inherit; border:none; border-radius:10px; padding:8px 14px; background:var(--blue); color:#fff; cursor:pointer; } button.ghost{ background:#fff; color:var(--blue); border:1px solid var(--line); } - .cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-bottom:20px; } - .card{ background:var(--card); border-radius:16px; padding:16px; } - .card .lbl{ color:var(--sec); font-size:13px; margin-bottom:6px; } - .card .val{ font-size:26px; font-weight:600; } - .card .sub{ color:var(--sec); font-size:12px; margin-top:4px; } + .cards{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin-bottom:18px; } + .card{ background:var(--card); border-radius:12px; padding:9px 14px; } + .card .lbl{ color:var(--sec); font-size:12px; margin-bottom:2px; } + .card .val{ font-size:20px; font-weight:600; line-height:1.15; } + .card .sub{ color:var(--sec); font-size:11px; margin-top:1px; } section{ background:var(--card); border-radius:16px; padding:16px; margin-bottom:20px; overflow:hidden; } section h2{ font-size:16px; margin:0 0 12px; font-weight:600; } .scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; } @@ -3065,9 +3065,8 @@ _ADMIN_HTML = """ .daychart-cap{ font-size:12px; color:var(--ink); margin-bottom:20px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; } .dc-leg{ display:inline-flex; align-items:center; gap:4px; } .dc-leg i{ width:9px; height:9px; border-radius:2px; display:inline-block; } - .b.stack{ background:transparent; display:flex; flex-direction:column; overflow:hidden; opacity:1; } - .b.stack .seg{ width:100%; flex:none; } - .b.stack .seg.top{ border-bottom:1.5px solid var(--card); } + .b.stack{ background:transparent; height:78px; overflow:visible; opacity:1; } + .b.stack .seg{ position:absolute; left:0; right:0; } .muted{ color:var(--sec); } #gate{ max-width:360px; margin:80px auto; background:#fff; border-radius:16px; padding:24px; text-align:center; } #gate input{ width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px; font:inherit; margin:14px 0; } @@ -3099,7 +3098,6 @@ _ADMIN_HTML = """
Заходы сегодня
Документов обработано
Общее время обработки
-
Среднее на страницу
время обработки 1 стр.
@@ -3207,8 +3205,7 @@ _ADMIN_HTML = """ document.getElementById('m-docs').textContent = (d.docs.total_count||0).toLocaleString('ru-RU'); document.getElementById('m-docs-sub').textContent = (d.docs.total_pages||0).toLocaleString('ru-RU') + ' стр. · ' + size(d.docs.total_result_mb); document.getElementById('m-time').textContent = dur(d.docs.total_seconds); - document.getElementById('m-time-sub').textContent = 'суммарно по всем файлам'; - document.getElementById('m-avg').textContent = (d.docs.avg_page_seconds||0).toFixed(1) + ' с'; + document.getElementById('m-time-sub').textContent = 'всего · ~' + (d.docs.avg_page_seconds||0).toFixed(1) + ' с/стр'; // Подписки var subs = d.subs.list || []; @@ -3233,17 +3230,20 @@ _ADMIN_HTML = """ ' (уник. ' + (d.visits.unique_total||0).toLocaleString('ru-RU') + ')'; // 2) Документы — стек сайт (низ, синий) + бот (верх, фиолетовый). - // Высоты сегментов В ПИКСЕЛЯХ (высота графика = 78px, см. .bars) — иначе - // вложенные проценты во flex не резолвятся и между сегментами появляется зазор. + // Абсолютное позиционирование от низа (px): сегменты стыкуются вплотную, + // без flex-зазоров. Высота графика = 78px (см. .bars). var mD = barMax(function(x){return (x.files_site||0)+(x.files_bot||0);}); var CH = 78; var totSite=0, totBot=0; document.getElementById('bars-docs').innerHTML = dl.length ? dl.map(function(x){ var si=x.files_site||0, bo=x.files_bot||0, tot=si+bo; totSite+=si; totBot+=bo; + var siPx = si>0 ? Math.max(2, Math.round(si/mD*CH)) : 0; + var boPx = bo>0 ? Math.max(2, Math.round(bo/mD*CH)) : 0; var segs=''; - if(bo>0) segs += '
'; - if(si>0) segs += '
'; - return '
'+(tot||'')+''+segs+''+dd(x)+'
'; + if(si>0) segs += '
'; + if(bo>0) segs += '
'; + var lbl = tot ? ''+tot+'' : ''; + return '
'+lbl+segs+''+dd(x)+'
'; }).join('') : emptyBars; document.getElementById('docs-cap').textContent = '· сайт ' + totSite + ' / бот ' + totBot + ' за 14 дн.';