feat: Linux SSH admin and remote ssh-monitor update (0.11.0)
This commit is contained in:
@@ -446,6 +446,48 @@ export function testHostWinRm(hostId: number): Promise<HostWinRmTestResult> {
|
||||
});
|
||||
}
|
||||
|
||||
export interface LinuxAdminSettings {
|
||||
configured: boolean;
|
||||
user: string | null;
|
||||
password_hint: string | null;
|
||||
source: string;
|
||||
}
|
||||
|
||||
export function fetchLinuxAdminSettings(): Promise<LinuxAdminSettings> {
|
||||
return apiFetch<LinuxAdminSettings>("/api/v1/settings/linux-admin");
|
||||
}
|
||||
|
||||
export function updateLinuxAdminSettings(payload: {
|
||||
user?: string | null;
|
||||
password?: string | null;
|
||||
}): Promise<LinuxAdminSettings> {
|
||||
return apiFetch<LinuxAdminSettings>("/api/v1/settings/linux-admin", {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export interface HostSshActionResult {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
target: string;
|
||||
stdout: string | null;
|
||||
stderr: string | null;
|
||||
exit_code: number | null;
|
||||
}
|
||||
|
||||
export function testHostSsh(hostId: number): Promise<HostSshActionResult> {
|
||||
return apiFetch<HostSshActionResult>(`/api/v1/hosts/${hostId}/actions/ssh-test`, {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export function updateHostAgentViaSsh(hostId: number): Promise<HostSshActionResult> {
|
||||
return apiFetch<HostSshActionResult>(`/api/v1/hosts/${hostId}/actions/agent-update`, {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export interface DashboardSummary {
|
||||
events_last_24h: number;
|
||||
hosts_total: number;
|
||||
|
||||
Reference in New Issue
Block a user