fix: Squash commit of several fixes and features for many different elements
This commit is contained in:
@@ -746,7 +746,11 @@ export async function createSSHHost(hostData: SSHHostData): Promise<SSHHost> {
|
||||
enableFileManager: Boolean(hostData.enableFileManager),
|
||||
defaultPath: hostData.defaultPath || "/",
|
||||
tunnelConnections: hostData.tunnelConnections || [],
|
||||
statsConfig: hostData.statsConfig || null,
|
||||
statsConfig: hostData.statsConfig
|
||||
? typeof hostData.statsConfig === "string"
|
||||
? hostData.statsConfig
|
||||
: JSON.stringify(hostData.statsConfig)
|
||||
: null,
|
||||
terminalConfig: hostData.terminalConfig || null,
|
||||
};
|
||||
|
||||
@@ -804,7 +808,11 @@ export async function updateSSHHost(
|
||||
enableFileManager: Boolean(hostData.enableFileManager),
|
||||
defaultPath: hostData.defaultPath || "/",
|
||||
tunnelConnections: hostData.tunnelConnections || [],
|
||||
statsConfig: hostData.statsConfig || null,
|
||||
statsConfig: hostData.statsConfig
|
||||
? typeof hostData.statsConfig === "string"
|
||||
? hostData.statsConfig
|
||||
: JSON.stringify(hostData.statsConfig)
|
||||
: null,
|
||||
terminalConfig: hostData.terminalConfig || null,
|
||||
};
|
||||
|
||||
@@ -1632,6 +1640,15 @@ export async function getServerMetricsById(id: number): Promise<ServerMetrics> {
|
||||
}
|
||||
}
|
||||
|
||||
export async function refreshServerPolling(): Promise<void> {
|
||||
try {
|
||||
await statsApi.post("/refresh");
|
||||
} catch (error) {
|
||||
// Silently fail - this is a background operation
|
||||
console.warn("Failed to refresh server polling:", error);
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// AUTHENTICATION
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user