diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f8cdc7..477d018 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versio ## [Unreleased] +### Added +- Executive report: a **Relatório** button in the analysis view opens `GET /relatorio`, an A4 report of the latest analysis paginated by the vendored Paged.js, with a full-bleed cover (logo, TLP badge, beacon-lane motif drawn from the top hosts), table of contents, KPIs, host ranking, one section per pillar, every alert with its evidence, methodology and glossary. Defaults to `TLP:AMBER` (`?tlp=` changes it) and HTML-escapes every string read from the logs. + ### Changed - Documentation reviewed; the Xexéu references in this changelog now read Harpia. diff --git a/CHANGELOG.pt-BR.md b/CHANGELOG.pt-BR.md index 5eecd79..a630c1f 100644 --- a/CHANGELOG.pt-BR.md +++ b/CHANGELOG.pt-BR.md @@ -6,6 +6,9 @@ Formato baseado no [Keep a Changelog](https://keepachangelog.com/pt-BR/1.1.0/); ## [Unreleased] +### Adicionado +- Relatório executivo: o botão **Relatório** na tela de análise abre `GET /relatorio`, um relatório A4 da última análise paginado pelo Paged.js empacotado, com capa sangrada (logo, selo TLP, motivo de faixas de beacon desenhado a partir dos hosts do topo), sumário, indicadores, ranking de hosts, uma seção por pilar, todos os alertas com a evidência, metodologia e glossário. Padrão `TLP:AMBER` (`?tlp=` troca) e escapa em HTML todo texto lido dos logs. + ### Alterado - Documentação revisada; as referências ao Xexéu neste changelog agora citam o Harpia. diff --git a/apps/gui/ui/app.js b/apps/gui/ui/app.js index 61885d2..1be03b0 100644 --- a/apps/gui/ui/app.js +++ b/apps/gui/ui/app.js @@ -1128,6 +1128,7 @@ function renderReportSummary() { output.textContent = t('Nenhuma análise executada.'); $('#gotoAlerts').hidden = true; $('#gotoHosts').hidden = true; + $('#openReport').hidden = true; return; } reportSummary.hidden = false; @@ -1146,6 +1147,7 @@ function renderReportSummary() { reportStatus.textContent = report.status || '—'; $('#gotoAlerts').hidden = false; $('#gotoHosts').hidden = false; + $('#openReport').hidden = false; const lines = [ message( @@ -1337,6 +1339,7 @@ async function analyzeDataset() { output.textContent = message('Falha na análise: {n}', error.message); $('#gotoAlerts').hidden = true; $('#gotoHosts').hidden = true; + $('#openReport').hidden = true; } finally { analyzeBtn.disabled = false; } @@ -1561,6 +1564,7 @@ function init() { $('#seeAllAlerts').addEventListener('click', () => showView('alerts')); $('#gotoAlerts').addEventListener('click', () => showView('alerts')); $('#gotoHosts').addEventListener('click', () => showView('hosts')); + $('#openReport').addEventListener('click', () => window.open('/relatorio', '_blank', 'noopener')); langSel.addEventListener('change', () => { localStorage.setItem('acaua-lang', langSel.value); diff --git a/apps/gui/ui/i18n-en.js b/apps/gui/ui/i18n-en.js index c92f9db..bef8ac1 100644 --- a/apps/gui/ui/i18n-en.js +++ b/apps/gui/ui/i18n-en.js @@ -103,6 +103,8 @@ export const EN = { 'A API de fusão lista apenas hosts com pelo menos um alerta. Hosts sem alerta não aparecem nesta tabela.': 'The fusion API only lists hosts with at least one alert. Hosts without alerts do not appear in this table.', 'Ver alertas': 'View alerts', 'Ver hosts': 'View hosts', + 'Relatório': 'Report', + 'Abre o relatório executivo da última análise em uma nova aba': 'Opens the executive report of the latest analysis in a new tab', 'Estado do serviço': 'Service status', 'Versão, dataset e armazenamento informados pela API local.': 'Version, dataset and storage reported by the local API.', '{n} pilares ativos': '{n} active pillars', diff --git a/apps/gui/ui/index.html b/apps/gui/ui/index.html index a041a02..a6f851e 100644 --- a/apps/gui/ui/index.html +++ b/apps/gui/ui/index.html @@ -279,6 +279,7 @@