feat: Windows admin in Settings UI and WinRM host test (0.10.1)
Store domain admin in ui_settings (DB overrides env); qwinsta/logoff use effective config.
Host card: POST /hosts/{id}/actions/winrm-test via pywinrm.
This commit is contained in:
@@ -412,6 +412,40 @@ export function testMobileDevicePush(deviceId: number): Promise<{ message: strin
|
||||
return apiFetch(`/api/v1/mobile/devices/${deviceId}/test-push`, { method: "POST" });
|
||||
}
|
||||
|
||||
export interface WinAdminSettings {
|
||||
configured: boolean;
|
||||
user: string | null;
|
||||
password_hint: string | null;
|
||||
source: string;
|
||||
}
|
||||
|
||||
export function fetchWinAdminSettings(): Promise<WinAdminSettings> {
|
||||
return apiFetch<WinAdminSettings>("/api/v1/settings/win-admin");
|
||||
}
|
||||
|
||||
export function updateWinAdminSettings(payload: {
|
||||
user?: string | null;
|
||||
password?: string | null;
|
||||
}): Promise<WinAdminSettings> {
|
||||
return apiFetch<WinAdminSettings>("/api/v1/settings/win-admin", {
|
||||
method: "PUT",
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
export interface HostWinRmTestResult {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
target: string;
|
||||
hostname: string | null;
|
||||
}
|
||||
|
||||
export function testHostWinRm(hostId: number): Promise<HostWinRmTestResult> {
|
||||
return apiFetch<HostWinRmTestResult>(`/api/v1/hosts/${hostId}/actions/winrm-test`, {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
export interface DashboardSummary {
|
||||
events_last_24h: number;
|
||||
hosts_total: number;
|
||||
|
||||
Reference in New Issue
Block a user