From d9893497ce03bac1c27e98456153a98987c655ce Mon Sep 17 00:00:00 2001 From: PTah Date: Fri, 5 Jun 2026 10:20:32 +1000 Subject: [PATCH] fix(ui): full-row host click, agent version label on host card Co-authored-by: Cursor --- frontend/src/style.css | 31 ++++++++++++------------- frontend/src/views/HostDetailView.vue | 5 ++-- frontend/src/views/HostsView.vue | 33 ++++++++++++++++----------- 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/frontend/src/style.css b/frontend/src/style.css index 2a987f2..7032d9e 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -17,29 +17,26 @@ a { color: #7eb8ff; } -/* Клик по хосту в таблице — как пункты левого меню (полоска слева, без подчёркивания). */ -.sac-host-nav-link { - display: inline-block; - padding: 0.2rem 0.45rem 0.2rem 0.3rem; - margin: -0.2rem -0.35rem; - border-radius: 4px; - border-left: 3px solid transparent; - color: #c5d0dc; - text-decoration: none; +/* Клик по строке хоста — как пункты левого меню (полоска слева на всю строку). */ +.sac-host-row { cursor: pointer; - transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease; + transition: background 0.12s ease, box-shadow 0.12s ease; } -.sac-host-nav-link:hover { +.sac-host-row:hover, +.sac-host-row:focus-visible { background: #1e2d3d; - color: #fff; - border-left-color: #3db8ff; + box-shadow: inset 3px 0 0 #3db8ff; + outline: none; } -.sac-host-nav-link.router-link-active { - background: #1a3a52; - color: #fff; - border-left-color: #3db8ff; +.sac-host-row td.actions { + cursor: default; +} + +.sac-host-row:hover td.actions, +.sac-host-row:focus-visible td.actions { + background: transparent; } .layout { diff --git a/frontend/src/views/HostDetailView.vue b/frontend/src/views/HostDetailView.vue index 5cc3404..75f0451 100644 --- a/frontend/src/views/HostDetailView.vue +++ b/frontend/src/views/HostDetailView.vue @@ -8,11 +8,10 @@

Hostname: {{ host.hostname }} · ID: {{ host.id }} - · Агент: - {{ agentLabel(host.agent_status) }} + · Агент: {{ agentLabel(host.agent_status) }}

- Product: {{ host.product }} {{ host.product_version || "" }} + Версия агента: {{ host.product_version || "—" }} · OS: {{ host.os_family }} {{ host.os_version || "" }} · IPv4: {{ host.ipv4 || "—" }}

diff --git a/frontend/src/views/HostsView.vue b/frontend/src/views/HostsView.vue index 652db86..3f47e04 100644 --- a/frontend/src/views/HostsView.vue +++ b/frontend/src/views/HostsView.vue @@ -11,7 +11,7 @@

Загрузка…