feat(scan): add guided Linux agent setup in administration
Some checks failed
Build and Release FEDEO / verify (push) Successful in 23s
Build and Release FEDEO / build-and-release (push) Failing after 29s

This commit is contained in:
2026-09-17 18:56:30 +02:00
parent 1329f164d8
commit 68c0a224e5
15 changed files with 869 additions and 89 deletions

View File

@@ -255,8 +255,10 @@ export const useAdmin = () => {
return await $api("/api/admin/system-status")
}
const getInstanceAgents = async (): Promise<{ agents: InstanceAgent[] }> => {
const response = await $api("/api/instance-agents") as any
const getInstanceAgents = async (quiet = false): Promise<{ agents: InstanceAgent[] }> => {
const response = await $api("/api/instance-agents", quiet ? {
retry: 0, timeout: 15000, onRequestError: () => {}, onResponseError: () => {},
} : {}) as any
return { agents: response?.agents || [] }
}
@@ -274,12 +276,17 @@ export const useAdmin = () => {
})
}
const rotateInstanceAgentToken = async (id: string): Promise<{ token: string }> => {
return await $api(`/api/instance-agents/${id}/token`, { method: "POST" })
}
return {
getOverview,
getSystemStatus,
getInstanceAgents,
createInstanceAgent,
updateInstanceAgent,
rotateInstanceAgentToken,
createUser,
createUserForProfile,
updateUser,