feat: git-based agent version reference and unified outdated badge (0.20.0)

SAC reads latest RDP/ssh-monitor versions from configured git repos for outdated detection, update targets, and settings test-git.
This commit is contained in:
2026-06-20 16:25:53 +10:00
parent d820d941c1
commit f411d8f070
22 changed files with 932 additions and 45 deletions
+23
View File
@@ -267,6 +267,8 @@ export interface HostListResponse {
page: number;
page_size: number;
latest_agent_versions?: Record<string, string>;
/** Эталон для «устарела»: max(git latest, min, max в fleet) */
reference_agent_versions?: Record<string, string>;
}
export interface ProblemSummary {
@@ -548,9 +550,24 @@ export interface AgentUpdateSettings {
min_rdp_version: string | null;
min_ssh_version: string | null;
win_agent_update_script: string | null;
rdp_git_repo_url: string | null;
ssh_git_repo_url: string | null;
git_branch: string;
git_latest_rdp_version: string | null;
git_latest_ssh_version: string | null;
git_fetched_at: string | null;
git_errors: Record<string, string>;
source: string;
}
export interface AgentGitTestResult {
git_latest_rdp_version: string | null;
git_latest_ssh_version: string | null;
git_fetched_at: string | null;
git_errors: Record<string, string>;
from_cache: boolean;
}
export function fetchAgentUpdateSettings(): Promise<AgentUpdateSettings> {
return apiFetch<AgentUpdateSettings>("/api/v1/settings/agent-updates");
}
@@ -564,6 +581,12 @@ export function saveAgentUpdateSettings(
});
}
export function testAgentGitRelease(): Promise<AgentGitTestResult> {
return apiFetch<AgentGitTestResult>("/api/v1/settings/agent-updates/test-git", {
method: "POST",
});
}
export interface DashboardSummary {
events_last_24h: number;
hosts_total: number;