mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
feat: finish the host-metrics plugin, move host status into core (B16)
This commit is contained in:
1 parent
14eb558b85
commit
0a3f05d99d
308 files changed
+53073
-8985
No files matched your search
@@ -1,32 +1,5 @@
|
||||
import { authApi, handleApiError, statsApi } from "@/main-axios";
|
||||
import { authApi, handleApiError } from "@/main-axios";
|
||||
|
||||
// GLOBAL MONITORING SETTINGS
|
||||
// ============================================================================
|
||||
|
||||
export async function getGlobalMonitoringSettings(): Promise<{
|
||||
statusCheckInterval: number;
|
||||
metricsInterval: number;
|
||||
}> {
|
||||
try {
|
||||
const response = await statsApi.get("/global-settings");
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
handleApiError(error, "fetch global monitoring settings");
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateGlobalMonitoringSettings(settings: {
|
||||
statusCheckInterval?: number;
|
||||
metricsInterval?: number;
|
||||
}): Promise<void> {
|
||||
try {
|
||||
await statsApi.post("/global-settings", settings);
|
||||
} catch (error) {
|
||||
handleApiError(error, "update global monitoring settings");
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// LOG LEVEL SETTINGS
|
||||
// ============================================================================
|
||||
|
||||
@@ -184,7 +157,6 @@ export type HostDefaults = {
|
||||
socks5Username?: string;
|
||||
socks5Password?: string;
|
||||
credentialId?: number | null;
|
||||
metricsEnabled?: boolean;
|
||||
statusCheckEnabled?: boolean;
|
||||
fontSize?: number;
|
||||
fontFamily?: string;
|
||||
|
||||
Reference in new issue
Block a user