feat: LLM-анализ — индикатор прогресса, кнопка рескана, статистика на дашборде
- Добавлен статус {"status": "analyzing"} в finding.report на время LLM-анализа
- Кнопка рескана (Retry) под LLM-отчётом в ручном режиме
- LLM-статистика на дашборде: analysed / pending
- Защита от двойного анализа через per-finding asyncio.Lock
- _llm_spinner.html — фрагмент спиннера для состояния analysing
- Удалён мёртвый код: constants, i18n, CSS, queries
- Фиксы: _env_int, индексы БД, UnicodeDecodeError, time.mktime и др.
- Шаблоны: shared includes (_status_badge, _pagination)
- AGENTS.md: workflow (lint, test, commit, rebuild)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Prometheus-compatible metrics endpoint."""
|
||||
|
||||
import time
|
||||
import calendar
|
||||
|
||||
from fastapi import APIRouter, Depends, Response
|
||||
from sqlalchemy import func, select
|
||||
@@ -69,7 +69,7 @@ async def metrics(session: AsyncSession = Depends(get_session)):
|
||||
lines.append(f'guarddog_scans_by_ecosystem{{ecosystem="{eco}"}} {count}')
|
||||
|
||||
if latest:
|
||||
ts = time.mktime(latest.timetuple())
|
||||
ts = calendar.timegm(latest.timetuple())
|
||||
lines += [
|
||||
"",
|
||||
"# HELP guarddog_last_scan_timestamp_seconds Unix timestamp of most recent scan.",
|
||||
|
||||
Reference in New Issue
Block a user