@@ -13,6 +13,7 @@ import type {
|
||||
RegistrationRequest,
|
||||
DeployAgentsRequest,
|
||||
DeployResponse,
|
||||
SystemMetrics,
|
||||
} from "../types/agent.types";
|
||||
|
||||
class AgentApiService {
|
||||
@@ -162,6 +163,13 @@ class AgentApiService {
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async getSystemMetrics(): Promise<SystemMetrics[]> {
|
||||
const response = await apiClient.get<SystemMetrics[]>(
|
||||
`${this.basePath}/system-metrics`,
|
||||
);
|
||||
return Array.isArray(response.data) ? response.data : [];
|
||||
}
|
||||
}
|
||||
|
||||
export const agentApiService = new AgentApiService();
|
||||
|
||||
Reference in New Issue
Block a user