From 87453a4ef0143b0014a5742d2fed087c9c57512d Mon Sep 17 00:00:00 2001 From: igor04091968 Date: Tue, 2 Jun 2026 21:01:08 +0300 Subject: [PATCH] fix(detmir): repair portal deep links --- adk-rust/RUNBOOK.md | 7 +++++++ adk-rust/crates/detmir-portal/src/main.rs | 9 +++++++-- adk-rust/crates/detmir-portal/src/static/app.js | 12 +++++++----- ansible/deploy_proxmox_web_gateway.yml | 4 ++-- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/adk-rust/RUNBOOK.md b/adk-rust/RUNBOOK.md index edf7787..47ce9ea 100644 --- a/adk-rust/RUNBOOK.md +++ b/adk-rust/RUNBOOK.md @@ -1580,6 +1580,13 @@ systemctl is-active tsj-guardian-bot tsj-guardian-watchdog gost-tg `.playwright-cli/page-2026-06-02T17-31-49-049Z.png`, `.playwright-cli/page-2026-06-02T17-33-50-318Z.png`, `.playwright-cli/page-2026-06-02T17-34-04-725Z.png`. + - portal link repair after Grafana/gateway smoke: quick links now open in a + separate tab, `worktime_report` points to explicit HTML + `/reports/worktime/management?format=html&host=SHARKON2025`, + `1С действия` is shown in the portal, and gateway `/r/aw-worktime` is + pinned to the same HTML report. Production smoke: AW UI, Worktime, 1C + brief, and 1C actions returned `200 text/html`; Grafana links correctly + redirect to `/login` when no Grafana session exists. Отложить: diff --git a/adk-rust/crates/detmir-portal/src/main.rs b/adk-rust/crates/detmir-portal/src/main.rs index d5f7971..d3e5344 100644 --- a/adk-rust/crates/detmir-portal/src/main.rs +++ b/adk-rust/crates/detmir-portal/src/main.rs @@ -622,7 +622,7 @@ fn links() -> PortalLinks { "/d/detmir-aw-main/detmir-activitywatch?orgId=1&from=now-48h&to=now&timezone=browser&var-host=SHARKON2025&refresh=5m" .to_string(), aw_ui: "/r/aw/".to_string(), - worktime_report: "/r/aw-worktime".to_string(), + worktime_report: "/reports/worktime/management?format=html&host=SHARKON2025".to_string(), file1c_brief: "/r/file1c/brief".to_string(), file1c_actions: "/r/file1c/actions".to_string(), } @@ -935,7 +935,12 @@ mod tests { fn links_are_gateway_relative() { let links = links(); assert!(links.detmir_activitywatch.starts_with("/d/")); - assert_eq!(links.worktime_report, "/r/aw-worktime"); + assert!( + links + .worktime_report + .starts_with("/reports/worktime/management?") + ); + assert!(links.worktime_report.contains("format=html")); } #[test] diff --git a/adk-rust/crates/detmir-portal/src/static/app.js b/adk-rust/crates/detmir-portal/src/static/app.js index ecf1cf9..e4467fb 100644 --- a/adk-rust/crates/detmir-portal/src/static/app.js +++ b/adk-rust/crates/detmir-portal/src/static/app.js @@ -52,12 +52,14 @@ function label(name) { } function renderLinks(links) { + const link = (text, href) => `${escapeHtml(text)}`; return ``; } diff --git a/ansible/deploy_proxmox_web_gateway.yml b/ansible/deploy_proxmox_web_gateway.yml index 9a6467f..8b64061 100644 --- a/ansible/deploy_proxmox_web_gateway.yml +++ b/ansible/deploy_proxmox_web_gateway.yml @@ -98,9 +98,9 @@ title: "AW-rus Management Report" category: "Operations" description: "Управленческий worktime/report API на CT 203." - target_url: "http://10.10.10.13:5610/reports/worktime/management?day=today" + target_url: "http://10.10.10.13:5610/reports/worktime/management?format=html&host=SHARKON2025" proxy_path: "/r/aw-worktime" - proxy_target_url: "http://10.10.10.13:5610/reports/worktime/management?day=today" + proxy_target_url: "http://10.10.10.13:5610/reports/worktime/management?format=html&host=SHARKON2025" external_enabled: true - slug: "detmir-portal" title: "DetMir Portal"