From ad2425b0ff1fd5381c69c1deb9859100f6c71e46 Mon Sep 17 00:00:00 2001 From: PTah Date: Mon, 22 Jun 2026 10:22:20 +1000 Subject: [PATCH] fix(frontend): place host sessions panel beside agent config (0.20.29) Co-authored-by: Cursor --- backend/app/version.py | 2 +- backend/tests/test_health.py | 4 +- frontend/src/components/HostSessionsPanel.vue | 4 ++ frontend/src/version.ts | 2 +- frontend/src/views/HostDetailView.vue | 62 ++++++++++++------- 5 files changed, 47 insertions(+), 27 deletions(-) diff --git a/backend/app/version.py b/backend/app/version.py index f33a786..c1ff5de 100644 --- a/backend/app/version.py +++ b/backend/app/version.py @@ -1,5 +1,5 @@ """Единый источник версии SAC (API, health, логи, OpenAPI).""" APP_NAME = "Security Alert Center" -APP_VERSION = "0.20.28" +APP_VERSION = "0.20.29" APP_VERSION_LABEL = f"{APP_NAME} v.{APP_VERSION}" diff --git a/backend/tests/test_health.py b/backend/tests/test_health.py index 0b4e9e9..03800f8 100644 --- a/backend/tests/test_health.py +++ b/backend/tests/test_health.py @@ -4,6 +4,6 @@ from app.version import APP_NAME, APP_VERSION, APP_VERSION_LABEL def test_version_constants(): - assert APP_VERSION == "0.20.28" + assert APP_VERSION == "0.20.29" assert APP_NAME == "Security Alert Center" - assert APP_VERSION_LABEL == "Security Alert Center v.0.20.28" + assert APP_VERSION_LABEL == "Security Alert Center v.0.20.29" diff --git a/frontend/src/components/HostSessionsPanel.vue b/frontend/src/components/HostSessionsPanel.vue index 8dea143..1f08663 100644 --- a/frontend/src/components/HostSessionsPanel.vue +++ b/frontend/src/components/HostSessionsPanel.vue @@ -108,6 +108,10 @@ async function terminate(sessionId: string) { margin: 0.75rem 0; } +.host-sessions { + margin-top: 0; +} + .host-sessions button.secondary { margin-top: 0.5rem; } diff --git a/frontend/src/version.ts b/frontend/src/version.ts index 847a3fe..d1089f1 100644 --- a/frontend/src/version.ts +++ b/frontend/src/version.ts @@ -1,4 +1,4 @@ /** Fallback до загрузки /health; при релизе держите в sync с backend/app/version.py */ export const APP_NAME = "Security Alert Center"; -export const APP_VERSION = "0.20.28"; +export const APP_VERSION = "0.20.29"; export const APP_VERSION_LABEL = `${APP_NAME} v.${APP_VERSION}`; diff --git a/frontend/src/views/HostDetailView.vue b/frontend/src/views/HostDetailView.vue index b54521e..e2c3a5a 100644 --- a/frontend/src/views/HostDetailView.vue +++ b/frontend/src/views/HostDetailView.vue @@ -143,30 +143,32 @@ -
-

Desired config (poll агента)

-

Агент заберёт настройки при следующем poll. Revision: {{ host.agent_config_revision ?? 0 }}

-
- - - - -

{{ agentConfigMessage }}

-
-
+
+
+

Desired config (poll агента)

+

Агент заберёт настройки при следующем poll. Revision: {{ host.agent_config_revision ?? 0 }}

+
+ + + + +

{{ agentConfigMessage }}

+
+
- + +

Железо и ПО

@@ -847,7 +849,21 @@ watch( } .host-agent-config { + margin-top: 0; +} + +.host-config-sessions-row { + display: flex; + flex-wrap: wrap; + gap: 1rem; margin-top: 1rem; + align-items: flex-start; +} + +.host-config-sessions-row > .host-agent-config, +.host-config-sessions-row > .host-sessions { + flex: 1 1 22rem; + min-width: min(100%, 22rem); } .agent-config-form {