diff --git a/backend/app/api/v1/hosts.py b/backend/app/api/v1/hosts.py index a783b5a..b8a2815 100644 --- a/backend/app/api/v1/hosts.py +++ b/backend/app/api/v1/hosts.py @@ -27,7 +27,11 @@ from app.services.host_remote_actions import ( run_ssh_monitor_update_action, start_host_remote_action, ) -from app.services.agent_update_settings import get_effective_agent_update_config +from app.services.agent_update_settings import ( + PRODUCT_RDP, + PRODUCT_SSH, + get_effective_agent_update_config, +) from app.services.agent_host_config import get_host_agent_settings, update_host_agent_config from app.services.host_sessions import ( HostSessionRow, @@ -165,6 +169,8 @@ def list_hosts( page_size=page_size, latest_agent_versions=latest_map, reference_agent_versions=reference_map, + git_latest_rdp_version=git_release.versions.get(PRODUCT_RDP) or None, + git_latest_ssh_version=git_release.versions.get(PRODUCT_SSH) or None, ) diff --git a/backend/app/schemas/list_models.py b/backend/app/schemas/list_models.py index 59c5c7b..07897f4 100644 --- a/backend/app/schemas/list_models.py +++ b/backend/app/schemas/list_models.py @@ -53,6 +53,14 @@ class HostListResponse(BaseModel): default_factory=dict, description="Эталон для «устарела»: max(git latest, min, max в fleet)", ) + git_latest_rdp_version: str | None = Field( + None, + description="Последняя версия rdp-login-monitor из git (version.txt / main)", + ) + git_latest_ssh_version: str | None = Field( + None, + description="Последняя версия ssh-monitor из git (version.txt / main)", + ) class EventSummary(BaseModel): diff --git a/backend/app/version.py b/backend/app/version.py index 31c3fda..3b96cb9 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.31" +APP_VERSION = "0.20.32" APP_VERSION_LABEL = f"{APP_NAME} v.{APP_VERSION}" diff --git a/backend/tests/test_health.py b/backend/tests/test_health.py index 8044943..416dd04 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.31" + assert APP_VERSION == "0.20.32" assert APP_NAME == "Security Alert Center" - assert APP_VERSION_LABEL == "Security Alert Center v.0.20.31" + assert APP_VERSION_LABEL == "Security Alert Center v.0.20.32" diff --git a/frontend/src/api.ts b/frontend/src/api.ts index 90209a2..64e0d07 100644 --- a/frontend/src/api.ts +++ b/frontend/src/api.ts @@ -286,6 +286,9 @@ export interface HostListResponse { latest_agent_versions?: Record; /** Эталон для «устарела»: max(git latest, min, max в fleet) */ reference_agent_versions?: Record; + /** Последние версии из git (version.txt на main) */ + git_latest_rdp_version?: string | null; + git_latest_ssh_version?: string | null; } export interface ProblemSummary { diff --git a/frontend/src/version.ts b/frontend/src/version.ts index b3ef3ed..18ecc97 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.31"; +export const APP_VERSION = "0.20.32"; export const APP_VERSION_LABEL = `${APP_NAME} v.${APP_VERSION}`; diff --git a/frontend/src/views/HostsView.vue b/frontend/src/views/HostsView.vue index 7aafb2b..da6f8b2 100644 --- a/frontend/src/views/HostsView.vue +++ b/frontend/src/views/HostsView.vue @@ -19,10 +19,24 @@

{{ error }}

Загрузка…