From e7d5b1c60b65301dd84320bf3568e2dd8c624cce Mon Sep 17 00:00:00 2001 From: PTah Date: Wed, 8 Jul 2026 14:48:31 +1000 Subject: [PATCH] fix: SSH update modal polls locally, collapsed log by default (v0.5.9) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modal owns job poll and completion UI with countdown; log hidden until user clicks Показать лог; db.refresh on remote-job; cache-bust poll requests. --- backend/app/api/v1/hosts.py | 1 + backend/app/version.py | 2 +- frontend/src/api.ts | 4 +- .../src/components/HostActionLogModal.vue | 234 +++++++++++++++--- .../src/components/HostActionLogStack.vue | 3 + .../src/composables/useHostRemoteAction.ts | 18 +- 6 files changed, 224 insertions(+), 38 deletions(-) diff --git a/backend/app/api/v1/hosts.py b/backend/app/api/v1/hosts.py index a811811..ce112a7 100644 --- a/backend/app/api/v1/hosts.py +++ b/backend/app/api/v1/hosts.py @@ -653,6 +653,7 @@ def get_host_remote_job( host = db.get(Host, host_id) if host is None: raise HTTPException(status_code=404, detail="Host not found") + db.refresh(host) return HostRemoteActionJobResponse(**get_remote_action_status(host)) diff --git a/backend/app/version.py b/backend/app/version.py index e178a38..e0d7854 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.5.7" +APP_VERSION = "0.5.9" APP_VERSION_LABEL = f"{APP_NAME} v.{APP_VERSION}" diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 219e13e..a3c51ce 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -613,7 +613,9 @@ export function addHostManually(body: HostManualAddRequest): Promise { - return apiFetch(`/api/v1/hosts/${hostId}/actions/remote-job`); + return apiFetch( + `/api/v1/hosts/${hostId}/actions/remote-job?_ts=${Date.now()}`, + ); } export interface HostSessionItem { diff --git a/frontend/src/components/HostActionLogModal.vue b/frontend/src/components/HostActionLogModal.vue index ae7bfe5..3287b72 100644 --- a/frontend/src/components/HostActionLogModal.vue +++ b/frontend/src/components/HostActionLogModal.vue @@ -1,49 +1,60 @@